mistersquirrle Posted February 10, 2010 Share Posted February 10, 2010 I didn't think that'd work. You tried using sleeps right? but between the Send, and WinWaitActive... try it with it before the send. It's possible that the window title is changing, but taking a while to load buttons... so then it's waiting for the next window (which is why looking at the debug in the tray would be good). Another thing you could try to do with use controls, and have it wait until a button with a certain text comes up, or something. We ought not to misbehave, but we should look as though we could. Link to comment Share on other sites More sharing options...
MHz Posted February 10, 2010 Share Posted February 10, 2010 OK. I do it with Scite and F5. I run the script (see attachment). In the taskbar stands "smartfix.au3 Line16: WinWaitActive("smartFIX 4.1 Client Installerinformationen") Your picture shows that the 2nd last window but your mention of the taskbar (trayicondebug) is line16 which is the last window. Some how the code for the 2nd last window has already been processed. Jos mentioned this possibility in post #9. Try using the text parameter to ensure the 2nd last window processes the correct window. Example of change Opt("TrayIconDebug", 1) _WinWaitActive("smartFIX 4.1 Client - Willkommen") Send("!w") _WinWaitActive("smartFIX 4.1 Client - Client-Komponenten") Send("!w") _WinWaitActive("smartFIX 4.1 Client - Clienttyp") Send("!v") Send("!w") _WinWaitActive("smartFIX 4.1 Client - smartFIX Server Name") Send("W8KBDF14") Send("!w") _WinWaitActive("smartFIX 4.1 Client - Bereit") Send("!i") _WinWaitActive("smartFIX 4.1 Client Installer", 'smartFIX 4.1 Client wurde erfolgreich') Send("!f") _WinWaitActive("smartFIX 4.1 Client Installerinformationen") Send("!j") Exit Func _WinWaitActive($title, $text = "") ; wait for the window WinWait($title, $text) ; force the window to activate WinActivate($title, $text) ; wait for window to be active WinWaitActive($title, $text) EndFunc I believe i got the text right. You may want to check. Now see if it stops at a similar window title that failed the script with previous attempts. Link to comment Share on other sites More sharing options...
SirHaschke Posted February 10, 2010 Author Share Posted February 10, 2010 OK. If i run the script i see in the taskbar smartfix.au3 Line23: WinWait($title, $text) Link to comment Share on other sites More sharing options...
MHz Posted February 10, 2010 Share Posted February 10, 2010 (edited) OK. If i run the script i see in the taskbar smartfix.au3 Line23: WinWait($title, $text) OK, that can mean any window title as the variables do not show their values for us to analyze the issue. But does it stop at the same window as before that you can see? For the TrayIconDebug option to work then you may need to use your original script with the text parameter added like I did in my example script and see what TrayIconDebug show you when the script stops. Edit: This code may help. Does Activation of windows, has the extra text parameter and will show better line identification with TrayIconDebug. expandcollapse popupOpt("TrayIconDebug", 1) WinWait("smartFIX 4.1 Client - Willkommen") WinActivate("smartFIX 4.1 Client - Willkommen") WinWaitActive("smartFIX 4.1 Client - Willkommen") Send("!w") WinWait("smartFIX 4.1 Client - Client-Komponenten") WinActivate("smartFIX 4.1 Client - Client-Komponenten") WinWaitActive("smartFIX 4.1 Client - Client-Komponenten") Send("!w") WinWait("smartFIX 4.1 Client - Clienttyp") WinActivate("smartFIX 4.1 Client - Clienttyp") WinWaitActive("smartFIX 4.1 Client - Clienttyp") Send("!v") Send("!w") WinWait("smartFIX 4.1 Client - smartFIX Server Name") WinActivate("smartFIX 4.1 Client - smartFIX Server Name") WinWaitActive("smartFIX 4.1 Client - smartFIX Server Name") Send("W8KBDF14") Send("!w") WinWait("smartFIX 4.1 Client - Bereit") WinActivate("smartFIX 4.1 Client - Bereit") WinWaitActive("smartFIX 4.1 Client - Bereit") Send("!i") WinWait("smartFIX 4.1 Client Installer", 'smartFIX 4.1 Client wurde erfolgreich') WinActivate("smartFIX 4.1 Client Installer", 'smartFIX 4.1 Client wurde erfolgreich') WinWaitActive("smartFIX 4.1 Client Installer", 'smartFIX 4.1 Client wurde erfolgreich') Send("!f") WinWait("smartFIX 4.1 Client Installerinformationen") WinActivate("smartFIX 4.1 Client Installerinformationen") WinWaitActive("smartFIX 4.1 Client Installerinformationen") Send("!j") Edited February 10, 2010 by MHz Link to comment Share on other sites More sharing options...
SirHaschke Posted February 11, 2010 Author Share Posted February 11, 2010 I have the solution :-) I must create a loop. This is the final script: WinActivate ("smartFIX 4.1 Client - Willkommen") Send("!w") WinWaitActive("smartFIX 4.1 Client - Client-Komponenten") Send("!w") WinWaitActive("smartFIX 4.1 Client - Clienttyp") Send("!v") Send("!w") WinWaitActive("smartFIX 4.1 Client - smartFIX Server Name") Send("W8KBDF14") Send("!w") WinWaitActive("smartFIX 4.1 Client - Bereit") Send("!i") $h = 0 While $h <= 500 Send("!f") $h = $h + 1 WEnd WinWaitActive("smartFIX 4.1 Client Installer") Send("!f") WinWaitActive("smartFIX 4.1 Client Installerinformationen") Send("!j") Thanks for your help. Dennis Link to comment Share on other sites More sharing options...
Vlademon Posted February 11, 2010 Share Posted February 11, 2010 I have a very easy script but it is not work ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: RunWait('alcohol.exe /s') ControlClick('Installer Language','Please select a language','Button1') ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: The first command is OK, but the second command is not work (no mistake in debug window). Help!!! Sorry, I am Russian, my English is not very good:) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 11, 2010 Moderators Share Posted February 11, 2010 Vlademon,Welcome the AutoIt forum. But this is not the way to start - you should open a new topic for your question, not hijack this one. Please do not reply here - just start a new topic in the forum and I am sure someone will help you there.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...
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