Sign in to follow this  
Followers 0
GSW

NEED HELP CHAINING

6 posts in this topic

Hi ...

I'm an absolute noob at this, but I learn pretty quickly once I'm pointed in the right direction.

I can't understand why i can't get 2 routines to run consecutively even though I can run them singly.

This runs standalone:

Run("01-KillAps\kill.bat") ; kill unnecessary services excluding autoit
WinWaitActive("Open File - Security Warning") ; wait for messagebox to appear
Send("!R") ; OK to run

and this runs standalone:

Run("02-DesktopOK\DesktopOK.exe")

WinWaitActive("DesktopOK 2.35 Free")

Send("!d") ; 0pens the Desktop Ok drop menu
Send("{ENTER}")  ; Saves the desktop
Send("!x") ;exit the program

but this hangs after the first routine, even with a sleep between them:

;  routine #1:          Deactivate unnecessary services that are running.

Run("01-KillAps\kill.bat")
WinWaitActive("Open File - Security Warning")
Send("!R")

;  routine #2:          Preserve desktop for later recovery.

Run("02-DesktopOK\DesktopOK.exe")

WinWaitActive("DesktopOK 2.35 Free")

Send("!d") ; 0pens the Desktop Ok drop menu
Send("{ENTER}")  ; Saves the desktop
Send("!x") ;exit the program

exit

The kill.bat program kills running services but specifically excludes autoit.

Any ideas about why the routine should hang?

Share this post


Link to post
Share on other sites



The only thing I can think of is that when you run kill.bat, it's still running while you're trying to run DesktopOK.exe. If this is the case then try turning Run("01-KillAps\kill.bat") into RunWait("01-KillAps\kill.bat").

Share this post


Link to post
Share on other sites

The only thing I can think of is that when you run kill.bat, it's still running while you're trying to run DesktopOK.exe. If this is the case then try turning Run("01-KillAps\kill.bat") into RunWait("01-KillAps\kill.bat").

Mmm ... already tried that one, didn't work though (the second routine, that is). I also tried RunWait(@ComSpec & " /c " & "01-KillAps\kill.bat"), but that didn't help either.

The DOS window closes, but I don't really know if the routine has ceased running or not.

Any other ideas folks?

Share this post


Link to post
Share on other sites

add this to the top of the script:

Opt("TrayIconDebug", 1)

and hover over the autoit3 trayicon to see what line it "hanging" on.


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

add this to the top of the script:

Opt("TrayIconDebug", 1)

and hover over the autoit3 trayicon to see what line it "hanging" on.

Thanks Jos ...

I'll give it a try.

Share this post


Link to post
Share on other sites

Brilliant !!

Thanx all, once I could see the hang, I was able to fix it.

Problem solved. :unsure:

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