Jump to content
Macro Express Forums

Get mouse cursor to toolbar icon?

Recommended Posts

For various reasons I'd like to get the mouse cursor to the >> icon shown for my Windows 10 Desktop toolbar. Obviously its position might vary. Anyone know how please?



As an associated but slightly off-topic question, is there a way to open the full Desktop, in List or Detail view form, by using an appopriate entry in the Windows Run box?


By 'full' I mean the same one you'd see in icon form on the left of your empty desktop, assuming you had enabled 'Show destop icons'. It consists of the Personal and Public Desktop entries, plus a few extra that MS deem justified, like Recycle Bin etc.


-- Terry, East Grinstead, UK


Link to comment
Share on other sites

This will get you close. You may need to recreate this in Windows 10, as I still cling to Windows 7:


<GET CONTROL Flags="1" Program_Name="EXPLORER.EXE" Class="Shell_TrayWnd" Control="\"TrayNotifyWnd\",\"1\",\"SysPager\",\"3\",\"ToolbarWindow32\",\"1\"" Variable="%SysTray%" Partial="FALSE" Wildcards="FALSE"/>
<MOUSE MOVE Option="\x04" X="0" Y="0" Control="%SysTray%" _PROMPT="0x000A"/>

Get Control: (EXPLORER.EXE) Using z-order -> %SysTray%
Mouse Move: 0, 0 Relative to Control: %SysTray%


There may be a challenge: the "Running Person" will appear briefly in the System Tray while the macro is running, which will temporarily expand the System Tray. This may affect the precision of the script.

Link to comment
Share on other sites

Glad to be of help, Terry. This example demonstrates the usefulness of MEP's "Get Control" feature.


I recently figured out how to use the feature to grab information from a window, even if its title changes, or if it is running in the background.


Here are the "tricks" to use Get Control for a window that's title can change. (MEP refers to window "titles" as window "captions.")


1. Choose "Save control using its coordinates"


2. Delete all text from the "Top Level Window Caption" field that changes. Leave only the unchanging part of the window caption.


3. Change "Exact Match" to "Partial Match."


This week I began revising macros that I scripted years ago, that bring windows into the foreground to extract information. Now I am better able to these manipulations in the background.


Cory has been talking about this for years... hopefully the rest of us are starting to catch up... and catch on...

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for both of those posts, Alan. Excuse delay in responding - been away.


That simple Win + B hotkey was a new one to me, and works fine. Neat!


I too intend to spend some time improving various macros using Controls, and will also try your tips.


-- Terry, East Grinstead, UK

Link to comment
Share on other sites

  • 2 weeks later...

There are many facilities using the Windows key chord that can be useful for macros. Try Win+x for instance. Though some overlap. You can do Win+e for File Explorer but also by doing Win+x then e.

Also I've seen many here make macros to precisely arrange windows in tiles on the desktop to take up all the space. But now one can do Win+[arrow] combinations to do this. This trick was in Win 7 or 8 also but Windows 10 they have expanded it to be even more capable.

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