Dang.
I guess I didn't try hard enough in my attempts (didn't try gosub).
I will definitely be using this. Tyvm
Search found 20 matches
- 01 Mar 2023, 16:00
- Forum: General Discussion
- Topic: AHK_X11, AutoHotkey for Linux
- Replies: 18
- Views: 60147
- 27 Feb 2023, 12:59
- Forum: General Discussion
- Topic: AHK_X11, AutoHotkey for Linux
- Replies: 18
- Views: 60147
Re: AHK_X11, AutoHotkey for Linux
I've been using this and Autokey to try and fill the role that AutoHotKey serves when I use Windows. However, there was one function that I couldn't replicate, https://www.autohotkey.com/board/topic/15574-morse-find-hotkey-press-and-hold-patterns/ . The function executes different commands based on ...
- 05 Dec 2022, 11:10
- Forum: Other Utilities & Resources
- Topic: ChatGPT to write AHK code
- Replies: 2
- Views: 2807
ChatGPT to write AHK code
Haven't experimented too much, but what I've seen so far is incredible. I could definitely see this being useful to people who are new to AHK and unfamiliar with the syntax. Take the following for example: firefox_yQovOxfp2s.png Running again produced: firefox_ew9bIT9A8e.png When compared to the res...
- 17 Nov 2022, 16:36
- Forum: Ask for Help (v1)
- Topic: Trying to break a loop with e.g. ctrl+key but it doesn't work, any options? Topic is solved
- Replies: 7
- Views: 556
Re: Trying to break a loop with e.g. ctrl+key but it doesn't work, any options? Topic is solved
Code: Select all
$^+!0::
- 17 Nov 2022, 15:36
- Forum: Ask for Help (v1)
- Topic: Trying to break a loop with e.g. ctrl+key but it doesn't work, any options? Topic is solved
- Replies: 7
- Views: 556
Re: Trying to break a loop with e.g. ctrl+key but it doesn't work, any options? Topic is solved
@RussF That version is better
Still learning stuff myself.
Still learning stuff myself.
- 17 Nov 2022, 15:09
- Forum: Ask for Help (v1)
- Topic: Trying to break a loop with e.g. ctrl+key but it doesn't work, any options? Topic is solved
- Replies: 7
- Views: 556
Re: Trying to break a loop with e.g. ctrl+key but it doesn't work, any options? Topic is solved
Code: Select all
v::
{
Togg := !Togg
SetTimer, trig, -20
Return
}
trig:
If(Togg)
{
Send {LButton}
SetTimer, trig, -20
}
Return
Edit: Changed to negative so the timer doesnt run continuously. oops
- 17 Nov 2022, 14:52
- Forum: Ask for Help (v1)
- Topic: Format the wikicode of infoboxes… Topic is solved
- Replies: 7
- Views: 688
Re: Format the wikicode of infoboxes… Topic is solved
^i:: ^x regex := "O)\s*\|\s*(.*?)\s*=\s*(.*)", width := 1 Loop, Parse, Clipboard, `n, `r If RegExMatch(A_LoopField, regex, _) width := Max(width, StrLen(_[1])) Loop, Parse, Clipboard, `n, `r If RegExMatch(A_LoopField, regex, _) out .= Format(" | {:-" width "} = {2}", _[1],_[2]) "`n" else out .= A_L...
- 16 Nov 2022, 13:14
- Forum: Ask for Help (v1)
- Topic: Format the wikicode of infoboxes… Topic is solved
- Replies: 7
- Views: 688
Re: Format the wikicode of infoboxes… Topic is solved
length := 20 FileRead, .txt ; Fill in here with text file to parse stuff := [] While RegExMatch( , "O)\n\|(.*)=(.*)", m, prevPos ? prevPos : 1) { ; and put the output var here str := " | " m.Value(1) Loop, % length - m.len(1) str .= A_Space str .= "= " m.Value(2) stuff .= str prevPos := m.Pos() + m...
- 16 Nov 2022, 12:06
- Forum: Ask for Help (v1)
- Topic: Format the wikicode of infoboxes… Topic is solved
- Replies: 7
- Views: 688
Re: Topic is solved
I'm not very good with regex, but here's a start. Idk how to get the tabs to align like in the example.
https://regex101.com/r/eQ1R0Y/1
https://regex101.com/r/eQ1R0Y/1
- 16 Nov 2022, 11:38
- Forum: Ask for Help (v1)
- Topic: Use AHK to play audio for set periods of time Topic is solved
- Replies: 7
- Views: 612
Re: Use AHK to play audio for set periods of time Topic is solved
FileSelectFolder, OutputVar, , 3 if OutputVar = { MsgBox, You didn't select a folder. Return } else { files = Loop %OutputVar%\*.mp3 { files = %files%`n%A_LoopFileName% } MsgBox % files Return } To get you started :D Right now it just gets all the mp3's in a folder and lists them LoopFile Edit: For...
- 15 Nov 2022, 07:53
- Forum: Ask for Help (v1)
- Topic: Use AHK to play audio for set periods of time Topic is solved
- Replies: 7
- Views: 612
Re: Use AHK to play audio for set periods of time Topic is solved
Using the Window Spy you can get info on the mpv window. You would then want to put some of that info into the WinActivate command (Scroll to the bottom of the docs for more examples). An example, since mpv probably has a changing title (not sure I don't use mpv) would be: WinActivate, ahk_exe cmd.e...
- 14 Nov 2022, 23:26
- Forum: Ask for Help (v1)
- Topic: Updating text in GUI with coordinates Topic is solved
- Replies: 2
- Views: 295
Re: Updating text in GUI with coordinates Topic is solved
I definitely would not have thought of that!
TYVM
TYVM
- 14 Nov 2022, 22:26
- Forum: Ask for Help (v1)
- Topic: Updating text in GUI with coordinates Topic is solved
- Replies: 2
- Views: 295
Updating text in GUI with coordinates Topic is solved
I'm trying to update a gui with text "Coordinates: (x1, y1)(x2, y2)", but only the first coordinates are showing, despite the MsgBox of the variable showing the correct output. Gui, clippos:-Caption +Disabled +ToolWindow Gui, clippos:Font, s15 Gui, clippos:Add, Text, cWhite vselrect, "Coordinates: (...
- 14 Nov 2022, 17:18
- Forum: Ask for Help (v1)
- Topic: Use AHK to play audio for set periods of time Topic is solved
- Replies: 7
- Views: 612
Re: Use AHK to play audio for set periods of time Topic is solved
If my understanding is correct you want to focus the command prompt and send shift + q? You can use the WinActivate command to accomplish this. Since the title of the command prompt changes, you'd use something like "ahk_exe cmd.exe" to refer to the cmd prompt ( Wintitle ). That info btw being acces...
- 12 Nov 2022, 19:46
- Forum: Ask for Help (v1)
- Topic: What do you use for macro submenus?
- Replies: 0
- Views: 216
What do you use for macro submenus?
Hi, It's a very simple thing, but I was wondering how others were making submenu's in macros and if I could make improvements to mine. Like maybe you use gdip, or something instead of inputhook. https://www.youtube.com/watch?v=y2JqtUk25g0 <-- an different example using Menu Here is what I've been do...
- 09 Nov 2022, 12:21
- Forum: Ask for Help (v1)
- Topic: Escaping characters for a Command Line Statement Topic is solved
- Replies: 3
- Views: 296
Re: Escaping characters for a Command Line Statement Topic is solved
I added 2 escaped quotation marks and it worked perfectly! :dance: cmd := """D:\Program Files 2\Capture2Text (OCR)\Capture2Text_CLI.exe"" --clipboard -s " x1 " " y1 " " x2 " " y2 Final: cmd := """D:\Program Files 2\Capture2Text (OCR)\Capture2Text_CLI.exe"" --clipboard -s "" " x1 " " y1 " " x2 " " y2...
- 09 Nov 2022, 11:54
- Forum: Ask for Help (v1)
- Topic: Escaping characters for a Command Line Statement Topic is solved
- Replies: 3
- Views: 296
Escaping characters for a Command Line Statement Topic is solved
Hi, I'm probably getting the quotation marks wrong, but I can't figure out how to get it right. I'm trying to prevent "clipboard" from being understood as A_Clipboard and also have quotations around the 4 numbers stored in variables. Which is proving to be quite a headache This is what I have so far...
- 28 Oct 2022, 18:13
- Forum: Ask for Help (v1)
- Topic: Finding DLL's to use
- Replies: 1
- Views: 224
Re: Finding DLL's to use
To reword what I was asking before: How did they know the functions they needed were in avicap32? What kind of search query or website could I use to find the right DLL for the task? But... I think? I kind of found the answer myself :P https://learn.microsoft.com/en-us/windows/win32/api/ I saw this ...
- 26 Oct 2022, 12:23
- Forum: Ask for Help (v1)
- Topic: switch bug
- Replies: 17
- Views: 1233
Re: switch bug
Code: Select all
df := 1
Switch df
{
case 0:
ToolTip, 1
Sleep 1000
return
case 1:
ToolTip, 2
Sleep 1000
return
}
- 26 Oct 2022, 09:39
- Forum: Ask for Help (v1)
- Topic: Finding DLL's to use
- Replies: 1
- Views: 224
Finding DLL's to use
Hi, How do I find the right DLL to use? (Sorry if this sounds stupid, I'm new to DLL calls) For instance if I wanted to control the webcam to take a photo. How would I go about finding a library with the functions I need? I tried using resource monitor on the default camera app, but that yields way ...