Search found 12 matches

by subzero
30 Nov 2021, 04:06
Forum: Ask for Help (v1)
Topic: Copy link url
Replies: 0
Views: 484

Copy link url

Is there an AHK command to copy the link address of a link that the cursor is over? I will be using it for the start of a script to open links in a specific edge profile.
by subzero
04 Sep 2021, 02:11
Forum: Ask for Help (v1)
Topic: Run command when mouse is at edge of screen
Replies: 1
Views: 361

Run command when mouse is at edge of screen

not sure if this is possible but I would like an audio file to play when the mouse is at the far-right edge of the screen for over 300ms, reason being that is when my sidebar pops in. can this be done?
by subzero
27 Jun 2021, 08:39
Forum: Ask for Help (v1)
Topic: Press/held commands
Replies: 5
Views: 277

Re: Press/held commands

You can’t use the ternary operator in this case — at least not unless you create a function that would be called as part of an expression instead of trying to insert a command. Just use regular if/else: ~^c:: SoundPlay, C:\Sound.wav KeyWait, c, T.5 if ErrorLevel { SendInput, ^x SoundPlay, C:\Sound....
by subzero
27 Jun 2021, 04:48
Forum: Ask for Help (v1)
Topic: Press/held commands
Replies: 5
Views: 277

Re: Press/held commands

KeyWait is looking for a single key to be identified, not a key combination. Change it to just c . That doesn’t mean you're hotkey has to change. It just means it won’t be waiting for Ctrl to be released. If you really want to wait for both, you can follow it with another KeyWait. Thanks! I've made...
by subzero
25 Jun 2021, 05:06
Forum: Ask for Help (v1)
Topic: Press/held commands
Replies: 5
Views: 277

Press/held commands

I would like to be able to run a command when CTRLC is pressed, and another when CTRLC is held. I would also like a sound to play. My attempt so far is this: ~^c:: SoundPlay, C:\Sound.wav KeyWait, ^c, T.5 Run, % ErrorLevel ? "D:\Command1" : "D:\Command2" KeyWait, ^c return I'm getting an error on th...
by subzero
20 May 2021, 02:55
Forum: Ask for Help (v1)
Topic: Key Press/Held Command
Replies: 5
Views: 419

Re: Key Press/Held Command

mikeyww wrote:
18 May 2021, 21:43

Code: Select all

F12::
KeyWait, F12, T.5
If ErrorLevel
 Send {F11}
Else Run, https://www.autohotkey.com/
KeyWait, F12
Return
worked, thanks again!
by subzero
18 May 2021, 21:08
Forum: Ask for Help (v1)
Topic: Key Press/Held Command
Replies: 5
Views: 419

Re: Key Press/Held Command

I would also like a variation on this, where instead of launching notepad, it presses "F11", is this possible?
by subzero
18 May 2021, 20:12
Forum: Ask for Help (v1)
Topic: Key Press/Held Command
Replies: 5
Views: 419

Re: Key Press/Held Command

mikeyww wrote:
18 May 2021, 08:22

Code: Select all

F12::
KeyWait, F12, T.5
Run, % ErrorLevel ? "notepad.exe" : "https://www.autohotkey.com/"
KeyWait, F12
Return
thanks, thats worked!
by subzero
18 May 2021, 07:57
Forum: Ask for Help (v1)
Topic: Key Press/Held Command
Replies: 5
Views: 419

Key Press/Held Command

I would like a script that when I press F12 it will open a URL and when I hold down F12 for 0.5 seconds it will open notepad instead of the URL. I've got this partially working, but I can't figure out how to prevent it opening the URL when it is held down to open notepad. My attempt for your conside...
by subzero
17 Apr 2021, 23:13
Forum: Ask for Help (v1)
Topic: script to run upon the file being opened
Replies: 1
Views: 100

script to run upon the file being opened

Is there a way to get an autohotkey script to run upon the file being opened, then resetting/closing? I want to have a script that when opened will press the "Alt" key, then reset/close ready for the next use. The only method I have to activate it is by opening the file, not by using keyboard shortc...
by subzero
04 Apr 2021, 02:53
Forum: Ask for Help (v1)
Topic: alternating commands Topic is solved
Replies: 2
Views: 133

Re: alternating commands Topic is solved

mikeyww wrote:
03 Apr 2021, 20:05
Adjust as needed.

Code: Select all

F1::Send % (toggle := !toggle) ? "1" : "2"
thanks!
by subzero
03 Apr 2021, 18:59
Forum: Ask for Help (v1)
Topic: alternating commands Topic is solved
Replies: 2
Views: 133

alternating commands Topic is solved

Hi, I'm having difficulty figuring out how to create an alternating command and would appreciate any help. Basically if I press F1 once, I want it to then do <^<+<!1 If I press is again, I want it to then do <^<+<!2 If I press a third time, i want it to go back to <^<+<!1 etc etc thanks in advance

Go to advanced search