Sign in to follow this  
Followers 0
Dieuz

Func Pause - Splashtext

10 posts in this topic

#1 ·  Posted (edited)

I made a Function pause and it's working fine. There's only one thing that is not working. The script display a splashtext message when the code is paused but if I resume it, the script continu from where it was but the splash text stay the same.

Function Pause:

Func Pause()
    ToolTip('Script is paused',0,13)
    SplashTextOn ("", "Press SPACE to Resume"  , 290, 20, 0, 30, 1, "", 10)
    $Paused = NOT $Paused
    While $Paused
    sleep(100)
    WEnd
EndFunc

There's always a splash text when my script is working. What should I change to this function to come back to my original splash text when I resume the Pause function?

Edited by Dieuz

Share this post


Link to post
Share on other sites



SplashOff

Share this post


Link to post
Share on other sites

SplashOff

Splashoff turn off the splashtext of the function pause but doesnt restore my other one.

Share this post


Link to post
Share on other sites

hahah woops totaly read your question wrong, im confused maybe u could show ur other part with the original splashtext. i dont see why you cant just remake it , splashoff the pause and then remake the other one

Share this post


Link to post
Share on other sites

Example

SplashTextOn("Title", "Message goes here.", -1, -1, -1, -1, 4, "", 24)
Sleep(3000)
$message="This is a test"
ControlSetText("Title", "", "Static1", $message)
Sleep(3000)
SplashOff()


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

$Trophyswon = 0

;SplashText
$Trophyswon = $Trophyswon + 1 
SplashTextOn ("", "Trophys Won: " & $Trophyswon, 290, 20, 0, 30, 1, "", 10)

My splashtext have a variable that change everytime the script pass over it. It's why I dont know how to restore it.

Edited by Dieuz

Share this post


Link to post
Share on other sites

Example

SplashTextOn("Title", "Message goes here.", -1, -1, -1, -1, 4, "", 24)
Sleep(3000)
$message="This is a test"
ControlSetText("Title", "", "Static1", $message)
Sleep(3000)
SplashOff()
It seem that it's not working if I add my variable into it because it reset is value.

Anyone have an idea how to make it work?

Share this post


Link to post
Share on other sites

Show us some more of your script so we can see how the variable is set. It may be that you will have to use an ini file to store the variable so that it can be picked up when the Splash screen is reset.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Problem Fixed

Just found a way to correct it. That was rly simple! :P

ToolTip('Script is Running',0,13)
$Trophyswon = $Trophyswon + 1 
SplashTextOn ("", "Trophys Won: " & $Trophyswon, 290, 20, 0, 30, 1, "", 10)



Func Pause()
    ToolTip('Script is Paused',0,13)
    SplashTextOn ("", "Press SPACE to Resume"  , 290, 20, 0, 30, 1, "", 10)
    $Paused = NOT $Paused
    While $Paused
    sleep(100)
WEnd
ToolTip('Script is Running',0,13)
SplashTextOn ("", "Trophys Won: " & $Trophyswon, 290, 20, 0, 30, 1, "", 10)
EndFunc
Edited by Dieuz

Share this post


Link to post
Share on other sites

your trophys = $trophys + 1 can be replaced with $trophys += 1

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