gcue Posted November 4, 2008 Share Posted November 4, 2008 i have a function that opens a child window, but if for some reason the user opens another instance of the same child window - the first one is closabe but not any previously opened ones using Guidelete($childwindow) any suggestions? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 4, 2008 Moderators Share Posted November 4, 2008 i have a function that opens a child window, but if for some reason the user opens another instance of the same child window - the first one is closabe but not any previously opened onesusing Guidelete($childwindow)any suggestions?No offense, but you can't seriously think someone is going to auto-magically come up with a solution to your specific issue without seeing a replication script ... can you? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
SIone Posted November 4, 2008 Share Posted November 4, 2008 i have a function that opens a child window, but if for some reason the user opens another instance of the same child window - the first one is closabe but not any previously opened onesusing Guidelete($childwindow)any suggestions?My suggestion: prevent the user from opening the other child window...... Perilous to all of us are the devices of an art deeper than we ourselves possess. Link to comment Share on other sites More sharing options...
gcue Posted November 4, 2008 Author Share Posted November 4, 2008 No offense, but you can't seriously think someone is going to auto-magically come up with a solution to your specific issue without seeing a replication script ... can you?hehhe i figured the concept was enough to go at =)but on second thought ur probably right. Link to comment Share on other sites More sharing options...
gcue Posted November 4, 2008 Author Share Posted November 4, 2008 thats a good idea..instead of doing some sort of flag, how can i detect if that handle already existsi checked winexists but i cant specify a handle in that.My suggestion: prevent the user from opening the other child window...... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 4, 2008 Moderators Share Posted November 4, 2008 thats a good idea..instead of doing some sort of flag, how can i detect if that handle already existsi checked winexists but i cant specify a handle in that.You can't? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
gcue Posted November 4, 2008 Author Share Posted November 4, 2008 (edited) hmm the help doesnt show that i could specify a $handle just window title *sigh* u know something i dont smoke? Edited November 4, 2008 by gcue Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 4, 2008 Share Posted November 4, 2008 (edited) u know something i dont smoke? One would hope... Look in the help file under "Window Titles and Text (Advanced)" and see what it says about window handles. Edited November 4, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
gcue Posted November 4, 2008 Author Share Posted November 4, 2008 im trying this and am getting a false positive (no autoit scripts running other than these lines): global $User_Add_child if WinExists($User_Add_child) then MsgBox(0,"","exists") EndIf Link to comment Share on other sites More sharing options...
gcue Posted November 4, 2008 Author Share Posted November 4, 2008 o wait nevermind i see the problem. so i have to specify what the handle is with the title $handle = WinGetHandle("Untitled - Notepad", "") WinExists($handle) hmm wanted to avoid doing that - o well Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 4, 2008 Moderators Share Posted November 4, 2008 Your post is very misleading. It first makes it sound like you are working with your own application, now you're saying you have to use WinGetHandle, however in AutoIt, $h_child_hwnd = GUICreate() ... GUICreate() returns your childs handle. If this doesn't help, then you need to bite the bullet and create a recreation script. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Bert Posted November 4, 2008 Share Posted November 4, 2008 I suspect he has the child window and the parent window in the same loop. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
SIone Posted November 4, 2008 Share Posted November 4, 2008 o wait nevermind i see the problem.so i have to specify what the handle is with the title$handle = WinGetHandle("Untitled - Notepad", "")WinExists($handle)hmm wanted to avoid doing that - o wellIm glad the nudge helped!So have you now resolved your problem?If not then it would be helpful if you were to post your script. Perilous to all of us are the devices of an art deeper than we ourselves possess. 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