Search found 35 matches

by Meroveus
29 Jul 2020, 12:15
Forum: Ask For Help
Topic: How to get a list of open tabs in Firefox
Replies: 3
Views: 916

How to get a list of open tabs in Firefox

I can send Ctrl-Tab or Ctrl-PgUp or Ctrl-PgDn and cycle through the tabs, but that takes a fair bit of time, and also changes the active tab. Once I have the list, is there any known way to activate a specific tab? I've also thought of opening each tab in its own window, but that has a memory cost. ...
by Meroveus
05 Jun 2020, 23:32
Forum: Ask For Help
Topic: How do I insert a character every X characters in a string? Topic is solved
Replies: 4
Views: 182

Re: How do I insert a character every X characters in a string? Topic is solved

haystack := 1234567890 NewStr := RegExReplace(haystack,"(\d{2}?)",Replacement := "$1,") If ErrorLevel MsgBox % ErrorLevel MsgBox % NewStr It would need to be modified a bit, because if the original string length is odd, then the output would look like 12,34,56,78,9 See https://www.autohotkey.com/do...
by Meroveus
05 Jun 2020, 17:10
Forum: Ask For Help
Topic: how do i make my hotkey ignore all other ongoing hotkeys?
Replies: 2
Views: 157

Re: how do i make my hotkey ignore all other ongoing hotkeys?

Your k:: hotkey returns with the control key down.
after that, the p:: hotkey cannot fire, because it is never received -- only ^p is sent from that point on.
by Meroveus
05 Jun 2020, 00:01
Forum: Ask For Help
Topic: Error opening the destination file.
Replies: 2
Views: 129

Re: Error opening the destination file.

Here's a couple of things to check:
  • Does the .exe already exist? If so, is it running, or is it read-only?
  • Are you running the compiler as admin?
by Meroveus
24 May 2020, 15:45
Forum: Ask For Help
Topic: Run more than one thread, timer?
Replies: 3
Views: 206

Re: Run more than one thread, timer?

One-shot timer SetTimer,Main,5000 Main() { ;do something every 5 seconds If SomeCondition { SetTimer,OneShot,1000 } ;do more stuff } OneShot() { ;Do whatever you like in here SetTimer,OneShot,Off } For example, I have a timer loop that checks a variety of windows for various attributes. It runs onc...
by Meroveus
23 May 2020, 20:17
Forum: Ask For Help
Topic: Split String by RegEx Topic is solved
Replies: 11
Views: 698

Re: Split String by RegEx Topic is solved

Can you give an example of what you want?
The question is a little vague.

Could you not just use SubStr() ?

I did a search on "split a string using regular expression" and got a host of replies, but there's no way to tell if any of them would help.
by Meroveus
23 May 2020, 10:32
Forum: Ask For Help
Topic: Problems with global hotkey for Tidal
Replies: 2
Views: 216

Re: Problems with global hotkey for Tidal

Does Tidal have more than one window? If it does, then your code sends a space to all of them. if there is only one, and always only one then f8:: DetectHiddenWindows, On Tidal_ID := WinExist("ahk_exe Tidal.exe") If Tidal_ID { SetKeyDelay,-1,50 ControlSend,ahk_parent, {space}, ahk_id %Tidal_ID% ) re...
by Meroveus
22 May 2020, 00:04
Forum: Ask For Help
Topic: Simple GUI Help
Replies: 2
Views: 178

Re: Simple GUI Help

This might apply to you: https://www.autohotkey.com/docs/commands/Gui.htm#New Specifically: If GuiName is specified, a new GUI will be created, destroying any existing GUI with that name. Otherwise, a new unnamed and unnumbered GUI will be created. If you want to have two or more, you need to give e...
by Meroveus
21 May 2020, 15:48
Forum: Ask For Help
Topic: Detect file change Topic is solved
Replies: 35
Views: 2145

Re: Detect file change Topic is solved

Boom!
That is what I had been remembering...
by Meroveus
21 May 2020, 11:35
Forum: Ask For Help
Topic: Detect file change Topic is solved
Replies: 35
Views: 2145

Detect file change Topic is solved

The plan is to open a file for reading Read the file and extract the last occurrence of a specific string using regexp Save the position of the file pointer Since it is the log file of another application, it will be changed by the other program. When that happens, I want to be notified that it has ...
by Meroveus
20 May 2020, 17:05
Forum: Ask For Help
Topic: Unable to use Send to send a windows key combination Topic is solved
Replies: 4
Views: 333

Re: Unable to use Send to send a windows key combination Topic is solved

I have managed to reliably send OBS hotkeys to OBS using AHK gregster suggested using SetKeyDelay which turned out to be part of the solution. The other part was using ControlSend See this thread for code that works https://www.autohotkey.com/boards/viewtopic.php?p=329921#p329921 Also note that in t...
by Meroveus
20 May 2020, 11:26
Forum: Ask For Help
Topic: Windows Default Beep sound occurs unexpectedly
Replies: 2
Views: 166

Re: Windows Default Beep sound occurs unexpectedly

its not AHK its windows, try this I would hate to turn off the default beep since it can be useful as an indication that we've done something incorrectly. Your reply put me on the right track though... Since it only happens when I send alt - numpad combos, it occurred to me that windows was interpr...
by Meroveus
20 May 2020, 11:19
Forum: Ich brauche Hilfe
Topic: OBS und AHK
Replies: 6
Views: 532

Re: OBS und AHK

The information in this post should get you started: https://www.autohotkey.com/boards/viewtopic.php?p=329921#p329921 Note that identifying OBS by its ahk_class is unreliable if you pop out some of the control panels. So far the regex method of identifying the main window has worked properly since v...
by Meroveus
20 May 2020, 01:06
Forum: Ask For Help
Topic: Windows Default Beep sound occurs unexpectedly
Replies: 2
Views: 166

Windows Default Beep sound occurs unexpectedly

I am using AHK to send hotkeys to OBS This was problematic at first, but using this function below, it is almost working flawlessly SendKeyOBS(Key) { tDelay := 250 ;ms If OBSHWND { ;OBSHWND is a global used by a variety of functions ;use WinExist to establish the LastFoundWindow If (WinExist("ahk_id...
by Meroveus
19 May 2020, 14:56
Forum: Ask For Help
Topic: Automatically Switching Scenes in OBS
Replies: 10
Views: 8021

Re: Automatically Switching Scenes in OBS

Nvm figured out the error: Loop, { ControlSend,,{F5},ahk_class Qt5QWindowIcon Sleep 5000 ControlSend,,{F6},ahk_class Qt5QWindowIcon Sleep 5000 ControlSend,,{F7},ahk_class Qt5QWindowIcon Sleep 5000 } Break:: Pause,Toggle Return It must've been the way I didn't set the comma after 'Loop', hope this h...
by Meroveus
13 May 2020, 21:13
Forum: Ask For Help
Topic: Autohotkey and OBS
Replies: 2
Views: 201

Re: Autohotkey and OBS

If you check my other thread: https://www.autohotkey.com/boards/viewtopic.php?p=328717#p328717 You'll see I had a similar problem. There is a peculiarity in the way OBS_Studio handles hotkeys. Even though you can type the keystrokes yourself when any window is active, if you send them from an AutoHo...
by Meroveus
13 May 2020, 20:57
Forum: Ask For Help
Topic: Unable to use Send to send a windows key combination Topic is solved
Replies: 4
Views: 333

Re: Unable to use Send to send a windows key combination Topic is solved

Whether OBS_Studio is running as admin or not, Hotkeys sent from an AHK script will not be recognized unless OBS_Studio is the active window at the time the keys are sent. In my case AHK must always run as admin since I move windows around. To ensure this, I have this at the top of every script wher...
by Meroveus
13 May 2020, 15:38
Forum: Ask For Help
Topic: Unable to use Send to send a windows key combination Topic is solved
Replies: 4
Views: 333

Unable to use Send to send a windows key combination Topic is solved

An application (OBS_Studio) has user-defined hotkeys I defined #{Numpad9} to activate a certain scene It works, regardless of the current active window, when typed at the keyboard #{Numpad9} is not an existing hotkey in any other application or AHK script. ;attempt 1 SendInput, #{Numpad9} ;attempt 2...
by Meroveus
13 May 2020, 15:22
Forum: Ask For Help
Topic: Autohotkey and OBS
Replies: 2
Views: 201

Re: Autohotkey and OBS

now finally my question... Can I make a hotkey that only work in a program? As I say, I want to press a button in my second keyboard and that sent a hotkey to obs, but I don't want to the key interfere with my game for example, if I press "A" on my 2nd keyboard, the Autohotkey will type something l...
by Meroveus
09 May 2020, 15:02
Forum: Ask For Help
Topic: Phantom Function parameters when calling a function from a GUI control
Replies: 1
Views: 130

Phantom Function parameters when calling a function from a GUI control

;adds a button in a specific location that calls function PlayClip(clip) Gui, Main:Add, Button, w%btnW% xm y+m gPlayClip, %fName% ;prior to v9.4.4 g-label was PlaySound ;Function PlayClip is called from elsewhere in the script so it takes a parameter: PlayClip(clip) { OutputDebug % Format("[{}][{}]...

Go to advanced search