Jump to content

Script works, EXE fails


 Share

Recommended Posts

After downloading and installing Autoit3 yesterday, I successfully created my first simple script (auto install of Delorme Street Atlas). The problem is once it has been compiled into an EXE, it fails. I decompiled the EXE and it appears that nothing has changed. Yet the EXE fails to close a couple of windows which is vital in this instance. Any thoughts...

Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]

Link to comment
Share on other sites

Perhaps you were running the script as beta, but compiling it under the stable release?

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Link to comment
Share on other sites

After downloading and installing Autoit3 yesterday, I successfully created my first simple script (auto install of Delorme Street Atlas). The problem is once it has been compiled into an EXE, it fails. I decompiled the EXE and it appears that nothing has changed. Yet the EXE fails to close a couple of windows which is vital in this instance. Any thoughts...

If Simucal doesn't have the right answer then post your code.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

If Simucal doesn't have the right answer then post your code.

Ok, I have changed things around and still nothing. The first issue is in red. There is yet another window called Street Atlas USA 2005 that will not close. It is the final form in the install that contains the Finish button. I originally was using WinWaitActive (since that is in the WinZip tutorial -- new guy here --). but that wasnt working out too good either. I ran across ControlClick in the instructions and thought that sounded good, but I have it wrong too.

I'm no programmer and not much of a scripter either. Any help is appreciated.

CODE
;begin application install

Run("c:\admin software\street atlas 2005\disk1-setup\setup.exe")

WinWaitActive("Street Atlas USA 2005", "&Next")

Send("!n")

WinWaitActive("Street Atlas USA 2005", "&Yes")

Send("!y")

WinWait("Product License")

ControlSetText("Product License", "", "Edit1", "company" )

ControlSetText("Product License", "", "Edit2", "name" )

Send("!n")

WinWait("Street Atlas USA 2005")

Send("{ENTER}")

WinWait("Street Atlas USA 2005")

Send("{ENTER}")

WinWait("Street Atlas USA 2005")

Send("!i")

WinWaitActive("Product Registration")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{ENTER}")

WinWaitActive("Question")

Send("!n")

;End application install

WinWaitActive("Question", "hard drive")

Send("!n")

WinWait("Street Atlas USA 2005")

Send("{ENTER}")

WinWait("Street Atlas USA 2005")

Send("{ENTER}")

ControlFocus("Street Atlas USA 2005", "Finish", "Button4")

ControlClick("Street Atlas USA 2005", "Finish", "Button4")

;WinWait("Street Atlas USA 2005")

;Send("{SPACE}")

Sleep(10000)

;begin data install

Run("c:\admin software\street atlas 2005\disk2-data\setup.exe")

;data install

WinWaitActive("Street Atlas USA 2005 Data")

Send("!n")

WinWaitActive("Street Atlas USA 2005 Data")

Send("{ENTER}")

;install the data CD

WinWait("Street Atlas USA 2005 Data")

Send("!i")

WinWaitActive("Street Atlas USA 2005 Data")

Send("{ENTER}")

;ISOFIX patch

WinWaitClose("Street Atlas USA 2005 Data")

Run("c:\admin software\street atlas 2005\MagneticUpdate.exe")

WinWaitActive("DeLorme Magnetic Declination Update")

Send("{ENTER}")

sleep(1000)

Send("{ENTER}")

Edited by ksmith247

Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]

Link to comment
Share on other sites

This is not really needed as ControlClick does not require it.

ControlFocus("Street Atlas USA 2005", "Finish", "Button4")oÝ÷ Ù.r¥u©l¢ëjëh×6If NOT ControlSend("Street Atlas USA 2005", "Finish", "Button4", "{ENTER}") Then 
    MsgBox(48, "ERROR", "Could not locate Button4 @error:=" & @error)
EndIf

And also try to replace "Finish" with "" (empty string)

Happy scripting...:whistle:

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...