Armorsmith Archive
Thread: Scaleable macro
Page 1 of 1
Rothos77
Fri Apr 02, 2004 8:36 pm
#1
I haven't seen anyone with a macro setup like this on the boards, and I think this is a much easier way to both set it up and to change it when necessary. Adding more tools to the list is easier and you could easily create a macro to cycle up to 144 tools. Actually it would take 4-5 macros, but who's counting. Here it is along with some explanation:
First, create a macro called doCraft
/sel xx;
/pause 4;
/next;
/next;
/next;
/createPrototype practice no item;
/createPrototype practice no item;
/pause 1
Much the same as every other macro except there isn't any call to a tool. For thoseof you who don't know, /sel xx selects the schematic you are crafting. To figure out the number you need to put here, open your tool and your datapad (with your schematics list) and type /sel 10. Look at the item selected and find it in your datapad's schematic list. Left and up is less, and right and down is more. Any item not in the list of schematics this tool can make is skipped.
Once you've got this typed in, drag it to a slot on your toolbar, open a crafting session and test it to make sure everything works for you. If the timing is off, adjust the pauses until you get it working. When you're happy with doCraft, move on to the next macro: cycleTools1.
/ui action toolbarSlot00;
/macro doCraft;
/pause 6; (This pause should be the total of the pauses from the previous macro +1)
/ui action toolbarSlot01;
/macro doCraft;
Put a tool in slot F1 and one in the slot marked F2. Drag your new macro onto your toolbar anywhere else and run it. Make sure once again that the timing works for you before adding any more tools.
Again for the uninitiated, toolbarSlot00 is the first slot and increments by one. I've seen a lot of people wondering why that is and the answer is simple: programmers are used to 0 based arrays. Everything in most programming languages starts counting at 0.
Rothos77
Fri Apr 02, 2004 8:56 pm
#2
Make any adjustments you need to make, get this working with 2 tools and you can add as many as you need by simply continuing the macro as follows:
macro cycleTools1
/ui action toolbarSlot00;
/macro doCraft;
/pause 6;
/ui action toolbarSlot01;
/macro doCraft;
/pause 6;
/ui action toolbarSlot02;
/macro doCraft;
/pause 6;
/ui action toolbarSlot03;
/macro doCraft;
/pause 6;
.... continue this pattern, then finish with
/macro cycleTools1
If you wind up going over the character limit of the macro, add a cycleTools2 macro and replace the /macro cycleTools1 line with /macro cycleTools2. Then continue the loop by calling cycleTools1 at the end of your second macro. You can put as many tools in the toolbar as you like, as long as they're sequential and you add a new block for each tool. If you need to use all 24 slots, you can just call the starting macro from the chat window the same way you do in the macro with /macro cycleTools1.
The beauty of this method is that when you need to change schematic numbers, just open up doCraft and change the number...that's it, one spot, no more tedium added to an already tedious process. Also because none of the macros are called from a /ui action toolbarSlot statement, they don't need to be on the toolbar. You don't actually need to put anything on the toolbar except your tools, though I would recommend using slots 22 and 23 (or shift +F11 and shift +F12) for the macro that kicks this off (cycleTools1 or cyclePanes below) and your dump macro. The dump macro is just a simple line: /dump that stops all other macros from running. You can type /dump into the chatbox if you like, but I prefer having it on the toolbar.
But I did say the limit was 144...so up next is how to add another layer to this little macro tree.
macro cyclePanes
/ui action toolbarPane00;
/macro cycleTools1;
/pause xx; (where xx is the total of pauses in your cycleTools macros + a couple of seconds, you'll probably need to test this to get it working right)
/ui action toolbarPane01;
/macro cycleTools1;
/pause xx;
/ui action toolbarPane02;
/macro cycleTools1;
/pause xx;
... continue this pattern to Pane05
/macro cyclePanes
Make sure to remove any call to /macro cycleTools1 from your cycleTools macro. Call this from the chat window or if you've left a spot for it, drag this to your toolbar. Hit and get ready to click like a madman (or madchicken if you're so inclined).
I hope this all makes sense. Please let me (and any poor soul who reads this) know of any mistakes I may have made.
Rothos77
Fri Apr 02, 2004 9:02 pm
#3
One last thing. If you've never made a macro or need more explanation on the various parts, you can find a great (and much more detailed) explanation here:
http://swg.allakhazam.com/db/guides.html?guide=139
This is actually where I got all of my macros, I just modified it slightly to be a little easier to use and update.
Page 1 of 1