Sign in to follow this  
Followers 0
jack71

Preventing functions from leap frogging each other...

5 posts in this topic

Hello again!  I'm having a problem in my script where one function leap frogs another before it is done.  I wanted to have a SplashText appear for 5 seconds, then SplashOff(), then continue with the script.

If ProcessExists("calc.exe") Then
SplashTextOn("Test", "Message goes here.", -1, -1, -1, -1, 4, "", 24)
sleep(5000)
SplashOff()
 
AnotherFunction()
 
Else
msgbox(0, "No Calc", "Calc Not Loaded")
EndIf
 
Func AnotherFunction()
msgbox(0, "Hi", "I'm another function")
EndFunc

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

What do you mean by "leapfrog"

Nothing is being skipped.

When the splash turns off, the msgbox comes up, so AnotherFunction is being called.

What do you expect?  Or what are you observing?

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

You say it how I think it but that's not what I'm observing.  What I'm observing is the msgbox appearing before the splashtext. :o

What do you mean by "leapfrog"

Nothing is being skipped.

When the splash turns off, the msgbox comes up, so AnotherFunction is being called.

What do you expect?  Or what are you observing?

Share this post


Link to post
Share on other sites

OK...the example I posted here was a simplified example...and upon running it it behaves normally.  I'm an idiot.  I declared a local $var = result of a function in the beginning of my script and it was causing the msgbox to appear before the splash.  So I just declared the $var as Local and then mad the $var = result in the function itself instead of the beginning.  Sorry :(.

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