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

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
spongee325
Posts: 2
Joined: 26 Jan 2019, 09:07

I just would like a simple spam F1 key script

26 Jan 2019, 10:14

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
gonzoson
Posts: 5
Joined: 26 Jan 2019, 10:25

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

26 Jan 2019, 11:04

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

SendKey:
Send F1
Return
User avatar
Scr1pter
Posts: 1277
Joined: 06 Aug 2017, 08:21
Location: Germany

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

26 Jan 2019, 11:29

Yes, change e by {F1}.

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

Cheers!
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
deloren
Posts: 29
Joined: 17 Oct 2018, 11:03

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

26 Jan 2019, 12:01

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
spongee325
Posts: 2
Joined: 26 Jan 2019, 09:07

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

26 Jan 2019, 12:53

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 :)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee and 131 guests