joshb Posted April 18, 2010 Share Posted April 18, 2010 Hello, I am new to AutoIt but I do understand it enough to do what I need to as far as my program which is really simple and noobie. The problem I am having is I want to run the program that sends commands to another program while both are running in the background. So I may be able to web surf or maybe play another game. Is this possible? Here is a simple example my code: expandcollapse popupSleep(10000) For $count = 1 To 200000 Next For $count = 1 To 200000 Send("1") Sleep(1000) Send("q") Sleep(1000) Send("l") Sleep(500) MouseClick("left") Sleep(20000) Send("2") Sleep(2000) Send("l") MouseClick("left") Sleep(20000) Send("3") Sleep(2000) Send("l") MouseClick("left") Sleep(20000) Send("4") Sleep(2000) Send("l") MouseClick("left") Sleep(20000) Send("5") Sleep(2000) Send("l") MouseClick("left") Sleep(20000) Send("q") Sleep(1000) Send("5") Sleep(1000) Next Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted April 18, 2010 Share Posted April 18, 2010 Hi And Welcome to the forums! You need to use ControlSend() instead of Send() and ControlClick() instead of MouseClick()! .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
ArmandoXS Posted April 18, 2010 Share Posted April 18, 2010 (edited) ooops, lol yeah... Edited April 18, 2010 by DarkDragon Link to comment Share on other sites More sharing options...
joshb Posted April 18, 2010 Author Share Posted April 18, 2010 Ty for your response. Do I have to direct the AutoIt program to the program I want to use it or will ControlSend(),ControlClick() be enough... Link to comment Share on other sites More sharing options...
joshb Posted April 18, 2010 Author Share Posted April 18, 2010 Line 6 ControlSend("1") ^ERROR Error:Incorrect number of parameters in function call. is the message I'm getting.Here is my code revised...expandcollapse popupSleep(10000) For $count = 1 To 200000 Next For $count = 1 To 200000 ControlSend("1") Sleep(1000) ControlSend("q") Sleep(1000) ControlSend("l") Sleep(500) ControlClick("left") Sleep(20000) ControlSend("2") Sleep(2000) ControlSend("l") ControlClick("left") Sleep(20000) ControlSend("3") Sleep(2000) ControlSend("l") ControlClick("left") Sleep(20000) ControlSend("4") Sleep(2000) ControlSend("l") ControlClick("left") Sleep(20000) ControlSend("5") Sleep(2000) ControlSend("l") ControlClick("left") Sleep(20000) ControlSend("q") Sleep(1000) ControlSend("5") Sleep(1000) Next Link to comment Share on other sites More sharing options...
somdcomputerguy Posted April 18, 2010 Share Posted April 18, 2010 Directions are needed.ControlSendControlClickAutoIt Window Info Tool - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
joshb Posted April 18, 2010 Author Share Posted April 18, 2010 ty for the links somdcomputerguy one more thing do i have to input all ie can i just say ControlSend ( "Darkfall Online" [,flag])for that window? im not writing text just simulating keystrokes. I don't know how to find the controlID, or do I need all " " filled? ControlSend ( "title", "text", controlID, "string" [, flag] ) Link to comment Share on other sites More sharing options...
joshb Posted April 18, 2010 Author Share Posted April 18, 2010 should it look something like this? expandcollapse popupSleep(10000) For $count = 1 To 200000 Next For $count = 1 To 200000 ControlSend("Darkfall Online", "", "", "1") Sleep(1000) ControlSend("Darkfall Online", "", "", "q") Sleep(1000) ControlSend("Darkfall Online", "", "", "l") Sleep(500) ControlClick("Darkfall Online", "", "", "left") Sleep(20000) ControlSend("Darkfall Online", "", "", "2") Sleep(2000) ControlSend("Darkfall Online", "", "", "l") ControlClick("Darkfall Online", "", "", "left") Sleep(20000) ControlSend("Darkfall Online", "", "", "3") Sleep(2000) ControlSend("Darkfall Online", "", "", "l") ControlClick("Darkfall Online", "", "", "left") Sleep(20000) ControlSend("Darkfall Online", "", "", "4") Sleep(2000) ControlSend("Darkfall Online", "", "", "l") ControlClick("Darkfall Online", "", "", "left") Sleep(20000) ControlSend("Darkfall Online", "", "", "5") Sleep(2000) ControlSend("Darkfall Online", "", "", "l") ControlClick("Darkfall Online", "", "", "left") Sleep(20000) ControlSend("Darkfall Online", "", "", "q") Sleep(1000) ControlSend("Darkfall Online", "", "", "5") Sleep(1000) Next Link to comment Share on other sites More sharing options...
joshb Posted April 18, 2010 Author Share Posted April 18, 2010 Ok I've made some progress! The code works but it doesn't register as a keystroke in game like i want it to. When i run it, it looks like nothing is happening until i click on the chat window in the game then i see it running. ie it inputs the letters and numbers. Link to comment Share on other sites More sharing options...
JohnOne Posted April 19, 2010 Share Posted April 19, 2010 Yopu might want to review this passage you agreed to before you get yourself banned from the game.12. Active Game and Account Monitoring. You agree that Aventurine may use whatever procedures or protocols it may deem necessary to monitor your computer and activity in the Game and the World. This may include, but is not limited to, monitoring your personal computer to determine the validity of your installation you account and the Game and to assure that you are not using any third party software that might violate this EULA and the TOS. You agree that Aventurine or its authorized agents may monitor, by any means, your computer’s CPU, operating system, video card, sound card and memory information in order to analyze and optimize your Game experience, improve and maintain the Game and the World or to provide customer service. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
joshb Posted April 19, 2010 Author Share Posted April 19, 2010 Mass Spammer! thanks but I know this. Macroing in game is not against AV policy as long as you are at your computer. I just want to be able to check my fantasy BB scores while im running this program without having to break/pause the program. Link to comment Share on other sites More sharing options...
bogQ Posted April 19, 2010 Share Posted April 19, 2010 Read notice on top of 'General Help and Support' (or in my sig.) Its not to b discused if its classified as MMO and your trying to automate it TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. 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