6momo6 Posted September 9, 2005 Share Posted September 9, 2005 Ive got one question: I want to make a IF sense but dont know exactly how to begin. How can i write this: If cordinate 11, 62 isnt able to click Then restart script. start in a new beginninig. thx in advance -momo Link to comment Share on other sites More sharing options...
AutoChris Posted September 10, 2005 Share Posted September 10, 2005 Ive got one question:I want to make a IF sense but dont know exactly how to begin.How can i write this: If cordinate 11, 62 isnt able to click Then restart script. start in a new beginninig.thx in advance-momo<{POST_SNAPBACK}>I am a little confused about what you are asking. All coordinates are clickable; the coordinate that is clicked may not do anything special, but you can click it. If by clicking that coordinate, something is supposed to happen, like a window popping up, you can do a WinWaitActive(). If WinWaitActive ("My Cool Window") Then MsgBox (0, "Yay!", "My Window Opened")Please be more specific in what you are trying to do. Link to comment Share on other sites More sharing options...
6momo6 Posted September 10, 2005 Author Share Posted September 10, 2005 (edited) Hi dude Thanx for your reply first. Ive got SOO much ideas and i cannot explain how they are. Yes they are clickable but i mean if the cordinate for example "X=12, Y=14" this is click able! But for a reason this coordinate isnt mopore click able the click button is empty so the script must just restart. If 12,14 the button is empty then restart script // begin from 0. You get it what i mean? -momo Edited September 10, 2005 by Larry Link to comment Share on other sites More sharing options...
6momo6 Posted September 10, 2005 Author Share Posted September 10, 2005 Yes Larry you helped me alot !! Now i need something how to bring the script to restart. If clickbuttonempty than restart script // begin from 0 Link to comment Share on other sites More sharing options...
Valuater Posted September 10, 2005 Share Posted September 10, 2005 show us your script so we can see where/when/how to return to the begining 8) Link to comment Share on other sites More sharing options...
LxP Posted September 10, 2005 Share Posted September 10, 2005 If WinWaitActive ("My Cool Window") Then MsgBox (0, "Yay!", "My Window Opened")<{POST_SNAPBACK}>This would be better written as:winWaitActive("My Cool Window") msgBox(0, "Yay!", "My Window Opened")They are two separate commands with no relation -- when you don't specify a timeout for WinWaitActive(), it will never return false to prevent execution of the MsgBox(). Link to comment Share on other sites More sharing options...
MHz Posted September 10, 2005 Share Posted September 10, 2005 This would be better written as:winWaitActive("My Cool Window") msgBox(0, "Yay!", "My Window Opened")They are two separate commands with no relation -- when you don't specify a timeout for WinWaitActive(), it will never return false to prevent execution of the MsgBox().<{POST_SNAPBACK}>Certainly disagree. The 2 separate commands are related to displaying if the WinWaitActive is True, then the messagebox will show. How do you get more related then that? The If statement is not incorrect.Timeout or not, both will do the same, but what SerialKiller displays is a line that is more readable and applies more so in other similar approaches. Link to comment Share on other sites More sharing options...
6momo6 Posted September 10, 2005 Author Share Posted September 10, 2005 (edited) Hi thanx all for replay. You didnt get exactly what im looking for AT the moment i cant post my scrippt here because its empty . I just want to write a script like this : If Clickbuttonempty(12,14) then restartscript. sounds very simple, its nothing about winactive thing!! Not any popup etc.. Someone know the command for restart a script ?? -momo Edited September 10, 2005 by 6momo6 Link to comment Share on other sites More sharing options...
LxP Posted September 11, 2005 Share Posted September 11, 2005 (edited) I just want to write a script like this :If Clickbuttonempty(12,14)then restartscript.You could wrap your entire script in a While..WEnd loop:while (1) ; script lines if (buttonIsEmpty()) then continue ; script lines ; if you don't want the script to repeat at the end exitLoop wEndCertainly disagree. The 2 separate commands are related to displaying if the WinWaitActive is True, then the messagebox will show. How do you get more related then that? The If statement is not incorrect.Timeout or not, both will do the same, but what SerialKiller displays is a line that is more readable and applies more so in other similar approaches. <{POST_SNAPBACK}>Not to cause an argument here -- just to learn more about others' views:This use of WinWaitActive() here does not return a varying value. It always returns a true equivalent. To me it doesn't make sense to wrap something unconditionally true into an If statement -- it implies falsely that the WinWaitActive() command might return a false equivalent, and therefore prevent the message box from displaying -- which will never be the case.I do agree that most of the time it is a good thing to wrap AutoIt functions in an If..Then construct (as almost every single function returns a boolean value). The only equivalent example I can come up with to this however is:if msgBox(0, "Message Box", "With OK button only") then doWork()Would you agree that this is a nonsensical use of If..Then (where MsgBox() will always return 1)? If so then how does it differ from the above example?Edit: Missing comma from code. Edited September 11, 2005 by LxP Link to comment Share on other sites More sharing options...
6momo6 Posted September 11, 2005 Author Share Posted September 11, 2005 Thanx for the reply. Its not what iam looking for. Should i ask Jon ???? He have to know, that ?? I cant believe about 1000 users here and no one can help me out. its just a simple script. IF Clickbuttonempty(12, 14) Then restart script. Its really as hard as say ?? -momo ps. Jon you has been received a PM *lol* Link to comment Share on other sites More sharing options...
Valik Posted September 11, 2005 Share Posted September 11, 2005 Its not what iam looking for.Do you even know what you are looking for, then? Based on your description, LxP provided you with enough information to get started. Link to comment Share on other sites More sharing options...
6momo6 Posted September 11, 2005 Author Share Posted September 11, 2005 (edited) iTS not what iam looking for, whats your plan ?? to provocate me or what ?? LxP give me alot of information but its not for me .... thx anyway. -momo Edited September 11, 2005 by 6momo6 Link to comment Share on other sites More sharing options...
JoshDB Posted September 11, 2005 Share Posted September 11, 2005 Do you mean if the mouse cursor ISN'T over the button, therefore, the clickbutton is empty? If so... While 1 = 1 $Pos = GetMousePos() If $Pos[0] = 14 AND $Pos[1] = 16 Then MsgBox(0,"Clickable!","This button is clickable!") EndIf wEnd Just a lil' somethin to get you on your way Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite Link to comment Share on other sites More sharing options...
6momo6 Posted September 11, 2005 Author Share Posted September 11, 2005 (edited) Ok again i try my best to explain! X=14 , Y=16 These are the xy cordinates. IF 14, 16 click Cordinate ISNT click able then exit script . reload script. Thats all! If Clickbutton (14, 16) is empty then exit script. // reload after, i dont need any MSG box etc.. it should make all automaticly. thx in advance -momo Edited September 11, 2005 by 6momo6 Link to comment Share on other sites More sharing options...
/dev/null Posted September 11, 2005 Share Posted September 11, 2005 Ok again i try my best to explain!X=14 , Y=16 These are the xy cordinates. IF 14, 16 click Cordinate ISNT click able then exit script . reload script. Thats all!If Clickbutton (14, 16) is empty then exit script. // reload after, i dont need any MSG box etc.. it should make all automaticly.thx in advance-momo<{POST_SNAPBACK}>WHAT ??? again: WHAT ????What is Clickbutton (14, 16)? What is Clickbutton()??What do you mean by "If Clickbutton (14, 16) is empty"? What is "empty"???What do you mean by "Cordinate ISNT click able"?What do you mean by "i dont need any MSG box etc.. it should make all automaticly."?I cant believe about 1000 users here and no one can help me out.Well, I guess it's not the 1000 users, but your description of the problem.... Try to be more specific! What exactly are you trying to do?????CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
6momo6 Posted September 11, 2005 Author Share Posted September 11, 2005 Ok here i add a small pic: if this button as you see (pic) looks like this = buttonempty to reload the script. Link to comment Share on other sites More sharing options...
/dev/null Posted September 11, 2005 Share Posted September 11, 2005 Ok here i add a small pic: if this button as you see (pic) looks like this = buttonempty to reload the script.What you need is PixelGetColor(), see help file sample and search the forum. To restart your script, use Run() and exit(). However, you'll have to compile your script for this!Please try to understand what I said and come back with at least some code, before you ask further questions, otherwise the chances are rather high, that another 1000 users won't understand what you want.CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
6momo6 Posted September 12, 2005 Author Share Posted September 12, 2005 (edited) I know this code is really for laugh, I had no clue how to bring it right hehe. glad for any help i get. while 1 MouseClick("left", 506, 509) Do Sleep(1300) ;Wait for page to finish loading Until $oIE.busy = 0 MouseClick("left", 11, 62);back button $coord = PixelSearch( 0, 0, 20, 300, 0xEBEBEC) exit run wend any Idea ?? I tested it didnt work Edited September 12, 2005 by 6momo6 Link to comment Share on other sites More sharing options...
6momo6 Posted September 12, 2005 Author Share Posted September 12, 2005 (edited) Sorry for this post now, i just wanted to make this topic UP I did the pixelgetcolor thing and i type the color in the pixelsearch thing, i tested and no work huh Edited September 12, 2005 by 6momo6 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