Sign in to follow this  
Followers 0
TheRaZoR

Hold down CTRL for Ever

25 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

well i think iam to stupid >.<

can u insert it in here:

Global $Paused

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

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

WEnd

EndFunc

Send ("{PAUSE}")

Share this post


Link to post
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]

Share this post


Link to post
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 :(

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

arg :S

can someone send a script? iam such a noob, i just need that one :S

i need it in 10 minutes :S :)

Share this post


Link to post
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]

Share this post


Link to post
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....

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

are u sure?

i tested in Teamspeak.

i set the push to talk button to CTRL and normaly i should have a green light all the time, but its swtichting between on/off

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

doesnt rly work >.<

Line0 ( Fire "D:\AutoIt\Neu AutoIt v3 Script.exe"):

Global $toggle = False

Global $toggle = ^ ERROR

Error: Unknown function name.

Edited by TheRaZoR

Share this post


Link to post
Share on other sites

you probably need beta.. :)

Share this post


Link to post
Share on other sites

doesnt rly work >.<

Line0 ( Fire "D:\AutoIt\Neu AutoIt v3 Script.exe"):

Global $toggle = False

Global $toggle = ^ ERROR

Error: Unknown function name.

Change $toggle = False to just $toggle.

Share this post


Link to post
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
Sign in to follow this  
Followers 0