Jump to content

Func Pause - Splashtext


Dieuz
 Share

Recommended Posts

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
Link to comment
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()


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

Link to comment
Share on other sites

$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
Link to comment
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.


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

Link to comment
Share on other sites

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