MattH 0 Posted October 18, 2007 I've been using autoit for about a month and really like it. Recently, I've started writing scripts that include activating an application's window. When running the beta run in SciTe, I've noticed that eventually, WinWait, WinActive, WinExists, etc. all "think" that the application's window is still there, even though I've closed the application. The result is that even if the applciation window is open, the script doesn't execute against it. Instead, it just runs to completion as if everything is ok. Like it executed in some ghost window. The only fix that I've found for this is to log off and back on. I can't figure out what's causing it, but it does seem that if I leave SciTe up for a while and do other work or walk away from the computer, that when I get back, this problem occurs. I'm on Vista Enterprise. Has anyone else experienced this? Share this post Link to post Share on other sites
DW1 102 Posted October 18, 2007 Can you reproduce this with code for us to see? AutoIt3 Online Help Share this post Link to post Share on other sites
MattH 0 Posted October 18, 2007 It does it with any window, even notepad. I even try using the recorder, which is what produced the code below. #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("Untitled - Notepad","") If Not WinActive("Untitled - Notepad","") Then WinActivate("Untitled - Notepad","") WinWaitActive("Untitled - Notepad","") Send("hey") #endregion --- ScriptWriter generated code End --- Share this post Link to post Share on other sites
DW1 102 Posted October 18, 2007 what is that code doing that it shouldn't? AutoIt3 Online Help Share this post Link to post Share on other sites
MattH 0 Posted October 18, 2007 I can have notepad up, and it won't type hey. Also, I can close notepad, add $chk = winexists("Untitled - Notepad"), msgbox(0,"",$chk) to the script, run it, and I get a 1, meaning it found it. Log off and back on, run the same script and i get 0. Share this post Link to post Share on other sites
MattH 0 Posted October 18, 2007 If I go to new app, winexists, winactivate, etc. work fine. So, I plug in notepad again and it will fail. The wintitle is being held in memory somewhere. Share this post Link to post Share on other sites
MattH 0 Posted October 18, 2007 Just trying different things, I just closed Outlook and Yahoo chat, and I'm getting a winexists = 0. I reopened these two apps and still getting the 0. Could be timing, or one of them might be cashing wintitles for fun! Share this post Link to post Share on other sites
DW1 102 Posted October 18, 2007 do you think this could be your problem? Opt("WinTitleMatchMode",4)oÝ÷ Ù8b²+8 AutoIt3 Online Help Share this post Link to post Share on other sites
DW1 102 Posted October 18, 2007 Please let me know if the solution provided worked. AutoIt3 Online Help Share this post Link to post Share on other sites
MattH 0 Posted October 18, 2007 I've tried changing that and I have tried not using it. Neither seem to make any difference. Share this post Link to post Share on other sites