Hallozusammen,
ich habe eine Frage zu einem merkwürdigen Fehler.
Wenn ich meine "Sctipt.exe" per Hand also per Doppelclick aufrufe funktioniert es perfekt.
Wird das Programm jeoch von "extern" also einen anderen Programm aufgerufen, so spricht gleich meine MsgBox an mit "Unable to open the config.txt"!
Hat jemand eine Idee wiso dies so ist?
Hier ein Teil meines Prog.
$file=FileOpen("config.txt",0)
$drive=FileReadLine("config.txt",4)
$Comport=FileReadLine("config.txt",6)
$Anzahl=FileReadLine("config.txt",8)
$Version=('V:X:30:2:E');Robotic Version Info Command
$Calibration=('C:X:30:2:E');Calibration Command
$Load=('I:X:30:2:E');Get Input (load) Command
$Unload=('A:X:30:2:E');Unload the Drive Command
HotKeySet("{ESC}","_exit")
Global $iCount = 1
if $file=-1 Then
MsgBox(0,"Error","Unable to open the config.txt")
Exit
EndIf
RunWait('load.exe --comport='&$comport&' --drive='&$drive&' --command='&$Version&'')
[/autoit]Danke für Eure Antworten