SalazarCheats Posted January 11, 2007 Share Posted January 11, 2007 I need help with my macro program, im new to autoit and i just want to learn. can anyone help me with this i have made this script but it does not work very well... Here it is: CODE; Prompt the user to run the script - use a Yes/No prompt (4 - see help file) $answer = MsgBox(4, "Please wait", "Please click ok to continue") ; Check the user's answer to the prompt (see the help file for MsgBox return values) ; If "No" was clicked (7) then exit the script If $answer = 7 Then MsgBox(0, "Please come again", "OK. Bye!") Exit EndIf ; Run Notepad Run("notepad.exe") ; Wait for the Notepad become active - it is titled "Untitled - Notepad" on English systems WinWaitActive("Untitled - Notepad") ; Now that the Notepad window is active type some text Send("Welcome to Auto-Fighter V.1.00{ENTER}This Auto-Fighter Might be dectible as it was only tested for 1 hour!{ENTER}") Sleep(500) Send("+{UP 2}") Sleep(500) ; playsback a beep noise, at the frequency 500 for 1 second. ; this is a built-in command. Beep(500, 1000) ; 500 is the tone, and, 1000 is the length of time in mili-seconds. ; this message box has a timer at the far right, this is based on 10 seconds. MsgBox(4096, "Please wait", "While the program loads!", 100) ; Remember, an entire script is halted, until the message box is closed. ; creates a progress meter with comments. ProgressOn("Please wait", "While the program loads!(Takes 3 Mins!)", "0 % Loaded") For $i = 0 to 100 step 1 sleep(2000) ; wait time. ProgressSet( $i, $i & " % Loaded") ; set the progress meter to the variable $i. Next ProgressSet(100 , "Done", "The program has 100% loaded") ; when the loop is complete, set the progress meter to 100 percent. sleep(500) ; wait a half of a second. ProgressOff() ; close the progress meter. ; playsback a beep noise, at the frequency 500 for 1 second. ; this is a built-in command. Beep(500, 1000) ; 500 is the tone, and, 1000 is the length of time in mili-seconds. ; this message box has a timer at the far right, this is based on 10 seconds. MsgBox(4096, "Please wait", "Please vote for us at www.SalazarCheats.piczo.com", 100) ; Remember, an entire script is halted, until the message box is closed. #include <GUIConstants.au3> GUICreate("Auto-Trainer v.1.00") ; will create a dialog box that when displayed is centered. Opt("GUICoordMode",2) ; this is one of many special, coordinates modes, this one is based on 2, the cell position. GUICtrlCreateButton ("Start", 125, 175, 250) ; this creates the button, the first text is what is displayed on the button. GUISetState () ; will display an dialog box with the 2 buttons. ; Run the GUI until the dialog is closed. While 1 $msg = GUIGetMsg() ; this checks for a message/input from the GUI. If $msg = $GUI_EVENT_CLOSE Then ExitLoop ; this states, on an exit event, exit the loop. Wend Could you please also make the start button click 28 time on this color: 0x0E7112 Ok im 14 with a spelling age of a 9 year old... that explanes all my spelling mistakes Link to comment Share on other sites More sharing options...
BALA Posted January 11, 2007 Share Posted January 11, 2007 What's the problem with your script? [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Zedna Posted January 11, 2007 Share Posted January 11, 2007 Here is GUI part: #include <GUIConstants.au3> Opt("GUICoordMode",2) ; this is one of many special, coordinates modes, this one is based on 2, the cell position. GUICreate("Auto-Trainer v.1.00") ; will create a dialog box that when displayed is centered. $btn_start = GUICtrlCreateButton ("Start", 125, 175, 250) ; this creates the button, the first text is what is displayed on the button. GUISetState () ; will display an dialog box with the 2 buttons. ; Run the GUI until the dialog is closed. While 1 $msg = GUIGetMsg() ; this checks for a message/input from the GUI. Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $btn_start Play(28,100) EndSelect Wend Func Play($number,$delay) $pos = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0x0E7112) If @error Then Return For $i = 1 to $number MouseClick("left", $pos[0], $pos[1],1,0) Sleep($delay) Next EndFunc Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
SalazarCheats Posted January 12, 2007 Author Share Posted January 12, 2007 thanks but that dont help me with my color clicking trubble Ok im 14 with a spelling age of a 9 year old... that explanes all my spelling mistakes Link to comment Share on other sites More sharing options...
Zedna Posted January 12, 2007 Share Posted January 12, 2007 thanks but that dont help me with my color clicking trubbleWhat is your problem?Be more specific if you want to get help. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
SalazarCheats Posted January 13, 2007 Author Share Posted January 13, 2007 my problem is that im a noob to autoit and i cant make it click the color that i want it to. can you help me! Ok im 14 with a spelling age of a 9 year old... that explanes all my spelling mistakes Link to comment Share on other sites More sharing options...
SalazarCheats Posted January 13, 2007 Author Share Posted January 13, 2007 can you help me Ok im 14 with a spelling age of a 9 year old... that explanes all my spelling mistakes Link to comment Share on other sites More sharing options...
Zedna Posted January 13, 2007 Share Posted January 13, 2007 (edited) my problem is that im a noob to autoit and i cant make it click the color that i want it to. can you help me!I already did it for you:There is PixelSearch() and MouseClick() in my replay that makes it.Don't make stupid questions like that one and you will get more help here...EDIT: also look at HelpFile for these functions what they do Edited January 13, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Josbe Posted January 13, 2007 Share Posted January 13, 2007 I already did it for you:There is PixelSearch() and MouseClick() in my replay that makes it.Don't make stupid questions like that one and you will get more help here...EDIT: also look at HelpFile for these functions what they doYeah.@SalazarCheats: Try the Zedna's code. If you're a noob, highly recommended: Read the Helpfile. Try the examples.Experiment a little, then, consult here. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta 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