Hallo,
ich möchte ein Tool, was zum Export von Bilddateien genutzt wird, mit AutoIt fernsteuern. Leider funktioniert das Script nur bis zum Start des Programms, danach tut sich leider gar nichts mehr. Auch das Beispielscript zum öffnen von Notepad, in dem eine Textzeile eingegeben wird und sich danach schließt ohne zu speichern, funktioniert auch nur bis zum Programmstart von Notepad, danach ist Funkstille.
Kann es sein, dass AutoIt unter dem aktuellen Windows (21H2) mit der Programmsteuerung Probleme hat, oder muss ich vlt. irgend etwas aufrufen, was die Steuerung dann ermöglicht? Ich möchte erst einmal Im Programmmenü den Punkt "Record" aufrufen und dort dann "Load All". Das weitere Vorgehen, denke ich, werde ich dann alleine hin bekommen, allerdings muss ich erst mal das Programmfenster richtig ansteuern können.
Für Hinweise wäre ich sehr dankbar!
VG
Mein Code sieht im Moment so aus (die auskommentierten Zeilen sind erfolglose Versuche. Der Send-Befehl funktioniert übrigens auch nicht):
#include <MsgBoxConstants.au3>
#include <WinAPIFiles.au3>
#include <AutoItConstants.au3>
#include <File.au3>
#include <Array.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <String.au3>
Global $pHeyexePath = "C:\Studien-Heyexe"
Global $pExportPath = "C:\Heyex_XML_RAW_Export"
If DirectoryCheck( $pHeyexePath, $pExportPath ) == 0 Then
MsgBox( $MB_SYSTEMMODAL, "Error", "Heyex not installed" )
Exit
EndIf
$sProgramToRun = SelectStudy()
If $sProgramToRun == "0" Then
MsgBox( $MB_SYSTEMMODAL, "Error", "Please select a study" )
Else
$sProgramToRun = StringTrimRight( $sProgramToRun, 22 )
Run( $sProgramToRun & "\heyex.exe", $sProgramToRun )
; WinWaitActive( "Heidelberg Eye Explorer" )
; Sleep( 10000 )
; WinMenuSelectItem( "Heidelberg Eye Explorer", "", "&Record", "Load All" )
; ControlFocus( "Heidelberg Eye Explorer", "Ja", 254 )
; WinWaitClose( "Loading Patients" )
autoit.send( '{ALT}+{R}+{ENTER}' )
EndIf
Alles anzeigen