CemalSenturk Posted January 15, 2015 Share Posted January 15, 2015 _RunAU3("skalistir.au3") Sleep(10000) _RunAU3("spastrakuc.au3") _RunAU3("spastrabuy.au3") _RunAU3("spastraele.au3") Func _RunAU3($sFilePath, $sWorkingDir = "", $iShowFlag = @SW_SHOW, $iOptFlag = 0) Return Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & $sFilePath & '"', $sWorkingDir, $iShowFlag, $iOptFlag) EndFunc Here is my code and I tried to use sleep between each _RunAU3 line but causes error openning file. And also tried with: _RunAU3("skalistir.au3") _RunAU3("spastrakuc.au3") _RunAU3("spastrabuy.au3") _RunAU3("spastraele.au3") Func _RunAU3($sFilePath, $sWorkingDir = "", $iShowFlag = @SW_SHOW, $iOptFlag = 0) Return Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & $sFilePath & '"', $sWorkingDir, $iShowFlag, $iOptFlag) Sleep(10000) EndFunc But cannot make it work Link to comment Share on other sites More sharing options...
jdelaney Posted January 15, 2015 Share Posted January 15, 2015 (edited) Are the scripts in the same dir as you current @scriptDir? What's the failure. I'd suggest adding a ConsoleWrite of your run command, prior to execution...that way, you can grab the command, and execute it in a CMD prompt, to see the exact failure reason. Also, because your Return dirctly following the Run, the Sleep will never occur...have the run() return to a variable, and return that variable after the sleep. $iReturn = Run(...) Sleep(1000) Return $iReturn Edited January 15, 2015 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
CemalSenturk Posted January 15, 2015 Author Share Posted January 15, 2015 C:Program Files (x86)AutoIt3Include here is the all .au3 scripts that I use, at the same directory. Link to comment Share on other sites More sharing options...
Solution jdelaney Posted January 15, 2015 Solution Share Posted January 15, 2015 (edited) Run this, and provide the output...also, do you know about runwait()? That waits for your script to complete. ConsoleWrite(@ScriptDir & @CRLF) _RunAU3("skalistir.au3") _RunAU3("spastrakuc.au3") _RunAU3("spastrabuy.au3") _RunAU3("spastraele.au3") Func _RunAU3($sFilePath, $sWorkingDir = "", $iShowFlag = @SW_SHOW, $iOptFlag = 0) ConsoleWrite(FileExists($sFilePath) & @TAB & '"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & $sFilePath & '"' & @CRLF) $iReturn = Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & $sFilePath & '"', $sWorkingDir, $iShowFlag, $iOptFlag) Sleep(10000) Return $iReturn EndFunc Edited January 15, 2015 by jdelaney CemalSenturk 1 IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
CemalSenturk Posted January 15, 2015 Author Share Posted January 15, 2015 Nevermind. I solved the problem thanks btw 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