Page 1 of 1

I just would like a simple spam F1 key script

Posted: 26 Jan 2019, 10:14
by spongee325
Hi i'm just requesting some help if anyone could kindly help me i would gladly appreciate it..
I'm just wondering if anyone knows how to create a small script that will spam the F1 key.
Or this, i found this key spamming script on the forums here and i'm wondering-
If it can be modified to spam the F1 key instead of the e key. Here's the script i already have below.
I would appreciate any help thank you all :D .

F3::
If State=100
State=Off
else
State=100
SetTimer SendKey, %State%
Return

SendKey:
Send e
Return

Re: I just would like a simple spam F1 key script

Posted: 26 Jan 2019, 11:04
by gonzoson
F3::
If State=100
State=Off
else
State=100
SetTimer SendKey, %State%
Return

SendKey:
Send F1
Return

Re: I just would like a simple spam F1 key script

Posted: 26 Jan 2019, 11:29
by Scr1pter
Yes, change e by {F1}.

I didn't test it, but if you say it works,
then this one should work too.

Cheers!

Re: I just would like a simple spam F1 key script  Topic is solved

Posted: 26 Jan 2019, 12:01
by deloren
Your script:

Code: Select all

F3::
If State=100
State=Off
else
State=100
SetTimer SendKey, %State%
Return

SendKey:
Send {F1}
Return
each special key name must be enclosed in braces.

I'm personally using this loop for any repeatable actions:

Code: Select all

YourHotkeyHere::
Toggle := !Toggle
Loop
{
 Send, {F1} ; or any code you want to repeat put in here 
 Sleep, 100
} Until Toggle = "0"
return

Re: I just would like a simple spam F1 key script

Posted: 26 Jan 2019, 12:53
by spongee325
Thank you guys for your help it works perfectly now.
I tried to think logically and just replace the e with just F1 only.
But i didn't know about the braces, that,s what made the difference and now it works perfect.
Again thank you all for all your help it was greatly appreciated :)