#If WinActive("ahk_class IEFrame") && GetWinText("mywebname.com/dir/fileprefix")

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Visioneer
Posts: 140
Joined: 07 Oct 2013, 18:51

#If WinActive("ahk_class IEFrame") && GetWinText("mywebname.com/dir/fileprefix")

29 Aug 2017, 13:27

Hi,

This works great but if I press other hotkeys that would also pertain to ahk_class IEFrame
while these pages are running, things break. I have to exit program to get the initial running
of the web page(s) again.

I do not want to revisit many many hotkeys throughout my program that pertain to
ahk_class IEFrame. I might like to suspend or ignore all those other hotkeys somehow.
In other words, for this WinActive case, I want these, and only these hotkeys to be active
exclusively. Is that possible?

#If WinActive("ahk_class IEFrame") && GetWinText("mywebname.com/dir/fileprefix")

;lots of hotkeys that do work go here nicely.

#IfWinActive

Code: Select all

GetWinText(t) {
	WinGetText, wText, A
	Return RegExMatch( wText, "s)" t )
}
I guess I could use Listhotkeys to find all possible hotkeys that could apply, and enter
hotkeyname ::return
for all of them. But Listhotkeys does not tell me anything about the class they apply to.

Is there a quick way to temporarily disable all hotkeys for a class
in the if #WinActive and then define the new ones in #IfWinActive
and have the original ones re-activate when the If #WinActive
no longer is active?

Thanks

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Starker and 284 guests