Jump to content

Hold down CTRL for Ever


Recommended Posts

now i can turn it on with PAUSE, but cant turn off with pause :)

Current Script->

HotKeySet("{PAUSE}", "_CtrlToggle")

Global $toggle

While 1

Sleep(10000)

WEnd

Func _CtrlToggle()

$toggle = Not $toggle

If $toggle Then

Send("{CTRLDOWN}")

Else

Send("{CTRLUP}")

EndIf

EndFunc

Well, thats @ the moment:

Posted Image

Edited by TheRaZoR
Link to comment
Share on other sites

Why not just use separate hotkeys for ctrldown and ctrlup

HotKeySet("{F11}", "Function1")
HotKeySet("{F12}", "Function2")
HotKeySet("{ESC}", "Terminate")

While 1
    Sleep(100)
WEnd

Func Function1()
    Send("{CTRLDOWN}")
EndFunc

Func Function2()
    Send("{CTRLUP}")
EndFunc

Func Terminate()
    Exit 0
EndFunc


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

Run this script with the latest beta.

#include <Misc.au3>

$ctrl = 0

Func pausepressed()
    Select 
        Case $ctrl = 0
            Send ("{CTRLDOWN}") 
            $ctrl = 1
        Case $ctrl = 1
            Send ("{CTRLUP}")
            $ctrl = 0
    EndSelect
EndFunc

While 1
    If _IsPressed ("13") Then Call ("pausepressed");Waits for the PAUSE button to be pressed.
WEnd
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...