Jump to content

handling the deletion of multiple child windows


gcue
 Share

Recommended Posts

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

  • Moderators

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

  • Moderators

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

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...