Instead of sending a mouse-click, you could try sending a left-mouse-button, but first you need to move the cursor manually: MouseMove 42,191,0 Immediately move the cursor relative to the active windowĪs for ControlSend, note that it specifically says: You can specify the mode for the Click command and the generic Send command (which default to Event), or you can specify the mode explicitly ( Play is recommended for stubborn programs and games): Send Click 42,191 defaults to Event Try each one until you find one that works for your program. There are numerous ways to emulate a mouse-click. SetTitleMatchMode, 3 Match the titlebar of the Window exactly most restrictive but fewer false-matches SetTitleMatchMode, 2 Match any part of the titlebar easiest but most false-matches Have you confirmed that you are accessing the correct window? Does the program’s titlebar actually say exactly Championship Manager 01/02? Try a test with a simple script to verify: #IfWinActive, Championship Manager 01/02īy default, you need to match the text of the target window’s titlebar exactly, but you can use a different matching mode: SetTitleMatchMode, 1 Match the start of the Window’s titlebar easier but more false-matches In your case, I would recommend the # version of IfWinActive it makes it so that the hotkeys only exist for the target window and simplifies the code. You can use different commands to achieve the app-specific behavior you want. Coordinates are relative to the active window by default, but you can specifically set it as well.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |