Jump to content

Recommended Posts

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
Posted

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

Posted

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

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
Posted

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

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...