Silverback83

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

19 posts in this topic

#1 ·  Posted

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

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

#3 ·  Posted

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

Share this post


Link to post
Share on other sites

#4 ·  Posted

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


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

#5 ·  Posted

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.

Share this post


Link to post
Share on other sites

#6 ·  Posted

Not loop! It is waiting!

WinWaitActive will pause your scipt and waiting  windows is active, if not set timeout or windows is actived! Scrip will waiting forever!


Regards,
 

Share this post


Link to post
Share on other sites

#7 ·  Posted

I'm confused as to why it works fine when running the script but not when compiling it. It loops the first 3 of 4 and never gets to the 4th.

WinWaitActive was taken from this script https://www.autoitscript.com/autoit3/docs/tutorials/winzip/script.htm

If it was waiting forever, wouldnt that mean it wouldnt progress?

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

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

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

#9 ·  Posted

Sorry Jos. It's the running of the compiled output. So the application file.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

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

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

#11 ·  Posted

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

Share this post


Link to post
Share on other sites

#12 ·  Posted

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,
 

Share this post


Link to post
Share on other sites

#13 ·  Posted

The EXE name of the script is 'Cygnus' and so is the .au3 file. I was running the application from its default folder where the script was also placed, but my plan is eventually to put this onto a network as a standalone application file.

Share this post


Link to post
Share on other sites

#14 ·  Posted

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


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

#15 ·  Posted

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

Share this post


Link to post
Share on other sites

#16 ·  Posted

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


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

#17 ·  Posted

Not at all. It's me who didn't answer properly. Thank you again.

I'll have to google all that up but def happy with the progress :)

Share this post


Link to post
Share on other sites

#18 ·  Posted

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

1 person likes this

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

#19 ·  Posted

Yes, it makes perfect sense. Cant believe I didnt see it. I wrote the first part, and then started copying and pasting as the process is mainly the same, not realising where I had gone so wrong.

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