AutID Posted August 17, 2013 Share Posted August 17, 2013 (edited) Je ne suis pas sure que j'ai compris ce que t'as dis... While 1 If WinExists("Installation de Adobe Shockwave Player", "Erreur lors de l'ouverture du fichier en écriture :") Then If WinExists("Installation de Adobe Shockwave Player", "Erreur lors de l'ouverture du fichier en écriture :") Then If WinExists("Installation de Adobe Shockwave Player ", "Successfully Completed") Then _MyFunc3() EndIf Else _MyFunc2() EndIf Else _MyFunc1() EndIf WEnd Func _MyFunc1() BlockInput(1) ControlCommand("Installation de Adobe Shockwave Player", "Erreur lors de l'ouverture du fichier en écriture :", "Button3", "Check") BlockInput(0) EndFunc Func _MyFunc2() BlockInput(1) ControlCommand("Installing Adobe Shockwave Player", "", "Button1", "UnCheck") ControlCommand("Installing Adobe Shockwave Player", "", "Button2", "UnCheck") ControlCommand("Installing Adobe Shockwave Player", "", "Button3", "UnCheck") Send("{ENTER}") BlockInput(0) EndFunc Func _MyFunc3() BlockInput(1) ControlCommand("Installation de Adobe Shockwave Player ", "Successfully Completed", "Button2", "Check") BlockInput(0) EndFunc Edited August 17, 2013 by AutID https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
bordomavi Posted August 17, 2013 Author Share Posted August 17, 2013 Je ne suis pas sure que j'ai compris ce que t'as dis... While 1 If WinExists("Installation de Adobe Shockwave Player", "Erreur lors de l'ouverture du fichier en écriture :") Then If WinExists("Installation de Adobe Shockwave Player", "Erreur lors de l'ouverture du fichier en écriture :") Then If WinExists("Installation de Adobe Shockwave Player ", "Successfully Completed") Then _MyFunc3() EndIf Else _MyFunc2() EndIf Else _MyFunc1() EndIf WEnd Func _MyFunc1() BlockInput(1) ControlCommand("Installation de Adobe Shockwave Player", "Erreur lors de l'ouverture du fichier en écriture :", "Button3", "Check") BlockInput(0) EndFunc Func _MyFunc2() BlockInput(1) ControlCommand("Installing Adobe Shockwave Player", "", "Button1", "UnCheck") ControlCommand("Installing Adobe Shockwave Player", "", "Button2", "UnCheck") ControlCommand("Installing Adobe Shockwave Player", "", "Button3", "UnCheck") Send("{ENTER}") BlockInput(0) EndFunc Func _MyFunc3() BlockInput(1) ControlCommand("Installation de Adobe Shockwave Player ", "Successfully Completed", "Button2", "Check") BlockInput(0) EndFunc not working. it must winwaitactive window1 but while waiting window1 if come window 2 go for window2 and next script Link to comment Share on other sites More sharing options...
FireFox Posted August 17, 2013 Share Posted August 17, 2013 Why aren't you able to translate the mechanism in expressions? Link to comment Share on other sites More sharing options...
bordomavi Posted August 17, 2013 Author Share Posted August 17, 2013 Why aren't you able to translate the mechanism in expressions? i dont understand you Link to comment Share on other sites More sharing options...
FireFox Posted August 17, 2013 Share Posted August 17, 2013 (edited) Me neither. From what you explained, danwilli's example do what you want. Br, FireFox. Edited August 17, 2013 by FireFox Link to comment Share on other sites More sharing options...
FireFox Posted August 17, 2013 Share Posted August 17, 2013 (edited) Please if you are french explain it in french or we won't be able to come up with a solution.... You also have the french autoit forum. Br, FireFox. Edited August 17, 2013 by FireFox Link to comment Share on other sites More sharing options...
bordomavi Posted August 17, 2013 Author Share Posted August 17, 2013 Please if you are french explain it in french or we won't be able to come up with a solution.... You also have the french autoit forum. Br, FireFox. My english is bad. i wrote what i want. " script must wait window1 but while waiting window1 if come window 2 go to window2 and next line" is it hard understand? Link to comment Share on other sites More sharing options...
FireFox Posted August 17, 2013 Share Posted August 17, 2013 (edited) Yes it's hard, it's not proper english.If I translate what you wrote it gives:Script doit attendre window1 mais pendant qu'il attend window1 si vient window2 alors aller à window2 et prochaine ligne. Edited August 17, 2013 by FireFox Link to comment Share on other sites More sharing options...
bordomavi Posted August 17, 2013 Author Share Posted August 17, 2013 Yes it's hard, it's not proper english. If I translate what you wrote it gives: Script doit attendre window1 mais pendant qu'il attend window1 si vient window2 alors aller à window2 et prochaine ligne. i have not write this ? "Script doit attendre window1 mais pendant qu'il attend window1 si vient window2 alors aller à window2 et prochaine ligne." Link to comment Share on other sites More sharing options...
FireFox Posted August 17, 2013 Share Posted August 17, 2013 Nop. This is my translation. I can see french sentences in your example so I presumed you are french. Link to comment Share on other sites More sharing options...
bordomavi Posted August 17, 2013 Author Share Posted August 17, 2013 Nop. This is my translation. I can see french sentences in your example so I presumed you are french. ok. i am still waiting help Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 17, 2013 Moderators Share Posted August 17, 2013 bordomavi, i am still waiting helpYou keep getting offered scripts and then saying that they do not do what you want - so complaining will make you no new friends. I have read through the thread and, like the others, I am not at all sure what you are trying to do. I suggest you write it out as a logic flow rather than AutoIt code - perhaps that will make it easier to understand. Something like this:Run install app Wait for a particular window with text "#########" If this window appears then do ~~~~~~~~ and move on to point 1 But if another window with text "@@@@@@@@@" appears first then do ++++++++++++++ and move on to point 1 ;point 1 and now carry on from hereThe above is what I think you are asking - but even if it is not, I hope you can see how much clearer that is that the short sentences you have been using so far. So over to you - but please stop early bumping your thread, twice is quite enough. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
lionfaggot Posted August 17, 2013 Share Posted August 17, 2013 winwait isnt always the best approach, ive had bugs with this function in the past. here is my personal solution: Func WinLoad($win) Do sleep(100) Until WinExists($win, "") EndFunc Link to comment Share on other sites More sharing options...
bordomavi Posted August 17, 2013 Author Share Posted August 17, 2013 winwait isnt always the best approach, ive had bugs with this function in the past. here is my personal solution: Func WinLoad($win) Do sleep(100) Until WinExists($win, "") EndFunc it is not answer for my question :S Link to comment Share on other sites More sharing options...
FireFox Posted August 17, 2013 Share Posted August 17, 2013 @lionfaggot Is it a personnal choice or do you think that the second parameter of the WinExists function is needed if you set it to an empty string? Br, FireFox. Link to comment Share on other sites More sharing options...
FireFox Posted August 17, 2013 Share Posted August 17, 2013 (edited) it is not answer for my question :S It's not a find the answer forum, a riddle or whatever Edited August 17, 2013 by FireFox OldCodger 1 Link to comment Share on other sites More sharing options...
lionfaggot Posted August 17, 2013 Share Posted August 17, 2013 @lionfaggot Is it a personnal choice or do you think that the second parameter of the WinExists function is needed if you set it to an empty string? Br, FireFox. hm, i assumed these window functions require this. i remember ages ago using it without that and it gave me incorrect parameters or somesuch. though looking through the helpfile i can now see it is not required. i dunno why i do that. good point Link to comment Share on other sites More sharing options...
AutID Posted August 18, 2013 Share Posted August 18, 2013 (edited) While (True) If Not WinActive("window1") Then If WinActive("window2") Then If Not WinActive("window3") Then _MyFunc2() EndIf EndIf If WinActive("window3") Then If Not WinActive("window2") Then _MyFunc3() EndIf EndIf Else _MyFunc1() EndIf Sleep(100) WEnd Func _MyFunc1() ConsoleWrite("Window 1 exists" & @CRLF) EndFunc Func _MyFunc2() ConsoleWrite("Window 2 exists" & @CRLF) EndFunc Func _MyFunc3() ConsoleWrite("Window 3 exists" & @CRLF) EndFunc Edited August 18, 2013 by AutID https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
DW1 Posted August 19, 2013 Share Posted August 19, 2013 i want different. script must winwait window1 but when waiting window1 if exists window2 go next line This is my last try at figuring out what you are asking for. Based on the above, I have to believe this does what you state: While Not WinExists("Window 1") If WinExists("Window 2") Then ExitLoop Sleep(10) WEnd AutoIt3 Online Help Link to comment Share on other sites More sharing options...
FireFox Posted August 19, 2013 Share Posted August 19, 2013 This is my last try at figuring out what you are asking for. Based on the above, I have to believe thisWhat's the difference with the other script you posted? 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