Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Setting Hotkeys for Windows with Different Titles

$
0
0
Hey all; thanks in advance for any help.

I'm working on a hotkey macro for a program I use for work; I haven't started coding yet, just sort of rough outlining pseudocode while I research different AutoIt functions.

I know I want to use ControlClick for selecting the applications functions, but it looks like ControlClick requires the window title.  The problem is the application i'm using changes the window title based on the file that I'm editing.  It looks like I can use WinGetTitle and save the current title as a string, which I can input into the ControlClick command.  Correct me if I'm wrong, but as I understand it I start the script, then it's running that while loop in the background, waiting for any of the hotkey functions that I've set; Since WinGetTitle only acts on the active window, will I need to insert it into every single function that I have hotkeys mapped to? I can't declare/run it at the beginning of the program, since when I start the script my active window is not the application I'm working in - does that sound correct?

Also a secondary question if anyone has the time, I'm looking for a way such that the script is constantly running, but is only active when the specific window/application is open.  Is there a way to activate only when you activate a window, and have it idle the background while you're working in other windows?

Thanks again.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>