Jump to content

Hold down CTRL for Ever


Recommended Posts

Hey guys, i need a little bot, that is able to switch on/off with PAUSE.

it just have to do:

hold CTRL until i press PAUSE again...

i just need that {} Command for example: {DOWNLCTRL}

pls :S

/e:

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

Global $var = 0
While 1
    If $var = 0
        Send("{CTRL}")
    EndIf
WEnd

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

Func _pause()
    Switch $var
        Case $var = 1
            $var = 0
        Case $var = 0
            $var = 1
    EndSwitch
EndFunc

You need to change it because this way it wont work in your script :)

--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Link to comment
Share on other sites

I can try but in your script i dont see where you want to send CTRL ...

--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Link to comment
Share on other sites

  • Developers

Global $var = 0
While 1
    If $var = 0
        Send("{CTRL}")
    EndIf
WEnd

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

Func _pause()
    Switch $var
        Case $var = 1
            $var = 0
        Case $var = 0
            $var = 1
    EndSwitch
EndFunc

You need to change it because this way it wont work in your script :(

Need to do the HotKeySet before the While...Wend loop :)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Oh ^^

damnit xD

--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Link to comment
Share on other sites

I can try but in your script i dont see where you want to send CTRL ...

--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Link to comment
Share on other sites

Okay its:

I play a Game, and to Heal someone i have to hold CTRL all the time, but the problem is, i have to press CTRL and then press F1-F12 for the skills. So i took some Ducktape to tape the CTRL down, but that sucks :) i just want something: Press PAUSE -> CTRL is on, press PAUSE again, its off, press again -> on....

Link to comment
Share on other sites

i only modified to soot your needs .. credits.. smoken

Global $StopIt, $Pause
HotKeySet('{Pause}', 'PauseMacroFromPoint')

While 1
    Sleep(100000)
WEnd

Func PauseMacroFromPoint()
    $Pause = NOT $Pause
    While $Pause
       send('{lctrl}')
    WEnd
EndFunc
Edited by slightly_abnormal
Link to comment
Share on other sites

Narg didnt found it in helpfile narg ^^

--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Link to comment
Share on other sites

  • Developers

i dont want a repeated CTRL pressing, i want it down for the whole time...

... so ... did you try it ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

i dont want a repeated CTRL pressing, i want it down for the whole time...

did you try {CTRLDOWN} ?

[blatantsarcasm]I LOVE greedy noobs who aren't at all appreciative of the veterans. LOVE[/blatantsarcasm]

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Link to comment
Share on other sites

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

Global $toggle = False

While 1
    Sleep(10000)
WEnd

Func _CtrlToggle()
    $toggle = Not $toggle
    If $toggle Then
        Send("{CTRLDOWN}")
    Else
        Send("{CTRLUP}")
    EndIf
EndFunc

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