SirHaschke Posted February 8, 2010 Share Posted February 8, 2010 Hello, i have a buit an autoit script, but it doesn't work well. 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") WinWaitActive("smartFIX 4.1 Client Installer") Send("!f") WinWaitActive("smartFIX 4.1 Client Installerinformationen") Send("!j") The script stops here: WinWaitActive("smartFIX 4.1 Client Installer") Send("!f") If i press ALT + i the script continues. Where is the error? Thanks Dennis Link to comment Share on other sites More sharing options...
JohnOne Posted February 8, 2010 Share Posted February 8, 2010 In your script you "Send("!f")" does it need to be Send("!i")" ? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
SirHaschke Posted February 8, 2010 Author Share Posted February 8, 2010 I don't think so. In the attachment is the picture........ I think it's only a little stupid error. Link to comment Share on other sites More sharing options...
JohnOne Posted February 8, 2010 Share Posted February 8, 2010 Not exactly sure, but try using Opt("WinTitleMatchMode", 3) at beginning of your script for Exact title match of the window. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
SirHaschke Posted February 8, 2010 Author Share Posted February 8, 2010 OK. I try this: Opt("WinTitleMatchMode", 3) 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") WinWaitActive("smartFIX 4.1 Client Installer") Send("!f") WinWaitActive("smartFIX 4.1 Client Installerinformationen") Send("!j") But i have the same error :-( Any ideas....... Link to comment Share on other sites More sharing options...
JohnOne Posted February 8, 2010 Share Posted February 8, 2010 When your "script stops", what happens when you press ALT + f ? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
SirHaschke Posted February 8, 2010 Author Share Posted February 8, 2010 (edited) If i press ALT + F the script continues and runs normaly with the next Send("!j") command. Edited February 8, 2010 by SirHaschke Link to comment Share on other sites More sharing options...
JohnOne Posted February 8, 2010 Share Posted February 8, 2010 If its something simple, I certainly cannot see it. You could try putting a sleep after the preceding send and a winactivate after that, if for some reason the window is not starting active. Sorry I couldny help you. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 8, 2010 Developers Share Posted February 8, 2010 (edited) Put the opt() in there that the traydebuging is switched on but my wild guess would be that this is executed to early: WinWaitActive("smartFIX 4.1 Client Installer") Send("!f") .. and that the script is waiting on the next line. Edited February 8, 2010 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
SirHaschke Posted February 9, 2010 Author Share Posted February 9, 2010 (edited) @ John One. Like That? 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") sleep (5000) winactivate("smartFIX 4.1 Client Installer") Send("!f") WinWaitActive("smartFIX 4.1 Client Installerinformationen") Send("!j") @Jos Like this? 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") Opt("WinTitleMatchMode", 3) WinWaitActive("smartFIX 4.1 Client Installer") Send("!f") WinWaitActive("smartFIX 4.1 Client Installerinformationen") Send("!j") Both doesn't help :-( Edited February 9, 2010 by SirHaschke Link to comment Share on other sites More sharing options...
whim Posted February 9, 2010 Share Posted February 9, 2010 @SirHaschke Don't give up - Try putting Sleep(5000) between all your commands, and once it works remove them 1 by 1 If that doesn't do it, you can repeat the process with MsgBox'es between your commands. With this method you can almost always find the exact line where things go wrong. HTH, whim Link to comment Share on other sites More sharing options...
Developers Jos Posted February 9, 2010 Developers Share Posted February 9, 2010 (edited) Step one: Add this at the top of your script and check by hovering over the tray ICON where your script is "hanging": Opt("TrayIconDebug", 1) Then start figuring out why..... Edited February 9, 2010 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
SirHaschke Posted February 10, 2010 Author Share Posted February 10, 2010 OK, i do this: Opt("TrayIconDebug", 1) 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") WinWaitActive("smartFIX 4.1 Client Installer") Send("!f") WinWaitActive("smartFIX 4.1 Client Installerinformationen") Send("!j") Do you mean the icon in the task bar? If i put my mouse cursor over it i see only smartfix.exe. Link to comment Share on other sites More sharing options...
mistersquirrle Posted February 10, 2010 Share Posted February 10, 2010 the TrayIconDebug option doesn't work for compiled scripts. Try just running it not compiled, and you can see the progress. We ought not to misbehave, but we should look as though we could. Link to comment Share on other sites More sharing options...
SirHaschke Posted February 10, 2010 Author Share Posted February 10, 2010 OK. How can i run it not compiled? Link to comment Share on other sites More sharing options...
MHz Posted February 10, 2010 Share Posted February 10, 2010 OK.How can i run it not compiled?If you have the script open in Scite, then you can press F5 button on your keyboard to run the script. Alternatively, you have the option to run the script from the right click of the au3 file if that option suits you. Again alternatively, if you have AutoIt3 from the extracted sfx archive, then you may run AutoIt3.exe and browse to the au3 file to run it. Link to comment Share on other sites More sharing options...
SirHaschke Posted February 10, 2010 Author 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") Link to comment Share on other sites More sharing options...
MHz Posted February 10, 2010 Share Posted February 10, 2010 I run the script (see attachment). I see an inactive window. perhaps that is the problem. Try this code. The WinWaitActive() functions have an added underscore preceding them to call a user defined function to wait, activate and then wait for the window to be active which may help. 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") 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 Link to comment Share on other sites More sharing options...
mistersquirrle Posted February 10, 2010 Share Posted February 10, 2010 I see an inactive window. perhaps that is the problem.You see an inactive window because he just pressed print screen, after opening the Run command. He had forced 'Run' to be the active window. Although I think that making sure you're activating the installation window would be a good idea, since install windows have a tendency to redraw the window, and can sometimes lose focus We ought not to misbehave, but we should look as though we could. Link to comment Share on other sites More sharing options...
SirHaschke Posted February 10, 2010 Author Share Posted February 10, 2010 OK. I try the script from MHZ. Negative. It doesn't work. Same error :-( 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