Sign in to follow this  
Followers 0
bear

Some errors i occurred when run script

7 posts in this topic

#1 ·  Posted (edited)

I have a compiled script Test.exe.

If i put it on win98's shared folder and try to run it in winXP through LAN.

It will fail.

I am sorry i can't show that message here, because i am not in english environment.

But that message seems like to say:

"Can't run this application because its configuration is not correct. Reinstall it may solve this problem."

I have no idea about that.

"Any" compiled script will occur this problem.

But if i put script itself in the same place, it will be fine.

My Autoit3 version is 3.1.1.124 beta.

thanks.

PS: Another problem i occurred is this statement:

Eval("RunWait(""xxx.exe"")")

will do nothing....... ?

but

RunWait("xxx.exe")

works?

Edited by bear

Share this post


Link to post
Share on other sites



Post your script and we can help you :)

Share this post


Link to post
Share on other sites

PS: Another problem i occurred is this statement:

Eval("RunWait(""xxx.exe"")")

will do nothing....... ?

$aWat = Eval(RunWait("notepad.exe"))
MsgBox(262144, "","error   "& @error)
MsgBox(262144, "", $aWat)

Eval

--------------------------------------------------------------------------------

Return the value of the variable defined by an string.

Eval ( string )

Parameters

string string representing name of the variable.

Return Value

Success: Returns the value of the variable.

Failure: Returns "" (blank string) with @error set not to 0.

Remarks

If there is a need to use Eval() to to read a variable, the in most situations Assign() should be used to create/write to the variable and IsDeclared() should be used to check that the variable exists.

Share this post


Link to post
Share on other sites

Post your script and we can help you :)

This problem will occur in "Any" script i compiled, including AutoIt3 examples.

In other words, this error happended before any script code being executed.

For instance, AutoIt3\Examples\calculator.au3 compiled to calculator.exe, and

i put it in another machine and ran it in my computer.

if my computer is WinXP, that machine is Win98, this error will happend.

otherwise, it will work correctly.

I think this problem is in the AutoIt3 stub.

thanks.

Share this post


Link to post
Share on other sites

$aWat = Eval(RunWait("notepad.exe"))
MsgBox(262144, "","error   "& @error)
MsgBox(262144, "", $aWat)

Eval

--------------------------------------------------------------------------------

Return the value of the variable defined by an string.

Eval ( string )

......

Thank you!

In other scripting languages, eval() will evaluate any statement including function call.

so i think AutoIt3 is the same :).

But i found another function "Execute" in AutoIt3 help.

Maybe that is what i want.

Share this post


Link to post
Share on other sites

Try it like in helpfile :)

$val = RunWait("Notepad.exe", "C:\WINDOWS", @SW_MAXIMIZE)

; script waits until Notepad closes

MsgBox(0, "Program returned with exit code:", $val)

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