WinMaximize??? Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
PepeLapiu
Posts: 12
Joined: 19 Jun 2020, 14:06

WinMaximize???

10 Jul 2020, 16:30

Hey guys. Here's the code I have written:

Code: Select all

SetTitleMatchMode, 2
WinActivate, Thunderbird
WinMaximize, Thunderbird
WinWaitActive, Thunderbird
Click, 178, 127 Left, Down
Click, 178, 127 Left, Up
WinActivate, [email protected] - Mozilla Thunderbird ahk_class MozillaWindowClass
Click, 150, 148 Left, Down
Click, 150, 148 Left, Up
WinActivate, Inbox - Mozilla Thunderbird ahk_class MozillaWindowClass
Click, 150, 187 Left, Down
Click, 150, 187 Left, Up
WinActivate, Hodl New Trades - Mozilla Thunderbird ahk_class MozillaWindowClass
Click, 486, 159 Left, Down
Click, 487, 159 Left, Up
Click, 751, 876 Left, Down
Click, 751, 876 Left, Up
WinActivate, Firefox
WinMaximize, Firefox
The script does exactly what I want it to do, except for the last two commands. It activates Thunderbird, maximizes it, and clicks on a link in the latest email received in a specific folder.

But I would like it to open that link in Firefox and maximize Firefox. Instead it just clicks on the link, and nothing happens. What's wrong?
Last edited by BoBo on 10 Jul 2020, 16:46, edited 1 time in total.
Reason: Added [code][/code]-tags.
Rohwedder
Posts: 3252
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: WinMaximize???  Topic is solved

11 Jul 2020, 03:15

Hallo,
apparently you have chosen the Explorer option "Single click to open an item (show to select)".
Only a try:

Code: Select all

SetTitleMatchMode, 2
WinActivate, Thunderbird
WinWaitActive, Thunderbird
WinMaximize, Thunderbird
Click, 178, 127 Left
WinActivate, [email protected] ahk_exe thunderbird.exe
Click, 150, 148 Left
WinActivate, Inbox ahk_exe thunderbird.exe
Click, 150, 187 Left
WinActivate, Hodl New Trades ahk_exe thunderbird.exe
Click, 486, 159 Left
Sleep, 200
Click, 751, 876 Left
Sleep, 200
WinWaitActive, ahk_exe firefox.exe
WinMaximize, ahk_exe firefox.exe
Firefox and Thunderbird both have ahk_class MozillaWindowClass but different ahk_exe.
PepeLapiu
Posts: 12
Joined: 19 Jun 2020, 14:06

Re: WinMaximize???

11 Jul 2020, 08:15

Thank you. I will try it as soon I get to my windows PC. And what are the "Sleep, 200" commands for? Do I really need them? I don't understand why the script needs to pause at this point.
Rohwedder
Posts: 3252
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: WinMaximize???

11 Jul 2020, 08:28

If something might take time, always insert Sleeps first.
If everything works as it should, try it without.

Return to “Ask For Help”

Who is online

Users browsing this forum: BIGZIPZ, boiler, doubledave22, Google [Bot], HelpmePLEASE, JaydeNpie, jvlz, Smile_ and 47 guests