#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #KeyHistory 100 ; ***** Notes: ! = Alt | ^ = Ctrl | + = Shift | #=Win ;------------------------------------------------------------------------------------------------------------------------------------------------------ ;This might be monitor specific, but using the Window Spy feature of AHK, these are the coordinates for the boxes I got... ; Coord... | 310 | 363 | 416 | 469 | 522 | 575 | 628 | 681 | 734 | 787 | ; 1235 | ...all... | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | ; 1287 | 09 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | ; 1339 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | ; 1391 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | ;------------------------------------------------------------------------------------------------------------------------------------------------------ ; ***** Isolate Sub-Selection... ; ** The Windows key is perfect since it is not in AoE settings... ; * Control Click to isolate 1st box unit = Win+1 #1::Send ^{Click 416 1235} ; * Control Click to isolate 2nd box unit = Win+2 #2::Send ^{Click 469 1235} ; * Control Click to isolate 3rd box unit = Win+3 #3::Send ^{Click 522 1235} ; * Control Click to isolate 4th box unit = Win+4 #4::Send ^{Click 575 1235} ; * Control Click to isolate 5th box unit = Win+5 #5::Send ^{Click 628 1235} ; * Control Click to isolate 6th box unit = Win+6 #6::Send ^{Click 681 1235} ; * Control Click to isolate 7th box unit = Win+7 #7::Send ^{Click 734 1235} ; * Control Click to isolate 8th box unit = Win+8 #8::Send ^{Click 787 1235} ;------------------------------------------------------------------------------------------------------------------------------------------------------ ; ***** Remove Sub-Selection... (via Left Hand) ; * Shift Click to remove 1st box unit = Win+Tilda #`::Send {Shift down} {Click 416 1235}{Shift up} ;------------------------------------------------------------------------------------------------------------------------------------------------------ ; * Shift Click to remove 2nd box unit = Shift+Tilda ; **Make sure Shift+Tilda is not used in your remappable settings... +`:: Send {Shift down} {Click 469 1235} {Shift up} ;------------------------------------------------------------------------------------------------------------------------------------------------------ ; ***** All Military without dock Workaround: ; * Set "Select All Military Buildings" to Numpad0 only and remove F1 in Remappable Settings, then... ; * All Except for Ottoman = F1 F1::SendInput {Numpad0}{sleep 150}{Shift down}{Click 416 1235}{Shift up} ; * Only For Ottoman = Win+F1 ; ** The first building is now always the Military School and Dock is always second... #F1::SendInput {Numpad0}{sleep 150}{Shift down}{Click 469 1235}{Shift up} ;------------------------------------------------------------------------------------------------------------------------------------------------------