Sign in to follow this  
Followers 0
VicTT

Problems with compiled executable

5 posts in this topic

I'm new here and I don't have the slightest idea about how to post stuff that actually gets answered but I'm going to do my best nonetheless..

The problem is the following:

I tried to compile one of the example programs (calculator.au3), it compiles just fine but when I try to run it it displays the messagebox in which it asks me if I want to run it.

<CODE START>

; Prompt the user to run the script - use a Yes/No prompt (4 - see help file)

$answer = MsgBox(4, "AutoIt Example (English Only)", "This script will run the calculator and type in 2 x 4 x 8 x 16 and then quit. Run?")

; Check the user's answer to the prompt (see the help file for MsgBox return values)

; If "No" was clicked (7) then exit the script

If $answer = 7 Then

MsgBox(0, "AutoIt", "OK. Bye!")

Exit

EndIf

<CODE END>

The problem is that if I click "YES", it simply starts another instance of itself that asks me the same thing..and so forth..If I click no, it displays the "NO" Msgbox and exits..I'm pretty puzzled here..what exactly is wrong?It seems to work just fine when it's not an exe..I tried decompressing it to see if upx was the problem but then it wouldn't run at all..has anyone experienced this problem before?Another thing I tried is to remove the whole "Do you want to do this?" Msgbox and see if it works..surprised me it did..Any ideas?


[quote]Together we might liveDivided we must fall[/quote]

Share this post


Link to post
Share on other sites



I'll try to see if UPX is actually the problem by replacing the upx.exe exe with another one..When I decompress it and try to run it, I get "Unable to open script file"..I think these are all the details I can give you considering the fact that calculator.au3 is an example program..:)..Thanks in advance..


[quote]Together we might liveDivided we must fall[/quote]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

compile this :)

Run("calc.exe")

edit: btw if i compile the original calc example it works fine.

Edited by burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

LOL!Now it works just fine..WTF???


[quote]Together we might liveDivided we must fall[/quote]

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