Jump to content

Tools 'Go' runs ok. Tools' Build' infinite loop


Recommended Posts

I followed the winzip tutorial to create a script that installs 4 small applications. It works great if I select 'Go' in tools but if I compile it into an exe build and run it, it loops and never ends. Do I need to create a stop command or something at the end of my script?

Link to comment
Share on other sites

  • Developers

Show me the script and SciTE output pane information when doing the Compile, so I can what is going on.

Jos

PS: Your Title implies something else than your actual text. Is the loop happening during the Build operation or when you run the created EXE?
Still need the mentioned info to assist.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Not sure what the SciTE output is? Only started using this about 1hr ago.

If I press build or compile it creates an exe. If I run that exe it forever loops. (I think its looping the first 3 and not even getting to the 4th, but if I select 'go' under tools, the script runs fine and finishes the install of all 4 programmes, but only once.

This is my script in the attachments

Test.au3

Link to comment
Share on other sites

  • Developers

How do you Run or Build  the script? 
How are you Running the Build script?
Wild guess: You are starting the compiled script from Windows Explorer and it could very well be that the last statement (Send("{ENTER}")) is send to the Explorer window in stead of the intended APP and starting your script again.

It is much better to try and run installers in a silent mode when they have that option ( often an commandline option like /s) or else use ControlSend() statements in stead of Send() as those will be send to the intended target Install software.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Yes, I am using SciTE Lite to write the script. To "run" the script to see if it works on my simulated keystrokes I was selecting 'Go' under 'Tools'

As this worked perfectly well and ran through all the keystrokes required for all 4 applications, I tried to compile it into an executable file using 'Compile' under 'Tools'. This is where it then goes horribly wrong and forever loops the first 3 of the 4. The installers dont support silent mode as originally I was trying to do this in Inno setup, but then came autoit and tried to do it in that because I can control the required keystrokes.

As a test if I get rif of the last line of code Send("{ENTER}") and compile that, it still loops.

Link to comment
Share on other sites

  • Developers
5 minutes ago, Silverback said:

I tried to compile it into an executable file using 'Compile' under 'Tools'. This is where it then goes horribly wrong and forever loops the first 3 of the 4.

I know I have asked a lot of question but still haven't received an answer to all. ;)

So again: It is the Compile action that goes into a loop or is it the Running of the compiled output script?
If it is the first then show me the Output from the bottom screen in SciTE when you are performing the Compile.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Ok :)

Next step: what is the EXE name of your script you are running and are you running it from the Windows Explorer? 

Jos

 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Cant find the edit. Sorry for the double post. When I compile, the output from the bottom screen is as follows:

 

>"C:\Program Files (x86)\AutoIt3\SciTE\..\aut2exe\aut2exe.exe" /in "C:\Users\Silver\Desktop\Cygnus\Cygnus.au3"
>Exit code: 0    Time: 0.07835

Link to comment
Share on other sites

It's just an example of using "Send ()".
It is bad to use alone, you need to combine with other functions to automate software installation easier and more accurate!

I can know the name of the software you want to install automatically, I will help you code for example.

Regards,
 

Link to comment
Share on other sites

  • Developers

OK so the scriptname will be Cygnus.exe. Could you simply rename it to something totally different and try it again?
..and also tell me How you start your compiled script!!!!! ;)

Looking at your script, this line looks wrong as there is no file extension:

;This will execute the Cygnus CP Config executable
Run("Cygnus CP Config GUI_V_02_02_13_setup")

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

2 minutes ago, Jos said:

OK so the scriptname will be Cygnus.exe. Could you simply rename it to something totally different and try it again?
..and also tell me How you start your compiled script!!!!! ;)

Looking at your script, this line looks wrong as there is no file extension:

;This will execute the Cygnus CP Config executable
Run("Cygnus CP Config GUI_V_02_02_13_setup")

Jos

Whoops! Bad case of copy and paste going on there. My bad. Ok so added in extensions :> and changed filename. And that has done the trick. Thank you soooooooooooo much!

One last question if that's ok. If I wanted to hide each screen so I couldnt see the process (effectivly a silent install) what would the command be?

So glad that's resolved. Cant believe I didnt see the missing extensions :/

Link to comment
Share on other sites

  • Developers
Just now, Silverback said:

Thank you soooooooooooo much!

No problem ...  and sorry for the many questions but that is really the process to get to the bottom of an issue. :)

1 minute ago, Silverback said:

If I wanted to hide each screen so I couldnt see the process (effectivly a silent install) what would the command be?

It can be done but you will have to look at the ControlSend first to see if that works as that is the only option to hide the window after it is shelled. Obviously the current Send() commands require the window to be shown and having the focus.
Check out each of the installer windows with au3info to see what the Control information is for each of the fields/buttons you need to act upon.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

By the way: Do you now also understand why it went into this indefinite loop?

My guess is that the mentioned Run("Cygnus CP Config GUI_V_02_02_13_setup") command would re-shell itself since it could interpret the first word as the program and the rest as parameters. That is why I suggested to change the name from Cygnus.exe to something totally different.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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