iverson_est Posted April 6, 2006 Share Posted April 6, 2006 Ok, strange, no matter what program i try to run i get an error that unable to run the external program. Wether it is au.3 .exe even .ini, i get this error. Any suggestions? When i activate the manually it is ok, but can't with au Link to comment Share on other sites More sharing options...
BigDod Posted April 6, 2006 Share Posted April 6, 2006 Ok, strange, no matter what program i try to run i get an error that unable to run the external program. Wether it is au.3 .exe even .ini, i get this error. Any suggestions? When i activate the manually it is ok, but can't with au Post an example so that we can see what you are doing.Best guess is that there are spaces in the path to exe. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
seandisanti Posted April 6, 2006 Share Posted April 6, 2006 Ok, strange, no matter what program i try to run i get an error that unable to run the external program. Wether it is au.3 .exe even .ini, i get this error. Any suggestions? When i activate the manually it is ok, but can't with au most likely it's the type of file you're running, or an error in your usage. if you post your code using Run() to execute an .exe file, we'll probably be able to spot the issue right off. Link to comment Share on other sites More sharing options...
iverson_est Posted April 6, 2006 Author Share Posted April 6, 2006 #include <IE.au3> Run("Error check.au3") Sleep(2000) $Account = IniRead("Settings.ini", "Settings", "Kasutaja", "NotFound") $Password = IniRead("Settings.ini", "Settings", "Parool", "NotFound") HotKeySet("{ESC}", "Terminate") $o_IE = _IECreate () _IENavigate($o_IE, "http://www.rate.ee/show.php") Sleep(3000) Send($Account) Send("{TAB}") Send($Password) Send("{TAB}") Send("{Enter}") Sleep(4000) While 1 $oForm = _IEFormGetObjByIndex($o_IE, 0) $oViis = _IEFormElementGetObjByName($oForm, "rating", 5) $oViis.click Sleep(1000) $oForm1 = _IEFormGetObjByIndex($o_IE, 0) $oNeli = _IEFormElementGetObjByName($oForm1, "rating", 4) $oNeli.click Sleep(1000) $oForm2 = _IEFormGetObjByIndex($o_IE, 0) $oKolm = _IEFormElementGetObjByName($oForm2, "rating", 3) $oKolm.click Sleep(1000) WEnd Func Terminate () Exit 0 EndFunc error check.au3 HotKeySet("{ESC}", "Terminate") Func Terminate () Exit 0 EndFunc While 1 Sleep(5000) If WinExists("AutoIt Error") Then Send("{Enter}") ProcessClose("iexplore.exe") Run("Rate login 1.au3") EndIf WEnd actually no matter what file, still the same error. Btw the file is in the same dir. Link to comment Share on other sites More sharing options...
BigDod Posted April 6, 2006 Share Posted April 6, 2006 You cant run .au3 files you can compile them and run them or run AutoIt and specify the .au3 file as a command line option. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
iverson_est Posted April 6, 2006 Author Share Posted April 6, 2006 k thanks Link to comment Share on other sites More sharing options...
BigDod Posted April 6, 2006 Share Posted April 6, 2006 k thanksYour welcome, I would have posted an example if I was not so lazy. :"> Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Valuater Posted April 6, 2006 Share Posted April 6, 2006 for Au3 files $file_loc = FileGetShortName(@ScriptDir & "\Test.au3") Run(@AutoItExe & " " & $file_loc, "", @SW_HIDE) 8) Link to comment Share on other sites More sharing options...
iverson_est Posted April 6, 2006 Author Share Posted April 6, 2006 but for au3 must i specify the script dir, even when it is in the same directory? Link to comment Share on other sites More sharing options...
BigDod Posted April 6, 2006 Share Posted April 6, 2006 but for au3 must i specify the script dir, even when it is in the same directory?You do not need to specify it if your script is in the same directory as the AutoIt exe but is not a bad idea to get into the habit incase the script ever gets run from somewhere else. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
iverson_est Posted April 6, 2006 Author Share Posted April 6, 2006 k thanks but now i've ran into another problem. My code: #include <IE.au3> Run("Errorcheck.exe") Sleep(2000) $Account = IniRead("Settings.ini", "Settings", "Kasutaja", "NotFound") $Password = IniRead("Settings.ini", "Settings", "Parool", "NotFound") HotKeySet("{ESC}", "Terminate") $o_IE = _IECreate () _IENavigate($o_IE, "http://www.rate.ee/show.php") Sleep(3000) Send($Account) Send("{TAB}") Send($Password) Send("{TAB}") Send("{Enter}") Sleep(4000) While 1 $oForm = _IEFormGetObjByIndex($o_IE, 0) $oViis = _IEFormElementGetObjByName($oForm, "rating", 5) $oViis.click Sleep(1000) $oForm1 = _IEFormGetObjByIndex($o_IE, 0) $oNeli = _IEFormElementGetObjByName($oForm1, "rating", 4) $oNeli.click Sleep(1000) $oForm2 = _IEFormGetObjByIndex($o_IE, 0) $oKolm = _IEFormElementGetObjByName($oForm2, "rating", 3) $oKolm.click Sleep(1000) WEnd Func Terminate () Exit 0 EndFunc and the errorcheck: $file_loc = FileGetShortName(@ScriptDir & "\Rate login 1.au3") HotKeySet("{F1}", "Terminate") Func Terminate () Exit 0 EndFunc While 1 Sleep(5000) If WinExists("AutoIt Error") Then Send("{Enter}") ProcessClose("iexplore.exe") Sleep(3000) Run(@AutoItExe & " " & $file_loc, "", @SW_HIDE) EndIf WEnd funny, the errorcheck closes script nicely, but doesen't start a new script. Tho is tsart another errorcheck what is mentioned in the main file. How come it just runs new errorcheck file and doesn't do anything from there on? Link to comment Share on other sites More sharing options...
Valuater Posted April 6, 2006 Share Posted April 6, 2006 for Au3 files $file_loc = FileGetShortName(@ScriptDir & "\Test.au3") Run(@AutoItExe & " " & $file_loc, "", @SW_HIDE) 8) that was for running an au3 file only this is the fix for au3 or compiled $file_loc = @ScriptDir & "\Test.au3" If @Compiled = 1 Then $file_exe = FileGetShortName(@AutoItExe & ' /AutoIt3ExecuteScript "' & $file_loc & '"') Run($file_exe) Else $file_au3 = FileGetShortName($file_loc) Run(@AutoItExe & " " & $file_au3, "", @SW_HIDE) EndIf 8) Link to comment Share on other sites More sharing options...
iverson_est Posted April 8, 2006 Author Share Posted April 8, 2006 but the rate login 1 is au3 file #include <IE.au3> $Account = IniRead("Settings.ini", "Settings", "Kasutaja", "NotFound") $Password = IniRead("Settings.ini", "Settings", "Parool", "NotFound") HotKeySet("{ESC}", "Terminate") $o_IE = _IECreate () _IENavigate($o_IE, "http://www.rate.ee/show.php") Sleep(2000) Run("Errorcheck.exe") Sleep(3000) Send($Account) Send("{TAB}") Send($Password) Send("{TAB}") Send("{Enter}") Sleep(4000) While 1 $oForm = _IEFormGetObjByIndex($o_IE, 0) $oViis = _IEFormElementGetObjByName($oForm, "rating", 5) $oViis.click Sleep(1000) $oForm1 = _IEFormGetObjByIndex($o_IE, 0) $oNeli = _IEFormElementGetObjByName($oForm1, "rating", 4) $oNeli.click Sleep(1000) $oForm2 = _IEFormGetObjByIndex($o_IE, 0) $oKolm = _IEFormElementGetObjByName($oForm2, "rating", 3) $oKolm.click Sleep(1000) WEnd Func Terminate () Exit 0 $file_loc = @ScriptDir & "\rate login 1.au3" HotKeySet("{F1}", "Terminate") Func Terminate () Exit 0 EndFunc While 1 Sleep(5000) If WinExists("AutoIt Error") Then Send("{Enter}") ProcessClose("iexplore.exe") Sleep(3000) Run(@AutoItExe & " " & $file_loc, "", @SW_HIDE) ProcessClose("errorcheck.exe") EndIf WEnd and it just won't start the script again. It just won't. No errors no nothing...weird? Link to comment Share on other sites More sharing options...
MHz Posted April 8, 2006 Share Posted April 8, 2006 Add some quotes around the au3 file path. You are also missing EndFunc on the end of your larger script. $file_loc = @ScriptDir & "\rate login 1.au3" HotKeySet("{F1}", "Terminate") Func Terminate() Exit 0 EndFunc While 1 Sleep(5000) If WinExists("AutoIt Error") Then Send("{Enter}") ProcessClose("iexplore.exe") Sleep(3000) Run(@AutoItExe & ' "' & $file_loc & '"', "", @SW_HIDE) ProcessClose("errorcheck.exe") EndIf WEnd Link to comment Share on other sites More sharing options...
iverson_est Posted April 9, 2006 Author Share Posted April 9, 2006 now... i think it is behind the errorcheck closing. It won't close the errorcheck. Can a running program actually close it self like in my script? Link to comment Share on other sites More sharing options...
Developers Jos Posted April 9, 2006 Developers Share Posted April 9, 2006 now... i think it is behind the errorcheck closing. It won't close the errorcheck. Can a running program actually close it self like in my script?Why would you want to ProcessClose() the script itself ? I would use Exit SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now