How to make a script toggle from pressing a key?
-
- Posts: 16
- Joined: 21 Aug 2021, 02:30
How to make a script toggle from pressing a key?
Is it possible to do like if I press *r* it toggles the script file? [It would be usefull as I need to toggle at different places quickly]
Re: How to make a script toggle from pressing a key?
What do you mean with "toggle the script"?
If you want to toggle a specific hotkey, for example f1, you can write
Now you can use say f2 to toggle f1:
If you want to toggle a specific hotkey, for example f1, you can write
Code: Select all
f1Active:=true
#if f1Active
f1:: Msgbox F1 was pressed
#if
Code: Select all
f2:: f1Active:=not f1Active
-
- Posts: 16
- Joined: 21 Aug 2021, 02:30
Re: How to make a script toggle from pressing a key?
also wat is the default one to toggle it?
-
- Posts: 16
- Joined: 21 Aug 2021, 02:30
Re: How to make a script toggle from pressing a key?
Wats the default toggle shortcut?
-
- Posts: 16
- Joined: 21 Aug 2021, 02:30
Re: How to make a script toggle from pressing a key?
Uhm can we talk on discord as this is a bit buggy, my discord name: ItzPikachuOfficial#0542braunbaer wrote: ↑21 Aug 2021, 04:30What do you mean with "toggle the script"?
If you want to toggle a specific hotkey, for example f1, you can write
Now you can use say f2 to toggle f1:Code: Select all
f1Active:=true #if f1Active f1:: Msgbox F1 was pressed #if
Code: Select all
f2:: f1Active:=not f1Active
Re: How to make a script toggle from pressing a key?
What's buggy? I am not on Discord, sorry.
There is no default shortcut. In your script, you define the hotkeys you want to use.
Maybe you can try to explain what you want to achieve exactly.
-
- Posts: 16
- Joined: 21 Aug 2021, 02:30
Re: How to make a script toggle from pressing a key?
Can you help me with something else? [Leave this topic], how to make a specific line/program in a script run for a specific time?