Jump to content
Macro Express Forums

Activate only from the desktop?


Recommended Posts

I want to scope a macro only from my XP Pro desktop, i.e. when I have minimised all other windows. Anyone know how to do that please?

 

I'm not clear why neither of the following two methods worked.

 

1. Specifying 'Window/Program Specific' and 'Program Manager' as the window.

 

This was based on my hazy understanding that 'Program Manager' was effectively the desktop, although that begs the question as to why it's listed under Visible, not Hidden?

 

2. Specifying Global Except and defined the window as '*', as shown here:

 

post-1217-1266086155_thumb.jpg

 

I was vaguely optimistic that the above would be interpreted as 'Run except when any visible window is on top'.

 

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

I cannot see a way to do it, but I may be wrong. I assume you must have some obscure reason for this scope like telling all windows have minimized by previous events rather than wanting to do something on the Desktop. Desktop is not really a window and it's never on top. In the scope there is no way to tell all other windows are minimized. There are plenty of ways to do the same thing in the actual macro but that requires the macro to start and cancel itself depending on what it does/finds. Normally, one would Win+D with some delay or window check and proceed with what needed to be done on the Desktop.

Link to comment
Share on other sites

I want to scope a macro only from my XP Pro desktop, i.e. when I have minimised all other windows. Anyone know how to do that please?

Well, in Windows 7 (and probably in XP too), I can have one window visible (i.e. all others are either not loaded or minimized). I can click the desktop and the one visible window is no longer the focused or active window. So your "i.e. when I have..." statement should probably read "e.g. when I have", which of course is quite different in meaning.

 

I have defined a macro with its scope set to Program Manager (The window must be on top, and The title is an exact match) and its hotkey fires only when no window has the focus, so it seems to work the way you wanted.

Link to comment
Share on other sites

Well, in Windows 7 (and probably in XP too), I can have one window visible (i.e. all others are either not loaded or minimized). I can click the desktop and the one visible window is no longer the focused or active window. So your "i.e. when I have..." statement should probably read "e.g. when I have", which of course is quite different in meaning.

 

I have defined a macro with its scope set to Program Manager (The window must be on top, and The title is an exact match) and its hotkey fires only when no window has the focus, so it seems to work the way you wanted.

 

No, I want to do exactly what I said: have the macro activate only "when I have minimised all other windows." That's a state achievable in a variety of ways, but I always do it with the Windows keyboard shortcut <Win + M>, 'Minimize all windows'. Sometimes I use the other standard shortcut, <Win + D>, 'Show the desktop', which seems effectively identical for practical purposes, although maybe there is a subtle difference?

 

Anyway, my macro must activate when all that is visible on my screen is the desktop (with or without its shortcut icons and/or wallpaper). Not merely when some part of the desktop has been clicked (removing focus from whatever was focused previously). Can you do that? As I said, my attempt (which sounds identical to yours) doesn't work.

 

It's called 'Test activation only from desktop', has one line of script, activated by <Ctrl+Shift+2> and has a scope of Program Manager, Exact, On Top.

 

Its flaw is that it activates when other (unfocused) windows are still visible, and I presume yours has the same failing?

 

To satisfy John's curiosity and also to explain why a visible unfocused window would be a second-best solution, here's one of several examples. I have an application called Wallpaper Slideshow Pro which displays one of thousands of photos randomly on my screen at intervals. With this image fully visible, occupying as much of the screen as its aspect ratio allows, I want macros to perform various operations. For example, open that image in Picasa to allow me to straighten its horizon. Or add that image to a particular folder.

 

But I already have too many hotkeys assigned with Global scope (awaiting severe culling). And I like my hotkeys to have some mnemonic content. So I'm running out of remaining candidates.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

variety of ways, but I always do it with the Windows keyboard shortcut <Win + M>, 'Minimize all windows'. Sometimes I use the other standard shortcut, <Win + D>, 'Show the desktop', which seems effectively identical for practical purposes, although maybe there is a subtle difference?

On my machine, Win+M seems to minimize only the windows on my primary monitor, while WIn+D minimizes or restores all windows.

Anyway, my macro must activate when all that is visible on my screen is the desktop (with or without its shortcut icons and/or wallpaper). Not merely when some part of the desktop has been clicked (removing focus from whatever was focused previously). Can you do that? As I said, my attempt (which sounds identical to yours) doesn't work.

It works in the same way for me as for you. What about allowing the macro to fire when the desktop has the focus, and then determining if all windows are minimized, and if not then exiting without doing anything? That ought to be possible via an AutoIt dynamic script.

I must confess that I shudder when I hear about, or see, people using wallpapers. Have you any idea how many resources that uses? No wonder people complain about their slow machines!

Link to comment
Share on other sites

On my machine, Win+M seems to minimize only the windows on my primary monitor, while WIn+D minimizes or restores all windows.

 

Thanks, that explains it. (Start > Help and Support > Windows keyboard shortcuts overview didn't.) Only one monitor here.

 

It works in the same way for me as for you. What about allowing the macro to fire when the desktop has the focus, and then determining if all windows are minimized, and if not then exiting without doing anything? That ought to be possible via an AutoIt dynamic script.

 

Haven't got properly into learning AutoIt.

 

I must confess that I shudder when I hear about, or see, people using wallpapers. Have you any idea how many resources that uses? No wonder people complain about their slow machines!

 

I'd have to methodically test that. Can you point to evidence, such as seeing any significant change under Task Manager or Process Explorer? I don't see why changing wallpaper every 30 s (at most - sometimes I leave it unaltered for days) should be such a resource drain?

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

You should get a decent bulk image editor like ThumbsPlus (payware). No brush tools but does overall image corrections. It's slideshow capability is comparable to most standalone applications. At any time you can break the slideshow and edit the current image. If you want to go to an external brushtool-type editor you can customize the toolbar to open the selected image in the application. Using the internal editor, it remembers the last edit so you can quickly do repetitive edits on a set or create a batch file with custom settings. You can update thumbs live or keep them stored in a database for quick image access. It will load a folder of 10,000 made thumbnails in seconds.

 

It's one application for which I've almost no ME macros. It already does everything I need. Kind of disappointing. It's also an application that uses simple keystrokes like C (colour correction), L (last, repeat previous edit) so there's minimal two-fingering.

 

(Edit) Activating with the desktop sounds one of those scenarios where it can be firing off at unexpected times. You could not put it in a macro file with your normal "daily" macros. Well, you could but I wouldn't! Presumably your plan is to hit the slideshow hotkey to stop or freeze the slideshow and the macro will then run. If that is the case why can't you have a hotkey macro that checks if the slideshow program is running; if it is, stop/freeze it and start Picasa or whatever?

Edited by JohnS
Link to comment
Share on other sites

You should get a decent bulk image editor like ThumbsPlus (payware). No brush tools but does overall image corrections. It's slideshow capability is comparable to most standalone applications. At any time you can break the slideshow and edit the current image. If you want to go to an external brushtool-type editor you can customize the toolbar to open the selected image in the application. Using the internal editor, it remembers the last edit so you can quickly do repetitive edits on a set or create a batch file with custom settings. You can update thumbs live or keep them stored in a database for quick image access. It will load a folder of 10,000 made thumbnails in seconds.

 

It's one application for which I've almost no ME macros. It already does everything I need. Kind of disappointing. It's also an application that uses simple keystrokes like C (colour correction), L (last, repeat previous edit) so there's minimal two-fingering.

 

TP is OK (I first installed it years ago) but I don't rate it as highly as you do. But we're talking about a wallpaper changer here. On the few occasions I need a slideshow, I use IrfanView or FastStone Image Viewer, both freeware. But I prefer a simple wallpaper changer which I glimpse occasionally as I work.

 

(Edit) Activating with the desktop sounds one of those scenarios where it can be firing off at unexpected times. You could not put it in a macro file with your normal "daily" macros. Well, you could but I wouldn't!

 

Again, not sure why that's relevant in the current context?

 

Presumably your plan is to hit the slideshow hotkey to stop or freeze the slideshow and the macro will then run. If that is the case why can't you have a hotkey macro that checks if the slideshow program is running; if it is, stop/freeze it and start Picasa or whatever?

 

I think you've misunderstood my earlier post(s). WSS Pro is always running. Unless I deliberately exit it - which I might do more often if Paul comes up with any evidence for his assertion up-thread!

 

I gave an example of why I want to be able to activate when only the desktop is visible. And as I said, I already have macros operating on WSS Pro. For example, if I notice a photo I particularly like I'll hit <Ctrl+Shift+F> while it's on screen (no need to stop) and it will get added to my Favourite Photos folder for later attention. But, as I said, there are a limited number of shortcuts with mnemonic value.

 

And there are other reasons for my requirement. Such as being able to assign 'Global Except when only desktop is visible'. Any thoughts from anyone on why my use of a wildcard * to achieve that doesn't work?

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

I got the wrong end of the stick(s) there. I saw Slideshow and not Wallpaper and I'm thinking of Activation not Scope. I got into the Activation groove because you talked about lack of hotkeys and "my macro must activate when all that is visible on my screen is the desktop".

 

I still can't see why your macro cannot have Global scope and do the Win+D command first in the macro? If you have an odd restored down window but can still see part of the wallpaper for selection purposes, the macro will run, minimizing that window first. Then you can have whatever macro steps you wish. Repeating the Win+D at the end restores windows to previous states (mostly, not those minimized to tray). Perhaps it's related to using a hotkey for two tasks and differentiating by Scope? Perhaps I'm being dense.

 

Program Manager seems to be a vestige from Windows 3 where it was a window and the main location to run programs from. It has Windows window properties. It appears to be a real oddball as shown by Paul's "Desktop on top and one out of focus window". Perhaps that's a glitch in ME's programming. For the average user, Desktop is not treated as a window. If you send a window to the bottom, it does not disappear, it's still above the Desktop. It's quite clear that ME sees Program Manager/Desktop as a window because it lists it as Visible. Put * as exceptions and it's bound to include Program Manager/Desktop. (edit) I double-checked Program Manager's status on my PC using AutoIt. Program Manager is a visible window, handle 0x00010080 so there is agreement with ME's window listing. There's a reasonable explanation of window order here.

 

Re hotkeys, when I extracted the stats for all my macros to Excel, I found that half had no activation. There is a limit to how many hotkeys you can remember and are also reasonably accessible with one hand. I start most macros from ME Explorer and save the hotkeys for macros that can only be that activation. In office situations I guess you would be more likely to use pop-up menus and a few hotkeys.

 

Re graphic editors, IrfanView is my Win default and I also have FastStone (which can also store thumbs). I normally have TP running and if I want to see some images I activate its slideshow button. I also have some IrfanView slideshows (fixed content) activated by ME.

 

I don't see much point in having changing desktops if you cannot see them under other windows but then I'm running everything fullscreen. If I had a wallpaper slideshow that I wanted to see I would Win+D. Anyway, "Chacun a son gout" and all that.

 

I don't change wallpapers automatically but I have a shortcut on the Desktop that activates an ME macro that changes the wallpaper randomly from any folder or folder tree. Making it automatic on a timed basis would be possible but ME is a bit iffy with timing in those sort of situations (no ability to halt) and the macro may be more troublesome with other macros running (compared to WSS Pro).

Edited by JohnS
Link to comment
Share on other sites

I got the wrong end of the stick(s) there. I saw Slideshow and not Wallpaper and I'm thinking of Activation not Scope. I got into the Activation groove because you talked about lack of hotkeys and "my macro must activate when all that is visible on my screen is the desktop".

 

No problem, I often get the two entities scrambled in my thinking!

 

I still can't see why your macro cannot have Global scope and do the Win+D command first in the macro? If you have an odd restored down window but can still see part of the wallpaper for selection purposes, the macro will run, minimizing that window first. Then you can have whatever macro steps you wish. Repeating the Win+D at the end restores windows to previous states (mostly, not those minimized to tray). Perhaps it's related to using a hotkey for two tasks and differentiating by Scope? Perhaps I'm being dense.

 

I'll have to think it all through again when I have more time, and I'll report back then. But yes, the requirement essentially stems from wanting to use the same hotkey for two macros (with the possible complication that both hotkeys are also used by a couple of my major applications) and hence needing to use scoping to differentiate.

 

Program Manager seems to be a vestige from Windows 3 where it was a window and the main location to run programs from. It has Windows window properties. It appears to be a real oddball as shown by Paul's "Desktop on top and one out of focus window". Perhaps that's a glitch in ME's programming. For the average user, Desktop is not treated as a window. If you send a window to the bottom, it does not disappear, it's still above the Desktop. It's quite clear that ME sees Program Manager/Desktop as a window because it lists it as Visible. Put * as exceptions and it's bound to include Program Manager/Desktop. (edit) I double-checked Program Manager's status on my PC using AutoIt. Program Manager is a visible window, handle 0x00010080 so there is agreement with ME's window listing. There's a reasonable explanation of window order here.

 

Yes, it's not your average window. ;)

Re hotkeys, when I extracted the stats for all my macros to Excel, I found that half had no activation. There is a limit to how many hotkeys you can remember and are also reasonably accessible with one hand. I start most macros from ME Explorer and save the hotkeys for macros that can only be that activation. In office situations I guess you would be more likely to use pop-up menus and a few hotkeys.

 

My No Activation is close to that, from a quick scroll down ME Explorer in Activation sequence. I'm gradually culling the total anyway, but also switching where possible to menu-based activation. Most of my menus are application based (as are my categories). I activate a pop-up menu for XYZ with a middle click on the title of its window. (Desktop, of course, has none. So far my 10 'desktop' macros are confined to WSS Pro, and all use hotkeys.)

 

Re graphic editors, IrfanView is my Win default and I also have FastStone (which can also store thumbs). I normally have TP running and if I want to see some images I activate its slideshow button. I also have some IrfanView slideshows (fixed content) activated by ME.

 

Most of my image file types are associated with IrfanView, but I've just noticed that FastStone has a 'Wallpaper Anywhere' feature. I expect I could have saved myself the small cost of WSS Pro had I known that a year ago.

 

 

I don't see much point in having changing desktops if you cannot see them under other windows but then I'm running everything fullscreen. If I had a wallpaper slideshow that I wanted to see I would Win+D. Anyway, "Chacun a son gout" and all that.

 

I don't change wallpapers automatically but I have a shortcut on the Desktop that activates an ME macro that changes the wallpaper randomly from any folder or folder tree. Making it automatic on a timed basis would be possible but ME is a bit iffy with timing in those sort of situations (no ability to halt) and the macro may be more troublesome with other macros running (compared to WSS Pro).

 

I like full-screen for some aplications too, but on a 24" screen it's often unnecessary. And sometimes a new wallpaper will catch my attention as I minimise or re-focus etc. And of course I occasionally hit Win+d to see what has appeared, if I've left WSS Pro in its 30 second random cycling state.

 

That FastStone feature may be useful for adapting your macro.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Thanks for bearing with my density! The Desktop is one of the more useless areas of the GUI which is why your approach seemed odd. Not much accessible from it. Any program starts from it are intended for manual initiation. If you did not have so many desktop macros you could simply add shortcuts for them to the Desktop, which is how I normally change my random wallpaper. I made those wallpaper macros into mxe files so it's a straight link on the Desktop. You should be able to do some sort of shortcuts using Command Line Parameters per the Help.

 

I don't use pop-ups - can't you initiate a pop-up or some form of menu from a Desktop shortcut? How about a radio button Multichoice Display? Or a checkbox Multichoice Display so you can do the whole shooting match in one blaze of macros, sequenced or simultaneous! I do that for my TV webpage downloading. It brings up a Multichoice Display - I can check individual macros if I wish. The first checkbox will initiate all of the macros sequentially. You could even preset your most common macro selection so you don't even have to click, just hit OK!

 

I've been thinking about revisiting some of my old macros now that I have a wider knowledge and more ideas on how to beat the system. Who was it said you shouldn't play in the registry?

 

All my graphic editors seem to show the filename in the taskbar tooltip. I don't have any that I minimize to the tray but I suspect they would have the same tooltip. I just posted that thread about getting the full tray icon tooltip from a partial using External Script. You would search on the partial application name and get back the full tooltip including the graphic name. Unfortunately they don't all return the full filepath.

 

I took a look at Paul's comment about CPU usage, running TP's slideshow display. Quite interesting. Not surprisingly it makes a big difference on image size. Using Task Manager as a rough guide, large images (>2000 linear pixels) that had to be downsized could use up to 75% of my slow CPU/64MB graphic card for a few seconds. Screen-sized images that did not require any resizing barely reached 20% CPU in no time. If you were changing the latter every 30secs it's nothing for a contemporary PC/graphic card.

Link to comment
Share on other sites

Thanks for bearing with my density! The Desktop is one of the more useless areas of the GUI which is why your approach seemed odd. Not much accessible from it. Any program starts from it are intended for manual initiation. If you did not have so many desktop macros you could simply add shortcuts for them to the Desktop, which is how I normally change my random wallpaper. I made those wallpaper macros into mxe files so it's a straight link on the Desktop. You should be able to do some sort of shortcuts using Command Line Parameters per the Help.

 

I don't use pop-ups - can't you initiate a pop-up or some form of menu from a Desktop shortcut? How about a radio button Multichoice Display? Or a checkbox Multichoice Display so you can do the whole shooting match in one blaze of macros, sequenced or simultaneous! I do that for my TV webpage downloading. It brings up a Multichoice Display - I can check individual macros if I wish. The first checkbox will initiate all of the macros sequentially. You could even preset your most common macro selection so you don't even have to click, just hit OK!

 

I rarely have my scores of desktop shortcuts displayed, so that I get my wallpaper on a clean blue background. A macro toggles Show Desktop Icons for the occasions that I do need to access one of them. (I must re-examine it as it's unreliable, sometimes needing two activations to do the job. Probably not worth a macro anyway, as <Win+D, R-click > Show Desktop Icons is only marginally slower.)

 

BTW, writing the above prompts me to investigate whether any of my desktop scoping/activation/exclusion requirements could benefit from a simple testing approach. Maybe you mentioned it upthread. There's always some blue background around my centrally placed wallpapers, so pixel testing could at least cut short an unwanted macro's operation.

 

I've been thinking about revisiting some of my old macros now that I have a wider knowledge and more ideas on how to beat the system. Who was it said you shouldn't play in the registry?

 

All my graphic editors seem to show the filename in the taskbar tooltip. I don't have any that I minimize to the tray but I suspect they would have the same tooltip. I just posted that thread about getting the full tray icon tooltip from a partial using External Script. You would search on the partial application name and get back the full tooltip including the graphic name. Unfortunately they don't all return the full filepath.

 

Subsequently discussed in our PMs, such as my example macro using the WSS Pro registry entry.

 

I took a look at Paul's comment about CPU usage, running TP's slideshow display. Quite interesting. Not surprisingly it makes a big difference on image size. Using Task Manager as a rough guide, large images (>2000 linear pixels) that had to be downsized could use up to 75% of my slow CPU/64MB graphic card for a few seconds. Screen-sized images that did not require any resizing barely reached 20% CPU in no time. If you were changing the latter every 30secs it's nothing for a contemporary PC/graphic card.

 

Thanks, that's what I'd have assumed.

 

--

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

×
×
  • Create New...