Jump to content

AutoIt Macro Help


Recommended Posts

Hello Thanks for reading this post,

To start off i'm completely unknowing when it comes to all this computer language.

This script i'm trying to get working is for a free online mmorpg emulator in beta testing phase for SWG emulation, which has given us permission to use third party programs like this to craft items while afk in the form of macros/clicking which is what i'm trying to do. I saw your Game Bots thread, and this is completely legit as it is a free private server, and also allows the use of these macros.

I recently discovered a AutoIt crafting script. I could use some help getting it to work, it's giving me the following Errors:

-------------------------------------------------------------

Check:

Check^ ERROR

Error: Missing separator character after keyword

--------------------------------------------------------------

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, 639, 359
LeftClick, 639, 359
LeftClick, 639, 359
LeftClick, 639, 359
LeftClick, 639, 359
LeftClick, 639, 359
LeftClick, 639, 359
LeftClick, 639, 359
LeftClick, 639, 359
LeftClick, 639, 359
LeftClick, 639, 359

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} ; 
sleep, 600 
IfWinNotActive, SwgClient,, Goto, Damnit 






Crap: 
Exit

I'm not sure if it was written for an older AutoIt, ect. Thanks for reading it, even more thanks for just replying/helping.

Edited by PrivatePile
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...