 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Jaegan
Joined: 12 Jul 2006 Posts: 21 Location: California
|
Posted: Sun Jul 16, 2006 2:25 am Post subject: WarCraft3 Scripts- Updated 8/20/06! |
|
|
For anyone who wants to be great at WarCraft3, excellent hotkeys and scripts are a must. Thanks to WarKeys I was able to solve the former problem, and seeing what autohotkey could do inspired me to solve the latter for myself. I am not a programmer, but I feel these scripts will still be useful in giving you an edge up in competitive play. Some of these scripts are not as efficient as they could be, and I will update as I refine them. Any help or advice you can give in this regard is needed, encouraged and appreciated.
A Note on my hotkeys:
Everyone’s hotkeys are different, so here is a brief explanation of mine. This will help give context to my script
Heroes:
q, w, e, r Passive, AOE, Nuke, Ult
a, s, d, f Hold, Move, Attack, Stop
z, x, c, v Nothing, Nothing, Hide, Learn Skill
Buildings:
q, w, e, r Train units in a building
a, s, d, f Upgrades
z, x, c, v Other Upgrades
My script has this at the top, you can modify as needed. If you know of any modification here that will make the script run better, let me know!
| Code: |
Process, priority, , High ; Have the script set itself to high priority
#IfWinActive Warcraft III
#InstallMouseHook
#SingleInstance force
#InstallKeybdHook
#UseHook On
SetBatchLines 10ms
#HotString SP
#MaxThreads 20
CoordMode, mouse, Screen
SetKeyDelay, 10, 0, Play
SetMouseDelay, 10 , Play
Healer=3 |
SCRIPT ONE: Command all control groups at once
| Code: |
Capslock & d::SendPlay, 1d{LButton}2d{LButton}3d{LButton}4d{LButton}5d{LButton}1
Capslock & S::SendPlay, 1s{LButton}2s{LButton}3s{LButton}4s{LButton}5S{LButton}1
Capslock & A::SendPlay, 1a{LButton}2a{LButton}3a{LButton}4a{LButton}5a{LButton}1
Capslock & F::SendPlay, 1f{LButton}2f{LButton}3f{LButton}4f{LButton}5f{LButton}1 |
Explanation: Simply hold down CAPSLOCK and all of your command groups will do whatever basic unit action you indicate. Control group 1 is automatically reselected after issuing the commands. In my case, Capslock and D makes all of my units move-attack wherever my cursor is, and Capslock and S moves all of my control groups to wherever my mouse is.
Strengths: This makes it very easy to move your whole army. You will never have to worry about leaving a control group behind again.
Weaknesses: The hold and stop commands still need mouse clicks for some reason. I don’t know why, since you don’t have to mouse click anywhere to issue the command, but without it your units won’t obey the command to stop/hold. Also, I have had trouble with the script going haywire if many macrocommands are issued in quick succession. Currently looking into Thread and Batch specs to solve the problem.
SCRIPT TWO: Use all hero abilities
| Code: | Capslock & e::SendPlay, {F1}e{LButton}{F2}e{LButton}{F3}e{LButton}1
Capslock & q::SendPlay, {F1}q{LButton}{F2}q{LButton}{F3}q{LButton}1
Capslock & w::SendPlay, {F1}w{LButton}{F2}w{LButton}{F3}w{LButton}1
Capslock & r::SendPlay, {F1}r{LButton}{F2}r{LButton}{F3}r{LButton}1 |
Explanation: Hold down Capslock before using a hero ability, and all heroes will use the ability associated with that key. Control group 1 is automatically reselected after issuing the commands. For example, my DeathKnight has E for Death Coil, my DreadLord has E for Carrion Swarm, and my Lich has E for Frost Nova. My pressing Capslock and e, all three heroes will instantly nuke whatever my cursor is over.
Strengths: Very easy to use, works like a charm, and you don’t have to cycle through your heroes to see who is on cooldown- just capslock and e, and whoever has a nuke ready will let it rip!
Weaknesses: This one seems rock solid. I can’t think of anything else this script should do nor anyway to improve it.
SCRIPT THREE: Paladin/Death Knight InstaHeal
| Code: |
;InstaHeal Script
RShift & 1::healer=1
RShift & 2::healer=2
RShift & 3::healer=3
' & 1::
' & 2::
' & 3::
if InStr(A_ThisHotkey, "1")
cy=59
else if InStr(A_ThisHotkey, "2")
cy=123
else cy=184
MouseGetPos, x, y
SendPlay, {F%healer%}e{Click 30, %cy%}{Esc}1
MouseMove, x, y
return |
Explanation: One of the scripts I am most proud of, yet the one that has the most area for improvement. My pressing Alt and 1 you heal the first hero you got, Alt and 2 the second hero you trained, and Alt and 3 the third hero. Control group 1 is automatically reselected after the heal command is issued.
IMPORTANT NOTE: This will only work if your healer was the third hero trained!
Strengths: Such a lifesaver that it can turn the game around. No more clicking around to heal your ArchMage with 50 hp left- just Alt and 1 and he is back at full!
XXXXXWeaknesses: Wow, where to begin? For starters, I had to resort to using Click instead of MoveMouse because I couldn’t get the command to work. Second, the script doesn’t move your mouse back to where it was when you issued the heal command, but sets it at the middle of your screen. Third, it only works if your healer was the last hero trained. The script is functional to be sure, but it has a long way to go before it is perfect.XXXXXXXX
EDIT: Thanks to JSLOVER, the script now works flawlessly. Press right shift and 1 2 or 3 (to assign your 1st, 2nd, or 3rd hero as healer) and press ' and 1 2 or 3 to heal that hero.I.E. If Paladin is your 2nd hero and you want to heal your 3rd hero, press Rshift 2 after picking the paladin second, and then press ' and 3 to heal the 3rd hero. Note that ' isn't terribly conveninet for most people, so you will want to assign it to somewhere that works for you. Additonaly, the mouse now returns to where you last had it before healing!
SCRIPT FOUR: Use the mouse wheel to go through control groups
| Code: | group = 1
maxgroup = 2
;LCtrl+number sets the "max group"
LCtrl & 1::maxgroup = 1
LCtrl & 2::maxgroup = 2
LCtrl & 3::maxgroup = 3
LCtrl & 4::maxgroup = 4
LCtrl & 5::maxgroup = 5
~1::group=1
~2::group=2
~3::group=3
~4::group=4
~5::group=5
*WheelDown::
group += 1
if(group > maxgroup)
group := group - maxgroup
if(group < 1)
group := group + maxgroup
send, %group%
return
*WheelUp::
group -= 1
if(group > maxgroup)
group := group - maxgroup
if(group < 1)
group := group + maxgroup
send, %group%
return |
Explanation: (I was not the original creator of this script!) Press LCtrl and the number of control groups you want to shuffle through. (Eg. LCtrl and 5 to shuffle through 5.) The mouse wheel will send you one control group up or down, depending on which way you scroll.
Strengths: Makes cycling through your control groups a walk in the park.
Weaknesses: XX AutoHotKey can’t detect when you leave one control group and select another manually. That mean that if you are on control group 4, and then select control group 1 using the “1” on your keyboard, scrolling down will take you to control group 5 rather than 2. XX
Edit 7/16/06:
Using the keyboard to select a control group will no longer cause any problems. If you are on control group 4 and then select control group 1 using the keyboard, scrolling down will now take you to group 2 (as it should) rather than group 5.
Thanks to JSLover, who solved the above problem
LCtrl (and a number) is now used to determine the number of control groups rather than tab. This solves a problem which prevented you from tabbing through different types of units within a control group.
SCRIPT FIVE: InstaTrain/Hero Revive
| Code: | MOUSE3 & Q::SendPlay, 6Q1
MOUSE3 & W::SendPlay, 6W1
MOUSE3 & E::SendPlay, 6E1
MOUSE3 & R::SendPlay, 6R1
MOUSE3 & A::SendPlay, 7Q1
MOUSE3 & S::SendPlay, 7W1
MOUSE3 & D::SendPlay, 7E1
MOUSE3 & F::SendPlay, 7R1
MOUSE3 & Z::SendPlay, 8Q1
MOUSE3 & X::SendPlay, 8W1
MOUSE3 & C::SendPlay, 8E1
MOUSE3 & v::SendPlay, 8R1 |
Explanation: The whole reason I started investigating autohotkey. To explain how this work, here is a little “diagram”
BARRACKS (Control Group 6)
q, w, e, r Footman, Rifleman, Knight, Nothing
ARCANE SANCTUARY (Control Group 7)
q, w, e, r Priest, Sorceress, Spellbreaker, Nothing
ALTAR (Control Group 8)
q, w, e, r Archmage, Mountain King, Paladin, Blood Mage
If I press mouse3 and q, I will instantly train a footman and return to control group 1. If I press mouse3 and d, I will instantly train a spellbreaker. If I press mouse3 and v, I will instantly train a blood mage, or revive him if he is dead.
Strengths: Training can’t be easier. You can devote all your energy to creeping or harassing, tap mouse3 and q once and a while, and always have a fresh army of footies.
Weaknesses: None, that I know of. I hope to do the same thing for army upgrades at some point, but because many building have more than four upgrades it isn’t nearly as easy.
SCRIPT SIX: Map manouevering made simple *NEW*
This script was grabbed from the old WarCraft 3 thread and tweaked a bit. This script allows you to use asdw as arrow keys to move the map while holding down spacebar.
w
a s d a=left d=right s=down w=up. Just like in a FPS.
| Code: | ;Screen Manipulation
space & w:: Send, {blind}{Up down}
space & w up::Send, {blind}{Up up}
space & a:: Send, {blind}{Left down}
space & a up::Send, {blind}{Left up}
space & s:: Send, {blind}{Down down}
space & s up::Send, {blind}{Down up}
space & d:: Send, {blind}{Right down}
space & d up::Send, {blind}{Right up}
;Disable accidental clicks *OPTIONAL*
space & q::return
space & e::return
space & r::return
space & f::return
space & z::return
space & x::return
space & c::return
space & v::return |
The discerning reader may ask, "How am I supposed to press the spacebar to jump to places then?" My answer is to use the key everyone loves to hate.
| Code: | | LWin::SendPlay, {Space} |
Make the useless left windows key atone for its sins by doing something useful!
The second part of the code above to disable accidental hotkey usage is optional. Personally, I recommend against using it. By allowing other keys to be pressed, you can still use your nukes (e) while following a hero with the keyboard movements.Otherwise you will have to release pressure from the spacebar, which is one more thing you will have to worry about.
Stengths:Easy to use, can be a life saves in some situations.
Weaknessess: Upon rare ocassion, the game gets stuck moving in one direction. This is usually easy to solve by temporarilly disabling the hotkeys or trying to solve it by pressing the spacebar and asdf again, but potentially it could cost you a game if it occured at the wrong time. I know of no fix to this problem.
SCRIPT SEVEN: Control Group Manipulation Made Easy *NEW*
Control group management is what seperates the pros from the rest of us in many cases- the pros never lever use a unit because they can quickly and effectively remove dying units from control groups and remove them from the fray, and also add new units without losing control of the battle. This script will help you do just that.
| Code: |
;ControlGroupManipulation
' & LButton::SendPlay, 0%Group%{LShift Down}{LButton}{LShift Up}{LControl Down}%Group%{LControl Up}9%Group% |
The way the script works is pretty simple. By pressing left click while holding down ', a unit is instantly added (or removed, from that control group. *The unit will be added to the last selected control group!* So if, for example, you see a footman in control group 2 is low, press 2 to select that control group if you haven't already, and then ' & LButton to take him out of the group, (after which, you probably want to send him somewhere safe.) As usual, pick a button that makes sense instead of '.
IMPORTANT NOTE: I have not yet tested this script in WarCraft, so there is a small chance it will not work. I will know with certainity if it works by tomorrow!
Strengths: Normally Getting somone out of a control group can take about 5 seconds of much needed micro, and it is easy to get jumbled trying to do it all at once. This takes care of it for you!
Weaknessess: Untested, and see below.
Areas for Future Development:
Control click selects all units of a given type, and I would like to develop a script that automatically adds all of said units to a control group. If memory serves, pressing shift and then the number of the control adds the units to that control group. If such is the case, I will find and add this feature tomorrow.
Another possible enhancement is the long fabled, but never acheived (that I know) ability to draw a rectangle with your mouse and then instantly add those units to a control group. I need to research the matter more, but once I figure out how to make a script activate after the LButton is released, it should not be too hard.
There might be a more efficicent way to run the script that involves fewer keystrokes, and I will investigate this matter tomorrow as well.
Conclusion: These scripts aren’t perfect, and don’t do anything with autohotkey that hasn’t been done before. However, I am confident that they can help at least a few WarCraft3 players out there. I encourage you to critique (and improve) the scripts I have posted, and post your own as well. I hope you have as much fun using these scripts as I did making them.
-Jaegan
A special thanks to Points for making WarKeys. His work was what prompted me to improve my WarCraft ability and create the scripts you have seen here.
Below is what my current AutoHotKey Program looks like for WarCraft. Use it as a model for your own "crafting!"
| Code: | Process, priority, , High ; Have the script set itself to high priority
#IfWinActive Warcraft III
#InstallMouseHook
#SingleInstance force
#InstallKeybdHook
#UseHook On
SetBatchLines 10ms
#HotString SP
#MaxThreads 20
CoordMode, mouse, Screen
SetKeyDelay, 10, 0, Play
SetMouseDelay, 10 , Play
Healer=3
;InstaTrain Scripts
= & Q::SendPlay, 0Q1
= & W::SendPlay, 0W1
= & E::SendPlay, 0D1
= & R::SendPlay, 0F1
= & A::SendPlay, 6Q1
= & S::SendPlay, 6W1
= & D::SendPlay, 6E1
= & F::SendPlay, 6R1
= & Z::SendPlay, 7Q1
= & X::SendPlay, 7W1
= & C::SendPlay, 7E1
= & v::SendPlay, 7R1
- & Q::SendPlay, 8Q1
- & W::SendPlay, 8W1
- & E::SendPlay, 8E1
- & R::SendPlay, 8R1
- & A::SendPlay, 9Q1
- & S::SendPlay, 9W1
- & D::SendPlay, 9E1
- & F::SendPlay, 9R1
- & z::SendPlay, 0{Tab}q1
- & x::SendPlay, 0{Tab}w1
- & c::SendPlay, 0{Tab}e1
- & v::SendPlay, 0{Tab}R1
;InstaResearch
Insert & Q::SendPlay, 6A1
Insert & W::SendPlay, 6S1
Insert & E::SendPlay, 6D1
Insert & R::SendPlay, 6F1
Insert & A::SendPlay, 6{Tab}A1
Insert & S::SendPlay, 6{Tab}S1
Insert & D::SendPlay, 6{Tab}D1
Insert & F::SendPlay, 6{Tab}F1
Insert & Z::SendPlay, 7A1
Insert & X::SendPlay, 7S1
Insert & C::SendPlay, 7D1
Insert & v::SendPlay, 7F1
Home & Q::SendPlay, 8A1
Home & W::SendPlay, 8S1
Home & E::SendPlay, 8D1
Home & R::SendPlay, 8F1
Home & A::SendPlay, 9A1
Home & S::SendPlay, 9S1
Home & D::SendPlay, 9D1
Home & F::SendPlay, 9F1
Home & z::SendPlay, 9{Tab}A1
Home & x::SendPlay, 9{Tab}S1
Home & c::SendPlay, 9{Tab}D1
Home & v::SendPlay, 9{Tab}F1
;InstaHeal Script
RShift & 1::healer=1
RShift & 2::healer=2
RShift & 3::healer=3
' & 1::
' & 2::
' & 3::
if InStr(A_ThisHotkey, "1")
cy=59
else if InStr(A_ThisHotkey, "2")
cy=123
else cy=184
MouseGetPos, x, y
SendPlay, {F%healer%}e{Click 30, %cy%}{Esc}1
MouseMove, x, y
return
;MacroControl
Capslock & d::SendPlay, 2d{LButton}3d{LButton}4d{LButton}5d{LButton}1d{LButton}
Capslock & S::SendPlay, 2s{LButton}3s{LButton}4s{LButton}5S{LButton}1s{LButton}
Capslock & A::SendPlay, 2a{LButton}3a{LButton}4a{LButton}5a{LButton}1a{LButton}
Capslock & F::SendPlay, 2f{LButton}3f{LButton}4f{LButton}5f{LButton}1f{LButton}
Capslock & e::SendPlay, {F1}e{LButton}{F2}e{LButton}{F3}e{LButton}1
Capslock & q::SendPlay, {F1}q{LButton}{F2}q{LButton}{F3}q{LButton}1
Capslock & w::SendPlay, {F1}w{LButton}{F2}w{LButton}{F3}w{LButton}1
Capslock & r::SendPlay, {F1}r{LButton}{F2}r{LButton}{F3}r{LButton}1
group = 1
maxgroup = 2
;ControlGroupManagement
~Tab & 1::maxgroup = 1
~Tab & 2::maxgroup = 2
~Tab & 3::maxgroup = 3
~Tab & 4::maxgroup = 4
~Tab & 5::maxgroup = 5
~1::group=1
~2::group=2
~3::group=3
~4::group=4
~5::group=5
~^1::group = 1
~^2::group = 2
~^3::group = 3
~^4::group = 4
~^5::group = 5
*WheelDown::
group += 1
if(group > maxgroup)
group := group - maxgroup
if(group < 1)
group := group + maxgroup
send, %group%
return
*WheelUp::
group -= 1
if(group > maxgroup)
group := group - maxgroup
if(group < 1)
group := group + maxgroup
send, %group%
return
;Screen Manipulation
space & w:: Send, {blind}{Up down}
space & w up::Send, {blind}{Up up}
space & a:: Send, {blind}{Left down}
space & a up::Send, {blind}{Left up}
space & s:: Send, {blind}{Down down}
space & s up::Send, {blind}{Down up}
space & d:: Send, {blind}{Right down}
space & d up::Send, {blind}{Right up}
;ItemUsage
' & W::SendPlay, {NUMPAD7} ; Scroll Left and press the button
' & E::SendPlay, {NUMPAD8}
' & S::SendPlay, {NUMPAD4}
' & D::SendPlay, {NUMPAD5}
' & X::SendPlay, {NUMPAD1}
' & C::SendPlay, {NUMPAD2}
;Quitisbad
Alt & Q::SendPlay, Q
;ControlGroupManipulation
' & LButton::SendPlay, 0%Group%{LShift Down}{LButton}{LShift Up}{LControl Down}%Group%{LControl Up}9%Group%
LWin::SendPlay, {Space}
Numpadenter::Suspend |
Last edited by Jaegan on Mon Aug 21, 2006 12:40 am; edited 3 times in total |
|
| Back to top |
|
 |
Veovis
Joined: 13 Feb 2006 Posts: 389 Location: Utah
|
Posted: Sun Jul 16, 2006 3:14 am Post subject: |
|
|
Very nice work! Good work on the scripts and very well explained! I especially like the way you can train units with a simple mouse click and button. I like how you use half of the keyboard so effectivly. I am able to expand this script to use my XButton1 and XButton2 for great results! Thank you! _________________
"Power can be given overnight, but responsibility must be taught. Long years go into its making." |
|
| Back to top |
|
 |
JSLover
Joined: 20 Dec 2004 Posts: 634 Location: LooseChange911.com The WTC bldgs shouldn't have fallen that fast. The official story is a lie!
|
Posted: Sun Jul 16, 2006 5:19 am Post subject: Re: WarCraft3 Scripts- Hero Healing, Instant Training, and m |
|
|
| Jaegan wrote: | | ...AutoHotKey can’t detect when you leave one control group and select another manually. ...using the “1” on your keyboard... |
...the key word here is keyboard...AutoHotKEY...
| Code: | ;...etc...
Tab & 5::maxgroup = 5
;Let key pass thru, but take note!...
~1::group=1
~2::group=2
~3::group=3
~4::group=4
~5::group=5
*WheelDown::
;...etc... |
_________________
Home • Click image! • Blog |
|
| Back to top |
|
 |
Jaegan
Joined: 12 Jul 2006 Posts: 21 Location: California
|
Posted: Mon Jul 17, 2006 7:21 am Post subject: |
|
|
Veovis: Glad you liked the script! I use a Logitech G7 myself, so I have lots of different mouse buttons to use in conjuction with my keyboard. The priority of the script is set to low so that it won't interfere with SetPoint or other similar mouse remapping software. If there are any other features you think should be added here, let me know.
JSLover: Thanks for your help on script four, it never occured to me that I could use the keyboard to determine the group number in order to solve the problem. If you have any other suggestions or improvements to offer, I'd be happy to hear them.
Update:
Even though I am not the creator of them, I might post the scripts to suspend the hotkeys while typing and always show the health bars here. This would be in the interest of having one post with all of the known WarCraft III scripts in one place.
I am currently working on making the InstaHeal script better. I would like to make it possible to determine which hero (1st, 2nd, or 3rd) is the healer in a fashion similar to setting the number of control groups. Doing so will require the ability to have certain SendPlay commands deactivated until certain buttons are pressed. I have no clue how to do that, but I have it down conceptually.
| Code: |
If (you press)RCtrl & 1; (Means first hero is the healer)
Then; Meaning, then activate the following
Alt & 1::SendPlay, {F1}e{Click 30, 59}{escape}{Click 493 361}1
Alt & 2::SendPlay, {F1}e{Click 30, 123}{escape}{Click 493 361}1
Alt & 3::SendPlay, {F1}e{Click 30, 184}{escape}{Click 493 361}1
If (you press) RCtrl & 2; (Means second hero is the healer)
Then; Meaning, then activate the following
Alt & 1::SendPlay, {F2}e{Click 30, 59}{escape}{Click 493 361}1
Alt & 2::SendPlay, {F2}e{Click 30, 123}{escape}{Click 493 361}1
Alt & 3::SendPlay, {F2}e{Click 30, 184}{escape}{Click 493 361}1
If (you press) RCtrl & 3; (Means third hero is the healer)
Then; Meaning, then activate the following
Alt & 1::SendPlay, {F3}e{Click 30, 59}{escape}{Click 493 361}1
Alt & 2::SendPlay, {F3}e{Click 30, 123}{escape}{Click 493 361}1
Alt & 3::SendPlay, {F3}e{Click 30, 184}{escape}{Click 493 361}1 |
So if I can figure out how to make that if then work, we are good to go. If you want to throw some pointers my way, I'm more than willing to hear them.
That raises a good point: a lot of these scripts are functional, but are still works in progress. Should my requests for help on them remain here or be moved to the help forum? |
|
| Back to top |
|
 |
JSLover
Joined: 20 Dec 2004 Posts: 634 Location: LooseChange911.com The WTC bldgs shouldn't have fallen that fast. The official story is a lie!
|
Posted: Mon Jul 17, 2006 9:19 am Post subject: |
|
|
| Jaegan wrote: | | I am currently working on making the InstaHeal script better. I would like to make it possible to determine which hero (1st, 2nd, or 3rd) is the healer... |
Pick one of these...
| Code: | ;if it don't need to be only the Right Ctrl...^ means Ctrl...
~^1::healer=1
~^2::healer=2
~^3::healer=3 |
| Code: | ;if it does need to be, option 1...>^ means Right Ctrl...
~>^1::healer=1
~>^2::healer=2
~>^3::healer=3 |
| Code: | ;if it does need to be, option 2...(same as above, just different syntax)...
~RCtrl & 1::healer=1
~RCtrl & 2::healer=2
~RCtrl & 3::healer=3 |
...& add it to this...
| Code: | ;! means Alt...& is the more noraml way to say Alt+1...
!1::SendPlay, {F%healer%}e{Click 30, 59}{Esc}{Click 493 361}1
!2::SendPlay, {F%healer%}e{Click 30, 123}{Esc}{Click 493 361}1
!3::SendPlay, {F%healer%}e{Click 30, 184}{Esc}{Click 493 361}1 |
...or this...
| Jaegan wrote: | | Second, the script doesn’t move your mouse back to where it was when you issued the heal command... |
| Code: | ;! means Alt...& is the more noraml way to say Alt+1...
!1::
!2::
!3::
if InStr(A_ThisHotkey, "1")
cy=59
else if InStr(A_ThisHotkey, "2")
cy=123
else cy=184
MouseGetPos, x, y
SendPlay, {F%healer%}e{Click 30, %cy%}{Esc}{Click 493 361}1
MouseMove, x, y
return |
...also add...
...to the top (where you assign defaults)...cuz if you press Alt+1 without healer having a value, it's weird... _________________
Home • Click image! • Blog |
|
| Back to top |
|
 |
dosboot
Joined: 12 Feb 2006 Posts: 16
|
Posted: Fri Jul 21, 2006 5:42 pm Post subject: |
|
|
Woot, more wc3 scripting I'm not playing at wc3 at the moment but I find myself always in the mood to write scripts for it. I see lots of good ideas here. Simplifying unit production by replacing (control group) + (QWER) with (fixed key) + (QWERSADFZXCV) is a great idea!
Tip: Whenever you make a script to give the same command to all control groups, use an 'interrupter group' to avoid recentering the screen (the recentering which occurs whenever you select a group twice consecutively within a few hundred ms). For example, something like
| Code: |
Capslock & d::SendPlay, 01d{LButton}2d{LButton}3d{LButton}4d{LButton}5d{LButton}01
|
where hotkey 0 is a group you know is always assigned to a building (and never empty). The first interrupter key is especially important because if you select group 1 right before pressing (capslock)+(d) the resulting screen shift would change where you were giving the command, possibly making everyone attack one of your units.
The now dead wc3 thread is here if you want to look at the old scripts:
http://www.autohotkey.com/forum/viewtopic.php?t=7833&postdays=0&postorder=asc&highlight=warcraft&start=45
One of my more useful scripts from that thread:
| Code: |
;A new version of a "Ctrl+#" replacement key. Single click MButton to add/remove
;a unit to the group, drag and release MButton to add a selection to the group,
;and double click MButton to add all units of the same type to the group.
;Assumes "group" is a global variable which tracks last pressed # key.
MButton::
If(A_TimeSincePriorHotkey <= 150 and A_PriorHotkey == "MButton")
{
Keywait, MButton
Send, {Shift Down}
Send, {LButton}
Send, {LButton}
Send, {Shift Up}
Send, ^%group%
}
else
{
Critical ;prevents this block from being interrupted by the previous block
Send, {Shift Down}
Send, {LButton Down}
Keywait, MButton
Send, {LButton Up}
Send, {Shift Up}
Send, ^%group%
}
return |
Okay, I admit the syntax style is a little old (e.g. Send instead of SendInput/SendPlay and not using multiple commands in one line) but I don't like to post a modified script without testing first. |
|
| Back to top |
|
 |
Jaegan
Joined: 12 Jul 2006 Posts: 21 Location: California
|
Posted: Mon Aug 21, 2006 12:43 am Post subject: |
|
|
Thanks to JSLover and DosBoot for their help in improving the scripts! I have updated a number of the scripts, and added two new ones that are quite handy. Enjoy, and keep the feedback coming!
-Jaegan |
|
| Back to top |
|
 |
illavitar
Joined: 04 May 2009 Posts: 4
|
Posted: Mon May 04, 2009 1:23 pm Post subject: |
|
|
| EDIT |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|