Jump to content
Macro Express Forums

What Is The Windows 10 Desktop Window Called?

Recommended Posts

As a test, I did the Scope as the window: Program Manager


Script is:

1) If Window "Program Manager" is focused

2) Mouse Right Click

3) End If


yet it didn't work. What do you suggest for the settings of the macro?


(EDIT: I already have an activation for it; it's the middle mouse button)

Link to comment
Share on other sites

Set Scope to Global.  Set the Activation property to Window Title "Program Manager".  That should cause the macro to run whenever the Program Manager screen gets focus. 

When setting Window Title, if you click the Browse button, it should show you the names of available windows to select from.  On my system (Win 7) Program Manager is always in the list because it is lurking in the background.   

Setting Scope "Global" ALLOWS the macro to run in a particular window, but does not MAKE it run.  Setting the activation property is what triggers the macro to run when the window appears.  Once you get it working, you could try setting scope in addition to activation -- in theory it shouldn't hurt anything.

Edit:  OOPS!  Sorry!  I re-read your last post and I see you already have an activation.  So forget what I said about setting a Window Title activation.  But DO try changing Scope to Global.  If still no good, try "If Program Manager is On Top" rather than "If focused".  If still no good, try a different activation, such as a hot key combination -- though I'm grasping at straws with this suggestion. 

Link to comment
Share on other sites

I'm assuming you mean all other windows are closed and you have just your 'desktop' displayed. Not the Desktop folder, which is a sub-folder of 'This PC' in Windows 10.

I don't believe it's possibe to scope that in MX Pro. There's no 'Program Manager' or 'Desktop' entry or similar in the drop-down list of programs under Add Program > Running processes.

Unfortunately I've found in the past that while rberg's method sometimes works at first (such as when you use the Windows hotkey Win+M to close all windows and display just the desktop), it's far from reliable. I tried it again just now and when, in my opinion, the desktop has just regained focus (such as when closing or minimising the only window on top of it), the macro does not run.

I don't have a better general solution. However, in some cases I've found it feasible to test pixel colours at several locations to achieve it.

Link to comment
Share on other sites

Thanks for the replies.

michaelkenward: The Windows Desktop itself. Once you turn on your computer and it's done loading, you see the Windows Desktop.

rberq: Thanks so much for your suggestion, I actually got it closer to working! The thing is in the "If Window" options, I changed it to if it's running (visible or hidden), then the macro worked. It's possible that the Desktop is not called Program Manager, because the macro worked while that hidden program is running, which could refer to a different program. Also, how do I do this: "If Program Manager is On Top"? I cannot find this option. 

terrypin: Yes, the Windows Desktop itself, not the folder. (Yet not necessarily all windows are closed; maybe all windows are minimized and I left click on the Desktop to make the Desktop the "active window"). I found "Program Manager" in the Hidden list of running processes.


Link to comment
Share on other sites


So I tried changing the first option from

"If Window ... is focused"    to

"If Program ... is focused"


(Also terrypin, now I see what you mean. In the "If Program" options, I see a select few Running Processes, yet for the first one I was using, "If Window" there's many more different windows that are running.)

I tried setting all the running processes that I saw to see which ones worked and which didn't, and was able to narrow it down that when selecting EXPLORER.EXE:

[If Program "EXPLORER.EXE" is focused]

then left click on the Desktop (to make the Desktop the active window), then using the middle mouse button to activate the macro... IT WORKED!

BUT.... one tiny issue. EXPLORER.EXE refers to any open File Explorer window, which is not feasable. You see, I have other macros that use that same button when I'm in specific File Explorer windows with specific names. Also, I will not want to change the activation of the macro to anything other than the middle mouse. 

So... this is a lame math problem, but can anyone help me figure out what to do from here? 


Link to comment
Share on other sites


Win+M is a legacy hotkey leftover from Windows 95 or 98. Microsoft introduced Win+D (D for desktop) years ago, and I have generally found it a little more reliable than the old hotkey.


The following key sequence, which has also been around since Windows 95, minimizes all windows; but in Windows 7 and beyond, I am not sure it reliably puts focus on the desktop. But it does lend itself to scripting...


Ctrl + Esc     ' Activate Start/Windows button

Esc               ' Cancel Start button, but leave it focused

Alt + M         ' Minimize all


A related key sequence makes it possible to interact with items on the desktop without actually minimizing any windows. So interaction with desktop items is hidden behind the open windows. For example, to navigate to and activate a desktop icon called "Terry"...


Ctrl + Esc      ' Activate Start/Windows button

Esc                ' Cancel Start button, but leave it focused

Shift + Tab   ' Navigate to the desktop

Terry <Enter>  ' Incremental search to Terry, and press Enter to activate it.


Link to comment
Share on other sites

I was looking at the whole "Control" idea. I tried setting a Control and dragged the X to the Desktop. It shows a bunch of unique information after I set it there (in comparison to if I dragged the X to a File Explorer window [you know, because they're both referred to as EXPLORER.EXE] ). From here, can't I make that Control be that specific unique Windows Desktop information instead of any regular EXPLORER.EXE process?

Link to comment
Share on other sites

I think the Windows desktop is overrated. It's visually busy, hard to keep organized, and challenging to navigate around sans mouse. At various times I have preferred instead to open the desktop as a folder in Windows Explorer: I find it easier to deal with files and folders when they are listed alphabetically, which is easy to do when viewing the desktop as a regular Windows folder:





Link to comment
Share on other sites

" I think the Windows desktop is overrated."

Alan: Me too. I use it (with Show desktop items disabled) only for my regularly changed wallpaper. And nowadays I get to most of my frequently used folders (and a few files) via the Run box and a shortkey macro.

Thanks for your other post about Windows shortcuts. I tend to use legacy Win+M out of long habit, but the 'official' Win+D toggle is better. Both get to 'the desktop', but restoring the previous state is toggled by Win+D whereas you need Shift+Win+M to do it the old way. (And it appears they cannot be mixed.)

Here's one of several summaries showing many other little-used Win 10 shortcuts:

1. Don't forget that Win 10 also allows multiple desktops!

2. It may also be worth experimenting with the scope 'Global Except'.

Slight digression

The screenshot shows my test macro at the start of this discussion.

It's puzzling that it works when all windows are minimised from the 'official' Windows shortcut Win+D. But not from the old Windows shortcut Win+M.


Link to comment
Share on other sites

6 hours ago, terrypin said:

It's puzzling that it works when all windows are minimised from the 'official' Windows shortcut Win+D. But not from the old Windows shortcut Win+M.

win+m says minimize all.  win+d says show desktop.  
According to this link, there is a subtle but significant difference, because some minimized windows are still there, just not visible.  


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.

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.

  • Create New...