Salryn Posted February 18, 2007 Share Posted February 18, 2007 (edited) Hiya, I just got AutoIT-3 in an attempt to make what I hope to be a very simple macro, heres what I want it to do, I play an MMORPG (online game) and I have to press about 8 keys 1 pause 2 pause 3 and so on so I would like to make a script that does it for me then stops, I would like it to also be done via a hotkey, here is what I want it to do The hotkey would be nice if it was Ctrl+Shift B <> Macro Start <> Type /g Buffing Inc on << %td >> Press Shift 2 Press 1 Pause 3 Press 2 Pause 3 Press 3 Pause 3 Press 4 Pause 3 Press 5 Pause 3 Press 6 Pause 3 Press Shift 1 <> Macro End <> could anyone spare a little of there time to make that and compile it? I havnt got a clue how to do it Edited February 18, 2007 by Salryn Link to comment Share on other sites More sharing options...
BrettF Posted February 18, 2007 Share Posted February 18, 2007 Ok.First of all look up the following in the helpfile:HotKeySet()Send()Sleep() Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Salryn Posted February 18, 2007 Author Share Posted February 18, 2007 (edited) I dont really want to learn to write it as this will be the only thing I need I would think... could you just type what I would need to add like Pause(3) Press(2) so on Edited February 18, 2007 by Salryn Link to comment Share on other sites More sharing options...
BrettF Posted February 18, 2007 Share Posted February 18, 2007 Hmm.. I cant find those in the help file This is the autoIt helpfile right? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Salryn Posted February 18, 2007 Author Share Posted February 18, 2007 hehe yes it is Link to comment Share on other sites More sharing options...
BrettF Posted February 18, 2007 Share Posted February 18, 2007 hehe yes it is Find it?? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Salryn Posted February 18, 2007 Author Share Posted February 18, 2007 (edited) + its 9am and iv not been to sleep yet lol come on Bert, will take you like 3 mins Edited February 18, 2007 by Salryn Link to comment Share on other sites More sharing options...
BrettF Posted February 18, 2007 Share Posted February 18, 2007 + its 9am and iv not been to sleep yet lolcome on Bert, will take you like 3 mins Show me what you've tried and then i will help. otherwise no. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Salryn Posted February 18, 2007 Author Share Posted February 18, 2007 (edited) What would be the first line? Edited February 18, 2007 by Salryn Link to comment Share on other sites More sharing options...
BrettF Posted February 18, 2007 Share Posted February 18, 2007 What would be the first line?READ THE HELPFILE!!! Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Salryn Posted February 18, 2007 Author Share Posted February 18, 2007 I guess I will when iv had some sleep.. I had a look at it and couldnt find what I was looking for Link to comment Share on other sites More sharing options...
Salryn Posted February 18, 2007 Author Share Posted February 18, 2007 (edited) ok here we go #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.2.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here WinWaitActive("Vanguard: Saga of Heroes") Send("1") WinWait("3") **broken here** Send("2") WinWait("3") Send("3") WinWait("3") Send("4") WinWait("3") Send("5") WinWait("3") Send("6") WinWait("3") Send("7") WinWait("3") Send("8") I just worked out that WinWait isnt the pause command.. but I cant find what is Iv searched "Wait" "Pause" "WinPause" "WinWait" "Hold" "WinHold" Edited February 18, 2007 by Salryn Link to comment Share on other sites More sharing options...
Salryn Posted February 18, 2007 Author Share Posted February 18, 2007 Getting there, except for it wont work any longer.. wont run I got it to type something in the game but now its nay working laddy #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.2.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here WinWaitActive("Vanguard: Saga Of Heroes") Send("/g Starting Buffs on %td {Enter}") Send("+2") Send("1") Sleep("2500") Send("2") Sleep("2500") Send("3") Sleep("2500") Send("4") Sleep("2500") Send("5") Sleep("2500") Send("6") Sleep("2500") Link to comment Share on other sites More sharing options...
Salryn Posted February 18, 2007 Author Share Posted February 18, 2007 Kind of anoying how I have to keep making another reply as I cant edit my post.. oh well I have it working! and it works splendedly however I now need to run it in the background and press a hotkey when I need to run it, could you help me out with that little bit please Bert, iv look at the hotkey section of the help file but it doesnt contain the string for making it start it just says like pause and terminate the script I just want it to start and then when its done go into standby mode so I can press it again when I need it Link to comment Share on other sites More sharing options...
BrettF Posted February 18, 2007 Share Posted February 18, 2007 Kind of anoying how I have to keep making another reply as I cant edit my post.. oh well I have it working! and it works splendedly however I now need to run it in the background and press a hotkey when I need to run it, could you help me out with that little bit please Bert, iv look at the hotkey section of the help file but it doesnt contain the string for making it start it just says like pause and terminate the script I just want it to start and then when its done go into standby mode so I can press it again when I need it Use the HotkeySet to call a function: Like HotkeySet ("{LALT}", "MyFunction") While 1 Sleep (100) Wend Func MyFunction () ;Do Stuff... EndFunc Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Salryn Posted February 18, 2007 Author Share Posted February 18, 2007 Ok so check this for me, Im not quite understanding it, thats alot of new stuff for me to look at in a short space, say CTRL LSHIFT and Q to run the macro how would it look? #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.2.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here HotkeySet ("{LALT}", "MyFunction") While 1 Sleep (100) Wend Func MyFunction () ;Do Stuff... EndFunc WinWaitActive("Vanguard: Saga of Heroes") Send("+2") Send("/g Buffing %td{!} {Enter}") Send("1") Sleep("2500") Send("2") Sleep("2500") Send("3") Sleep("2500") Send("4") Sleep("2500") Send("5") Sleep("2500") Send("/g Buffing complete on << %td{!} >> {Enter}") Send("+1") Link to comment Share on other sites More sharing options...
BrettF Posted February 18, 2007 Share Posted February 18, 2007 Read up on Send() they have all the controls... "#r" = Windows + R...... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Paulie Posted February 18, 2007 Share Posted February 18, 2007 Read up on Send() they have all the controls... "#r" = Windows + R......You have really been making this kid work for his code haven't you Let me give you a little help.Hotkeyset binds a key to a function. Functions are created and defined through "Func...EndFunc" statementsThe last bit of code you posted was very close to doing exactly what you want. However, notice where it says ";Do Stuff" in that code. That should be where you put what you want the function to do when called. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now