Domino 9 und frühere Versionen > ND6: Entwicklung
Speechmike
(1/1)
acas:
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");
Axel:
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
diali:
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
--- Ende Code ---
acas:
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
Axel:
--- Zitat von: acas am 29.06.05 - 13:56:17 ---Hallo Axel Vielen Dank, für den Script aber ich komme irgind wie nicht weiter.
--- Ende Zitat ---
Sorry, aber das Script ist nicht von mir.
Axel
Navigation
[0] Themen-Index
Zur normalen Ansicht wechseln