cainn82 Posted April 23, 2008 Share Posted April 23, 2008 Hello I am new to autoit and need to know how to make a loop that will continue until another window opens. What i want to do make my loop send a message every 2 mins till a window opens then pause until the window closes agian and so on. Link to comment Share on other sites More sharing options...
C2C Posted April 23, 2008 Share Posted April 23, 2008 Another window of what? ----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win Link to comment Share on other sites More sharing options...
cainn82 Posted April 23, 2008 Author Share Posted April 23, 2008 till someone opens a trade with me Link to comment Share on other sites More sharing options...
C2C Posted April 23, 2008 Share Posted April 23, 2008 trade? as in a game? Im willing to help and do what i can but can you please specify the exact problem/environment ----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win Link to comment Share on other sites More sharing options...
cainn82 Posted April 23, 2008 Author Share Posted April 23, 2008 ok i am creadting a bot for mtg0 v3 evryone wants to charge me 400 bucks for a bot and i said ill do it my self, I have all the begining code done i need to create a loop that will loop my mouse to move to a chat box left click type selling then move down to send every 85 seconds. I want the loop to stop when someone opens a trade with me so i can trade with the person after the trade is done i want it to continue. Link to comment Share on other sites More sharing options...
cainn82 Posted April 23, 2008 Author Share Posted April 23, 2008 i can make the mouse move and click on my own i just need to know how to make a loop Link to comment Share on other sites More sharing options...
flip209 Posted April 23, 2008 Share Posted April 23, 2008 Start with this While 1 Sleep(85000) ; 85 sec wend " I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln Link to comment Share on other sites More sharing options...
SKANKS Posted April 23, 2008 Share Posted April 23, 2008 $nTitle = "" While 1 If Not WinExists($nTitle) Then ;; Send message. EndIf Sleep(120000) WEnd Link to comment Share on other sites More sharing options...
C2C Posted April 23, 2008 Share Posted April 23, 2008 played the card version of it before unluckily i dont own the actual game ----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win Link to comment Share on other sites More sharing options...
cainn82 Posted April 23, 2008 Author Share Posted April 23, 2008 thanks evryone Link to comment Share on other sites More sharing options...
cainn82 Posted April 24, 2008 Author Share Posted April 24, 2008 ok need help agian here is my code #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.10.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here; MouseMove (36, 707) ; move to magic 3 icon; MouseClick ("left") MouseClick ("left") sleep (80000) mousemove (559, 567) ; move to luanch button; MouseClick ("left") sleep (65000) mousemove (684, 391) mouseclick ("left") send ("{BS}") send ("{BS}") send ("{BS}") send ("{BS}") send ("{BS}") send ("{BS}") send ("{BS}") send ("{BS}") send ("{BS}") send ("{BS}") send ("{BS}") send ("{BS}") send ("{BS}") send ("{BS}") send ("{BS}") send ("{BS}") send ("{BS}") send ( "cainn823") mousemove (683, 412) mouseclick ("left") send ( "********") mousemove (676, 461) mouseclick ("left") sleep (120000) mousemove (244, 760) mouseclick ("left") mousemove (268, 656) sleep (3000) mousemove (411, 659) sleep (3000) mousemove (516, 660) mouseclick ("left") $nTitle = "magic" While 1 If Not WinExists($nTitle) Then mousemove (1031, 487) mouseclick ("left") send ("sell") mousemove (1040, 513) mouseclick ("left") ;; Send message. EndIf Sleep(120000) WEnd after the loop do i just start to add the mouse moves for the trade screen. For example when the trade screen opens i want it to stop the loop then move to the accept button and start the trade do i just start codeing that on the next line below the loop? Link to comment Share on other sites More sharing options...
flip209 Posted April 24, 2008 Share Posted April 24, 2008 While 1 ;Your code If winexists(Trade Screen) then send("help me") Mousemove(0,0,0) endif wend Something like that I would do it at the top towards you other if " I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln Link to comment Share on other sites More sharing options...
cainn82 Posted April 24, 2008 Author Share Posted April 24, 2008 just a question before i post this am i allowed to post an image trade window? I cant figure out how to name the window Link to comment Share on other sites More sharing options...
flip209 Posted April 24, 2008 Share Posted April 24, 2008 You cant figure out the name of the window? Try using AU3info " I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln Link to comment Share on other sites More sharing options...
cainn82 Posted April 24, 2008 Author Share Posted April 24, 2008 ok this is what the au3info program said title Magic Online v3.0.9.2 class WindowsForms10.window.8.app.0.33c0d9d but is that the whole window or just the pop up becuase if i take the little icon anywhere on the application it says the same thing and my next question is, is there a way to make it watch for a window that pops up at a certin spot? Link to comment Share on other sites More sharing options...
cainn82 Posted April 24, 2008 Author Share Posted April 24, 2008 ok this is what the au3info program said title Magic Online v3.0.9.2 class WindowsForms10.window.8.app.0.33c0d9d but is that the whole window or just the pop up becuase if i take the little icon anywhere on the application it says the same thing and my next question is, is there a way to make it watch for a window that pops up at a certin spot? Link to comment Share on other sites More sharing options...
flip209 Posted April 24, 2008 Share Posted April 24, 2008 Is the window a different color that pops up, If so you can do something like If Pixelgetcolor(x,y) = that color then code code code... " I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln Link to comment Share on other sites More sharing options...
cainn82 Posted April 24, 2008 Author Share Posted April 24, 2008 well im going to post this image and i hope i dont get in trouble for it but you can tell me what you think and if its not allowed then im sorry this is the trade window i ham talking about tell me what you would do and how to change the code correctly and thanks for all your help i am a big noob at this but when i learn i will help others. Link to comment Share on other sites More sharing options...
cainn82 Posted April 24, 2008 Author Share Posted April 24, 2008 If i use pixelgetcolor it will not stop the loop if the pixel color changes. I have used autoinfo and it only shows the ifo for the whole program and not the wind that pops up. I was thinking maybe use the handle of the window. Does anyone know of a better way to do this I included an image of the window that pops up. Thanks to all those that will and did help me. Link to comment Share on other sites More sharing options...
cainn82 Posted April 24, 2008 Author Share Posted April 24, 2008 I really am stumped with this i dont want someone to write the code for me i just want to know what whould be a good way to start to program this. I did use While 1 if not winexits command but i cant get the title to the window autoinfo window just shows the whole program not jst the window I was thinkning that maybe i could use the handle number for the title of the window but im not sure if that will work, If anyone knows a workaround for this let me know. I also tried the pixelget (x, y) command but when the window pops up it failes to recginze the window. P. S. i know my spelling is bad and gramer is horrable but im at work and it wont let me install the spell check addon. 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