AutoHotkey Community

It is currently May 27th, 2012, 11:25 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: July 26th, 2005, 7:30 pm 
Offline

Joined: May 5th, 2005, 1:52 pm
Posts: 16
Hi, I just updated from 1.0.36.something and a script that previously worked broke when it hit a line:

WinWaitClose,, Look

This was during navigating for a file in another program.
The "Look" that it used to find was text from a "Look In" typical windows file navigation window to the left of the address bar showing the current folder. (older style that doesn't allow pasting of the complete path in the address bar). AutoIt3 Window Spy does still show "Look In" under the "Window Text" area.

AHK 1.0.36.(might have been 28? I don't recall the version I updated from but it was a couple months old) saw the "Look" text fine, 1.0.37.2 behaves oddly: It just sits there forever even if I manually reopen then close the window containing "Look".

"WinWaitActive,, Look" seems to still behave properly.
If I use "WinWaitClose,, Look, 2" then it hits the 2 second timeout every time.

All that I have changed was the ahk version.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2005, 3:48 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I can't reproduce it yet, so maybe you can try the following script on your system:

Run Calc
WinWait Calculator
WinActivate
WinWaitClose,, sqt ; The square-root button I think.
MsgBox Calculator was just closed.

Thanks for reporting this. Hopefully we can get to the bottom of it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2005, 6:40 am 
Offline

Joined: May 5th, 2005, 1:52 pm
Posts: 16
I'n no C/C++ guy...all I know is my script used to run and now it doesn't, and the only change was the AHK version. The "look" text I alured to wasn't the primary text but several lines down, perhaps that had something to do with it? I'm running it against a proprietary database that is basically a front end for a fox pro db...swapping back and forth from Excel to the db. The file lookup routine was in the foxpro db app...it's called "Advisors Assistant" but that shouldn't matter....perhaps they (Advisors Asst) used some outdated 16 bit File lookup .dll or something....it's a pretty primitive program (terrible import capabilities ... hence my AHK scripting to be the middleman).

If I get the chance I'll try to reproduce the error/anomoly on a more mainstream app. No promises on that one tho....too busy as it is (aren't we all?)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2005, 1:21 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
wedgenix wrote:
all I know is my script used to run and now it doesn't
Now that I think about it more, the most likely explanation for this behavior is that there is a second window somewhere on your system containing the word Look. Thus, when the line WinWaitClose,, Look is encountered, the program waits forever because that other window is a match.

If possible, try choosing a more distinct word or phrase from the window text. You might also try specifying a class name in WinTitle to make the search more selective. For example:

WinWaitClose, ahk_class ClassNameShownByWindowSpy, Look


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2005, 2:00 pm 
Offline

Joined: May 5th, 2005, 1:52 pm
Posts: 16
That was the first thing I checked...but I certainly will check again. Sometimes I do rush over the simple checks too quick.

If it *does* turn out to be that....I apologize for taking up some of your time needlessly. Will post back once I get in the office and check it out.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2005, 3:47 pm 
Offline

Joined: May 5th, 2005, 1:52 pm
Posts: 16
Well, Chris...Sorry to have taken up your time. I was running a local network scan in the background that I had scheduled and forgotten about, and sure enough it contained the work "look".

I do appreciate the advice on using ahk_class in addition to the text. That'd be a better practice, and I hadn't thought of it...I still don't quite think in ahk mode yet, but am getting closer day by day :)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group