SWG Macro: SWG Auto-It Guide
Posted: August 23rd, 2006, 4:36 pm
For those who need a little run-down on how to make an Auto-It Macro:
First Off- What is Auto-It. In SWG terms- it is a useful third-party program that can be used to completely automate crafting in SWG.
For more information on Auto-It, there homepage can be found:
http://www.autoitscript.com/autoit3/
To download Auto-It:
http://www.autoitscript.com/autoit3/downloads.php
An example script that I used for crafting:
Notes in green explain what the line is doing
_________________________________________________________
Check:
Sleep, 800 ;pause for .8 seconds to allow you to change to the SWGClient Window
IfWinActive, SwgClient,, Goto, Start ;If the active window is SWGClient, goto Start
IfWinNotActive, SwgClient,, Goto, Findit ; If you didn't switch to SWGClient Window fast enough, will start Finditit Subroutine
Finditit: ; FindIt Subrouting, will cycle through windows until it finds the SWGClient Window
Send, !+{TAB} ;Sends <ALT> to cycle through windows
Sleep, 800
IfWinActive, SwgClient,, Goto, Start
IfWinNotActive, SwgClient,, Goto, FindIt
Start: ; The actual start of the macro once SWGClient is the Active Window
IfWinNotActive, SwgClient,, Goto, Crap ;This line allows YOU to exit out by changing windows, or making some other window active. (press the windows key while in windowed mode)
sleep, 1000
Start1: ;Starts the first crafting session...you will copy and paste from here and below to use multiple crafting tools. Line that need to be changed for multiple crafting tools will be marked in ORANGE
IfWinNotActive, SwgClient,, Goto, Crap
sleep, 1000
Crafting_1:
Sleep, 300
Send, {ESC} ;in the event of a negative response from a crafting session, you will need to close that window. Trust me, this happens every now and then
Sleep, 300
Send, {ESC}
Send, {F1} ; Set up your crafting tools on the toolbar, so that F1, F2, F3, and F4 are the actual crafting tools. You will have to 'rebind' in the keymap to actually use F1, F2, ... Using #1,2,3 will not work because often times it will type in the chat window vice executing the toolbarslot.
sleep, 1000
LeftClick, 895,761 ;Clicks the left mouse button at the 895, 761 coordinates. (These are X,Y coordinates, and will be different for YOU when you make your own macro. You will need to use Auto-It Reveal Mode to find the coordinates, this is fairly self explanatory)
Sleep, 1200
IfWinNotActive, SwgClient,, Goto, Crap ;You want lots of these, just so you can exit the program whenever. They don't slow anything down, so use whenever you can
SecondResource: ; No reason in particular why I went out of order, you can name this whatever you want, I only use it to show where I started clicking resources.
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
ThirdResource:
LeftClick, 326, 210
LeftClick, 326, 210
LeftClick, 326, 210
LeftClick, 326, 210
LeftClick, 326, 210
LeftClick, 326, 210
LeftClick, 326, 210
LeftClick, 326, 210
FirstResource:
LeftClick, 207, 212
LeftClick, 207, 212
LeftClick, 207, 212
LeftClick, 207, 212
IfWinNotActive, SwgClient,, Goto, Crap
LeftClick, 207, 212
LeftClick, 207, 212
LeftClick, 207, 212
LeftClick, 207, 212
LeftClick, 207, 212
IfWinNotActive, SwgClient,, Goto, Crap
LeftClick, 207, 212
LeftClick, 207, 212
LeftClick, 207, 212
IfWinNotActive, SwgClient,, Goto, Crap
Sleep, 700
ClickAssemble:
Sleep, 500
LeftClick, 1307, 771
Sleep, 600
IfWinNotActive, SwgClient,, Goto, Crap
ClickYes:
Sleep, 500
LeftClick, 856, 474
Sleep, 600
IfWinNotActive, SwgClient,, Goto, Crap
NextCraftingStage:
Sleep, 700
Send, {F6} ; This will be an SWGMacro that you create, that will be placed in the F6 toolbarslot. This macro will be covered at the END of this guide.
sleep, 600
IfWinNotActive, SwgClient,, Goto, Damnit
Crap:
Exit
_________________________________________________
Alright, that's pretty much it for making the Auto-It Macro. You will type, or cut and paste in to Notepad, and save it where ever. With Auto-It, there is a Convert to .exe program. The conversion tool, creates an executable program from your txt file. (Easy enough?)
Alright, now what to put in your SWG Macro-
Create a Macro in SWG, <Options><Macro><New>
Name it what ever you want
______________________________
/nextCraftingStage;
/NextCraftingStage;
/NextCraftingStage;
/createPrototype noitem practice;
/createPrototype noitem practice;
______________________________
Place this macro in the toolbarslot that you defined above.
One thing that I have noticed- sometimes it doesn't do practice mode, IF you actually crafted something. You should craft/practice on one item prior to starting the macro. Additionally, as you progress in levels, schematics are added to your toon. This causes the craftingSchematic command not to work ideally, and will cause it to select the wrong schematic when you craft/practice. This is why I open up the crafting tool, select the schematic I want (Gungan heads are awesome for grinding), and click past that screen, and then close the window. The same schematic will be used every time, even if you gain levels.
If you do Gungan Heads...the most XP (6500+), you'll need about 400-500K Ore and 250K Gemstone.
That's pretty much it, It's not that difficult, but I wouldn't call it the easiest thing in the world. Don't move the windows around once you get it set up, and things should run smoothly.
Also, yes, I made the Auto-It macro myself, nothing else can I take credit for, and I'm fairly certain others have made an Auto-It Guide.
First Off- What is Auto-It. In SWG terms- it is a useful third-party program that can be used to completely automate crafting in SWG.
For more information on Auto-It, there homepage can be found:
http://www.autoitscript.com/autoit3/
To download Auto-It:
http://www.autoitscript.com/autoit3/downloads.php
An example script that I used for crafting:
Notes in green explain what the line is doing
_________________________________________________________
Check:
Sleep, 800 ;pause for .8 seconds to allow you to change to the SWGClient Window
IfWinActive, SwgClient,, Goto, Start ;If the active window is SWGClient, goto Start
IfWinNotActive, SwgClient,, Goto, Findit ; If you didn't switch to SWGClient Window fast enough, will start Finditit Subroutine
Finditit: ; FindIt Subrouting, will cycle through windows until it finds the SWGClient Window
Send, !+{TAB} ;Sends <ALT> to cycle through windows
Sleep, 800
IfWinActive, SwgClient,, Goto, Start
IfWinNotActive, SwgClient,, Goto, FindIt
Start: ; The actual start of the macro once SWGClient is the Active Window
IfWinNotActive, SwgClient,, Goto, Crap ;This line allows YOU to exit out by changing windows, or making some other window active. (press the windows key while in windowed mode)
sleep, 1000
Start1: ;Starts the first crafting session...you will copy and paste from here and below to use multiple crafting tools. Line that need to be changed for multiple crafting tools will be marked in ORANGE
IfWinNotActive, SwgClient,, Goto, Crap
sleep, 1000
Crafting_1:
Sleep, 300
Send, {ESC} ;in the event of a negative response from a crafting session, you will need to close that window. Trust me, this happens every now and then
Sleep, 300
Send, {ESC}
Send, {F1} ; Set up your crafting tools on the toolbar, so that F1, F2, F3, and F4 are the actual crafting tools. You will have to 'rebind' in the keymap to actually use F1, F2, ... Using #1,2,3 will not work because often times it will type in the chat window vice executing the toolbarslot.
sleep, 1000
LeftClick, 895,761 ;Clicks the left mouse button at the 895, 761 coordinates. (These are X,Y coordinates, and will be different for YOU when you make your own macro. You will need to use Auto-It Reveal Mode to find the coordinates, this is fairly self explanatory)
Sleep, 1200
IfWinNotActive, SwgClient,, Goto, Crap ;You want lots of these, just so you can exit the program whenever. They don't slow anything down, so use whenever you can
SecondResource: ; No reason in particular why I went out of order, you can name this whatever you want, I only use it to show where I started clicking resources.
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
LeftClick, 269, 211
ThirdResource:
LeftClick, 326, 210
LeftClick, 326, 210
LeftClick, 326, 210
LeftClick, 326, 210
LeftClick, 326, 210
LeftClick, 326, 210
LeftClick, 326, 210
LeftClick, 326, 210
FirstResource:
LeftClick, 207, 212
LeftClick, 207, 212
LeftClick, 207, 212
LeftClick, 207, 212
IfWinNotActive, SwgClient,, Goto, Crap
LeftClick, 207, 212
LeftClick, 207, 212
LeftClick, 207, 212
LeftClick, 207, 212
LeftClick, 207, 212
IfWinNotActive, SwgClient,, Goto, Crap
LeftClick, 207, 212
LeftClick, 207, 212
LeftClick, 207, 212
IfWinNotActive, SwgClient,, Goto, Crap
Sleep, 700
ClickAssemble:
Sleep, 500
LeftClick, 1307, 771
Sleep, 600
IfWinNotActive, SwgClient,, Goto, Crap
ClickYes:
Sleep, 500
LeftClick, 856, 474
Sleep, 600
IfWinNotActive, SwgClient,, Goto, Crap
NextCraftingStage:
Sleep, 700
Send, {F6} ; This will be an SWGMacro that you create, that will be placed in the F6 toolbarslot. This macro will be covered at the END of this guide.
sleep, 600
IfWinNotActive, SwgClient,, Goto, Damnit
Crap:
Exit
_________________________________________________
Alright, that's pretty much it for making the Auto-It Macro. You will type, or cut and paste in to Notepad, and save it where ever. With Auto-It, there is a Convert to .exe program. The conversion tool, creates an executable program from your txt file. (Easy enough?)
Alright, now what to put in your SWG Macro-
Create a Macro in SWG, <Options><Macro><New>
Name it what ever you want
______________________________
/nextCraftingStage;
/NextCraftingStage;
/NextCraftingStage;
/createPrototype noitem practice;
/createPrototype noitem practice;
______________________________
Place this macro in the toolbarslot that you defined above.
One thing that I have noticed- sometimes it doesn't do practice mode, IF you actually crafted something. You should craft/practice on one item prior to starting the macro. Additionally, as you progress in levels, schematics are added to your toon. This causes the craftingSchematic command not to work ideally, and will cause it to select the wrong schematic when you craft/practice. This is why I open up the crafting tool, select the schematic I want (Gungan heads are awesome for grinding), and click past that screen, and then close the window. The same schematic will be used every time, even if you gain levels.
If you do Gungan Heads...the most XP (6500+), you'll need about 400-500K Ore and 250K Gemstone.
That's pretty much it, It's not that difficult, but I wouldn't call it the easiest thing in the world. Don't move the windows around once you get it set up, and things should run smoothly.
Also, yes, I made the Auto-It macro myself, nothing else can I take credit for, and I'm fairly certain others have made an Auto-It Guide.