Sign in to follow this  
Followers 0
iverson_est

Run Command Error

16 posts in this topic

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 :think:

Share this post


Link to post
Share on other sites



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 :think:

Post an example so that we can see what you are doing.

Best guess is that there are spaces in the path to exe.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

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 :think:

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.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#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.

Share this post


Link to post
Share on other sites

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.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

k thanks

Share this post


Link to post
Share on other sites

k thanks

Your welcome, I would have posted an example if I was not so lazy. :">


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

for Au3 files

$file_loc = FileGetShortName(@ScriptDir & "\Test.au3")

Run(@AutoItExe & " " & $file_loc, "", @SW_HIDE)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

but for au3 must i specify the script dir, even when it is in the same directory?

Share this post


Link to post
Share on other sites

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.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

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? :think:

Share this post


Link to post
Share on other sites

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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

but the rate login 1 is au3 file :think:

#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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 :think:

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0