Jump to content
Sign in to follow this  
gcue

handling the deletion of multiple child windows

Recommended Posts

gcue

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?

Share this post


Link to post
Share on other sites
SmOke_N

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?

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.

Share this post


Link to post
Share on other sites
SIone

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?

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.

Share this post


Link to post
Share on other sites
gcue

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.

Share this post


Link to post
Share on other sites
gcue

thats a good idea..

instead of doing some sort of flag, how can i detect if that handle already exists

i checked winexists but i cant specify a handle in that.

My suggestion: prevent the user from opening the other child window......

Share this post


Link to post
Share on other sites
SmOke_N

thats a good idea..

instead of doing some sort of flag, how can i detect if that handle already exists

i checked winexists but i cant specify a handle in that.

You can't? :mellow:

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.

Share this post


Link to post
Share on other sites
gcue

hmm the help doesnt show that i could specify a $handle

just window title *sigh*

u know something i dont smoke? :mellow:

Edited by gcue

Share this post


Link to post
Share on other sites
PsaltyDS

u know something i dont smoke? :(

One would hope... :mellow:

Look in the help file under "Window Titles and Text (Advanced)" and see what it says about window handles.

:)

Edited 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

Share this post


Link to post
Share on other sites
gcue

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

Share this post


Link to post
Share on other sites
gcue

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

Share this post


Link to post
Share on other sites
SmOke_N

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.

Share this post


Link to post
Share on other sites
SIone

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

Im 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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×