Jump to content

Recommended Posts

Posted (edited)

Hey,

This is what i am looking for:

I am looking for a script that will run in the background and every time i hold down the "4" key it will repeatedly press the "4" key for me every 0.2 seconds or so, but only when i hold the "4" key down. When i release it stops.

This is what i have so far:

hotkeyset ("{insert}", "quitscript")

while 1
send("4")
sleep(200)
wend

Func quitscript()
Exit
EndFunc

Its on the right track but it isnt linked to me holding down the "4" key, rather it just automatically repeatedly presses it with the script is turned on. I know i am new to autoIt but i greatly appreciate the help

Thank you,

Tartin

Edited by Tartin
Posted

#include  <Misc.au3>
hotkeyset ("{insert}", "quitscript")

while 1
if _IsPressed("34") then
sleep(200)
endif
wend

Func quitscript()
Exit
EndFunc

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Posted

alright, that script is not working with the program i am using it with. Would their be a way to change it so when i press the "4" key to repeatedly presses the "4" key, then when i press the "4" key again it will stop the repeated pressing of the "4" key.

Thank you,

Tartin

Posted

are you menting about something like a "PAUSE" button ?

HotKeySet("{delete}","pause")
Func pause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
    WEnd

EndFunc

if you need something like this, please tell me then i can give you a correct one with your script

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Posted (edited)

  d4rk said:

are you menting about something like a "PAUSE" button ?

HotKeySet("{delete}","pause")
Func pause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
    WEnd

EndFunc

if you need something like this, please tell me then i can give you a correct one with your script

ya, having the pause and unpause set to the 4 key or any key really would be fine to repeadily press the "4" key should work perfect i believe (setting the 4 key as the pause and unpause would be the easiest)

Thanks again

Tartin

Edited by Tartin
Posted

is this what you mean ? press "4" first time to pause the script, put it again to continue

HotKeySet("4","pause")
Func pause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
    WEnd
EndFunc

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Posted (edited)

yes, that should work hopefully. Let me try it out. sorry i am so new to autoit, it looks like i am reading russian

Thanks,

Tartin

Edited by Tartin
Posted

that last function that you posted D4rk doesnt work for some reason at all. I do not get an error, but it does not show up on my task bar

Tartin

Posted (edited)

#Include <misc.au3>

While 1
    GUIGetMsg()
        While _IsPressed(Hex(52))
            BlockInput(1)
            Sleep(2000)
            Send("4")
            Sleep(2000)
        WEnd
            BlockInput(0)
WEnd

Try this.

Edited by redsleeves
Posted

  redsleeves said:

#Include <misc.au3>

While 1
    GUIGetMsg()
        While _IsPressed(Hex(52))
            BlockInput(1)
            Sleep(2000)
            Send("4")
            Sleep(2000)
        WEnd
            BlockInput(0)
WEnd

Try this.

That works! awesome man, thank you so much

Tartin

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