Jump to content
Macro Express Forums

Learning more about Hidden windows?


Recommended Posts

I looped through the whole hidden list, unhiding and putting on top for two seconds then hiding again. Many were simply a little piece of a title bar. Many others were a title bar with a window frame but nothing in it. Some of the empty windows were transparent, some were opaque. Nothing exciting appeared except the laptop Power Meter.

 

A similar exercise here (on about 160 hidden windows) gave me a mixture of

- Recognisable/expected (the minority in my case, but that's probably because I'm not a programmer or similar)

- Shouldn't logically still be hanging around (e.g. Outlook reminder messages I closed hours ago)

- Programs I thought were uninstalled - I'll have to double-check.

- No idea what they are ('M', 'Default IME, 'NetscapeDispatchWnd', etc. etc) These were the bulk in my case.

- The running macro itself! (Which duly froze; had to terminate MEP).

- Notable weirdies (like 'You are using a Pirated Licence Key', which appears to be a spam window from MailWasher, presumably to encourage me to upgrade to MailWasher Pro)

 

Overall, probably all best left safely hidden!

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

I do now remember once being told that everything in Windows is a window, e.g. scrollbards, listboxes, comboboxes - all are windows. Perhaps this accounts for it?

 

That would square with what I'm seeing here.

 

My original post was prompted by seeing the option to use a hidden window for scoping. As I asked here, I'm still curious to know of a practical use for that?

 

Edit: Another line of enquiry might be the relationship (if any) between Processes and Windows. From a brief study I can't see any obvious correspondence between the 76 processes listed by Task Manager and Process Explorer and the 185 windows currently listed by ME Pro. As for the 480 or so 'windows' listed the last time I ran the tool Cory found, wndlist.exe, that's another remaining puzzle.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

I don't think everything is a window.

................................................

I do now remember once being told that everything in Windows is a window, e.g. scrollbards, listboxes, comboboxes - all are windows. Perhaps this accounts for it?
I think that in some programming languages this might be so. Right now I'm trying to learn (very busy so it's going slowly) VB.NET and in there everything you do has to be attached to a form (AKA Window). If you don't want it visible then you make it inviso. But I'm sure that's not true for all and an example would be the services and such running on your PC. But I was talking to a guy and he was talking about the importance of destroying objects after you're done with them. I wonder if what we're seeing here is old form objects that were not destroyed properly when the program quit. Or at least handles for their windows. Something odd like that.

 

In any case I that MEP is simply passing along the list from the OS and doing nothing wrong.

Link to comment
Share on other sites

Like I said before.

.....................................................

I'm still curious to know of a practical use for that?
Didn't you like my speculation in that other reply of mine? There I speculate that ISS doesn't intend that you would ever set scope to a hidden window but rather that this is a common window picker and that for other window commands one might want to pick a hidden window. EG "If Window Exists" kind of thing.
Link to comment
Share on other sites

Like I said before.

.....................................................

Didn't you like my speculation in that other reply of mine? There I speculate that ISS doesn't intend that you would ever set scope to a hidden window but rather that this is a common window picker and that for other window commands one might want to pick a hidden window. EG "If Window Exists" kind of thing.

 

I couldn't see how that explained why ISS introduced a Hidden tab under Scope. As I said here, "...why does ME Pro offer these largely obscure hidden windows for Scoping? ME 3 didn't. What's the intention, the potential usefulness?". ME3 included the facility to access Hidden folders in commands like Repeat with Windows, just like ME Pro, but not for scoping.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

You're killing me dude.

.........................................

It's a common dialog! Please, please, do me a favor and insert an If Window command and click the browse button to get the Select Window dialog. Look familiar? It's the same box with visible and hidden tabs. Now go to the Windows Activate command and click the browse button. Yup, same dialog.

 

Look. If you design a form like this you can use it in many places. I mean you wouldn't write a different file selection dialog every time you wanted to pick a file, right? So if you can think of several places you might want a window picker you're going to design it to work in as many places as possible even if some features like a hidden tab would be non-applicable in some applications. I'm just certain this is the case and ISS had never suggested that you would scope a macro to a hidden window. In fact I'd be willing to bet a beer on it.

Link to comment
Share on other sites

You're killing me dude.

.........................................

It's a common dialog! Please, please, do me a favor and insert an If Window command and click the browse button to get the Select Window dialog. Look familiar? It's the same box with visible and hidden tabs. Now go to the Windows Activate command and click the browse button. Yup, same dialog.

 

Look. If you design a form like this you can use it in many places. I mean you wouldn't write a different file selection dialog every time you wanted to pick a file, right? So if you can think of several places you might want a window picker you're going to design it to work in as many places as possible even if some features like a hidden tab would be non-applicable in some applications. I'm just certain this is the case and ISS had never suggested that you would scope a macro to a hidden window. In fact I'd be willing to bet a beer on it.

 

I understand it's a common dialog. It just seems to me that, if it really was not intended to be used for Scope, then it would have been easy enough to make the minor change of removing the Hidden tab in that case. I keep pointing to ME3 for comparison, but you haven't commented on that. In ME3 the dialogs only include Hidden when presumably they are thought appropriate. Such as Repeat with Windows. It's no big deal - I'm just curious why the design of this changed in ME Pro. And I won't be taking your bet, as I agree with your guess on that!

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

You're still killing me. :)

...................................

It wouldn't be common if you had to have different versions for each application. If they wanted one that didn't have the tab for hidden windows they would probably have to create a copy and remove the tab. Now each time they make a change to windows pickers they need to change two places. Easier to maintain one and rely on folks common sense that there would be no application whatsoever for setting scope to a hidden window. I did address it by saying that there is no reason you would ever want to set a hidden window for scope. I mean you can do it, but it would be very, uhhhh... limiting.

 

Let me put it another way. I can create a repeat and specify one iteration. According to your argument they should not allow us to ender a value of one because it would be pointless. But who cares if they let us? It doesn't hurt anything if I decide to add superfluous lines of code. There will always be things like this in life, just get over it. ;) I'm officially done with this branch of conversation topic.

Link to comment
Share on other sites

I can create a repeat and specify one iteration. According to your argument they should not allow us to ender a value of one because it would be pointless. But who cares if they let us?

Not a good example, Cory. A Repeat using exactly one iteration has been a very useful technique for avoiding complex If or Case statements, and I have used this in many places (though I'm not sure if it's still as relevant in MEP)!

Link to comment
Share on other sites

I found a simple utility

........................................

http://software.filestube.com/download,7bf2c89d.html

I ran this and found a total of about 900 windows when MEP only shows 185 in total. Here we can see the handle of each and the status. Most appear with a status of SW_HIDE and visible are SW_SHOWNORMAL. Many of the ones which appear redundant have additional text of (Disabled). I think these disabled windows might constitute the build up. Maybe MEP just needs to add the option to filter out the disabled windows. R maybe it is and that's the difference between 900 and 185. Maybe Windows doesn't really destroy windows but keeps the handle handy for reuse or something. I'll let it run for awhile and see if it echoes what MEP is listing. Dang, I wish I could export this list for comparison.

 

I did some further research on this tool. Unlike ME Pro it doesn't report open windows as I originally thought. It appears that it scans the process list and scans the code for dialog boxes and other 'controls', and prints them in a list whether that box is currently open or not. So it's not really useful in this context after all.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...