Autor Thema: Speechmike  (Gelesen 3387 mal)

Offline acas

  • Frischling
  • *
  • Beiträge: 6
Speechmike
« am: 29.06.05 - 08:38:05 »
Hallo zusammen,

ich habe ein kleines Problem, ich habe erst neu angefangen mit Notes Formel zu programmieren.
Folgendes möchte ich erreichen.

Ich möchte mit nur  einem Button Speechmike (Philips Diktation) öffnen, Aufnehmen aber erst wenn die Aufnahme  fertig aufgemommen ist, möchte dann  erst in den Ordner Diktat verschieben.
Ich habe denn Script schon geschrieben, aber wenn ich speechmike mit dem Anheng öffne, wird schon direkt verschoben bevor ich aufgenommen habe. Ich kommen momentan nicht weiter. Meine bitte an Euch, wie kriege ich das gelöst.
Vielen Dank im  voraus !!!!

acas

@Command([EditDocument];"1");

@Command([EditGotoField];"Body");
@LaunchApp(speechmike);
@Command([EditInsertFileAttachment];"C:/Programme/Philips Speech/SpeechMike Executive/Speech/diktat.wav";"1"); REM {Hängt eine Datei an ein Dokument an.};
@Command( [Execute]; "C:/Programme/Philips Speech/SpeechMike Executive/Speech/diktat.wav";"1"); REM {Startet ein Anwendungsprogramm.};
@Command([AttachmentLaunch]);

@Command([EditSelectAll]);

@Command([FileSave]);

REM {@Command([FileSave]); ;

@Command([CloseWindow]);
@Command( [FolderDocuments] ; "diktat" ; "1" );
@Command([OpenView];"diktat");

Offline Axel

  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 8.658
  • Geschlecht: Männlich
  • It's not a bug, it's Notes
Re: Speechmike
« Antwort #1 am: 29.06.05 - 08:55:04 »
Hi,

herzlich willkommen hier im Forum.

Das wird so nicht gehen, denn woher soll den die Formel wissen, ob und wann die Aufnahme beendet ist?

Mit Script könnte das eventuell gehen. Aber auch das muss man etwas tricksen. Irgendwo habe ich mal eine Fuktion gesehen, die ein Programm startet und so lange wartet, bis das Programm beendet ist.

Axel
Ohne Computer wären wir noch lange nicht hinterm Mond!

Offline diali

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 1.023
  • Geschlecht: Männlich
Re: Speechmike
« Antwort #2 am: 29.06.05 - 09:09:04 »
geht über die Win-Api. Hier ein Beispiel mit der cmd.exe
Code
Type STARTUPINFO
cb As Long
lpReserved As String
lpDesktop As String
lpTitle As String
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessID As Long
dwThreadID As Long
End Type
Declare Function WaitForSingleObject Lib "kernel32" (Byval hHandle As Long, Byval dwMilliseconds As Long) As Long
Declare Function CreateProcessA Lib "kernel32" (Byval _
lpApplicationName As Long, Byval lpCommandLine As String, Byval _
lpProcessAttributes As Long, Byval lpThreadAttributes As Long, _
Byval bInheritHandles As Long, Byval dwCreationFlags As Long, _
Byval lpEnvironment As Long, Byval lpCurrentDirectory As Long, _
lpStartupInfo As STARTUPINFO, lpProcessInformation As _
PROCESS_INFORMATION) As Long
Declare Function CloseHandle Lib "kernel32" (Byval hObject As Long) As Long
Const NORMAL_PRIORITY_CLASS = &H20&
Const INFINITE = -1&
Sub Click(Source As Button)
Dim RetVal As Long
Dim proc As PROCESS_INFORMATION
Dim StartInf As STARTUPINFO
StartInf.cb = Len(StartInf)
runprog = "cmd.exe"
RetVal = CreateProcessA(0&, RunProg, 0&, 0&, 1&, NORMAL_PRIORITY_CLASS, 0&, 0&, StartInf, proc)
'Notes-Anwendung anhalten und auf Programmende waretn
RetVal = WaitForSingleObject(proc.hProcess, INFINITE)
RetVal = CloseHandle(proc.hProcess)
End Sub
Gruß
Dirk

Offline acas

  • Frischling
  • *
  • Beiträge: 6
Re: Speechmike
« Antwort #3 am: 29.06.05 - 13:56:17 »
Hallo Axel Vielen Dank, für den Script aber ich komme irgind wie nicht weiter.

Ich versuche etwas leicteres.

Vielen DAnk.

Ich werde mich öfters mal melden.

Gruß
acas

Offline Axel

  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 8.658
  • Geschlecht: Männlich
  • It's not a bug, it's Notes
Re: Speechmike
« Antwort #4 am: 29.06.05 - 14:05:20 »
Hallo Axel Vielen Dank, für den Script aber ich komme irgind wie nicht weiter.

Sorry, aber das Script ist nicht von mir.


Axel
Ohne Computer wären wir noch lange nicht hinterm Mond!

 

Impressum Atnotes.de  -  Powered by Syslords Solutions  -  Datenschutz