Jump to content

Quick question


Sardith
 Share

Recommended Posts

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")


Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc


While 1
sleep(100)
Send("{RSHIFT down}")
WEnd

I cant get it to pause for the life of me.. any help would be great.

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc
While 1
sleep(100)
Send("{RSHIFT down}")
WEnd

I cant get it to pause for the life of me.. any help would be great.

Because of this line "Send("{RSHIFT down}")" you can not hit the Pause key


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

Because of this line "Send("{RSHIFT down}")" you can not hit the Pause key

Wouldn't {SHIFT}{PAUSE} actually be {BREAK} to Windows? Maybe not. I'm not feeling well.

Also, Sardith, it's a good idea to declare that you're using global variables inside the function.

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")


Func TogglePause()
    Global $Paused
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc


While 1
sleep(100)
Send("{RSHIFT down}")
WEnd

My UDFs: ExitCodes

Link to comment
Share on other sites

Wouldn't {SHIFT}{PAUSE} actually be {BREAK} to Windows?

That is what I was trying to say in my droll Scottish way. :P


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

Wouldn't {SHIFT}{PAUSE} actually be {BREAK} to Windows?

On an XP OS:

Go to Start > Programs > Accessories > Accessibility > On-Screen Keyboard

Start that app.

Notice the key named "brk".

Now press the "Shft" key (which acts like the caps lock key for this app).

Notice that the "brk" key changed name to "pau".

I'm not attempting to draw any conclusions from this...

...just pointing it out that MS makes it appear that Shift-Pause/Break = Pause

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

The easy way to test the theory is to use a function key instead of "Break" and see if the script pauses.

Edit

It is also a good idea to write in a send("{RSHIFT UP}") before the script ends or you may experience some weird things when typing.

Edited by BigDod


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

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