Dialog box clearing Desktop Shortcuts

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
gtdalsanto
Junior Coder
Posts: 43
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

Dialog box clearing Desktop Shortcuts

Post by gtdalsanto » Thu Sep 24, 2009 2:52 pm

Not sure if this is a Window XP issue or a Macro Scheduler Dialog problem. I have narrowed it down to the following. If the "Show Desktop" Quick Launch is pressed or the "Show the Desktop" is selected from the different places it can be selected, and then I run a compiled dialog box from Macro Scheduler, when I press any button (i.e. an exit button in my example), all desktop icons get cleared and erased from the screen. The compiled code I have duplicated this problem with on 3 machines running Windows XP professional, with SP3, and running MS version 11.1.14 is the following:

Dialog>Dialog1
Caption=Dialog1
Width=445
Height=250
Top=104
Left=16
Button=Exit,171,88,75,25,3
EndDialog>Dialog1
Show>Dialog1,Result

Running this compiled macro after the "Show Desktop" is executed, will cause all shortcuts on the deskstop to disappear after the "Exit" button on the dialog is pressed.

What I have noticed is that if I add a message box before the Show>Dialog1,Result line, the problem does not occur. Also if I open the Task Manager after the Show Desktop and before running the MS dialog box, the problem will not occur.

It seems as if something is not getting initialized properly by MS or something from the Show Desktop is leaving it in a funky state.

Thanks.
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Thu Sep 24, 2009 3:12 pm

I can confirm this behavior. I also have Windows XP Pro SP3.

User avatar
Marcus Tettmar
Site Admin
Posts: 7281
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Sep 24, 2009 4:14 pm

Weird. No idea what causes that. Will do what I can to find out.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Marcus Tettmar
Site Admin
Posts: 7281
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Sep 24, 2009 4:23 pm

Hmm. Looks like it might be something to do with UPX compression.

Go to Program Files\Macro Scheduler 11 and rename upx.exe to _upx.exe or upx.bak and then recompile your macro, replacing your existing one. I copied the compiled macro to the desktop. Now after doing Show Desktop the issue appears to have gone.

Out of interest I just tried with the latest version of upx from upx.sourceforge.net (as I think the version shipping with Macro Scheduler is a little out of date) but got the same issue.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

gtdalsanto
Junior Coder
Posts: 43
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

Post by gtdalsanto » Thu Sep 24, 2009 9:43 pm

I did as suggested with the UPX file, and it worked a couple of times, but then the problem appeared again. The only way I can make the problem go away is if I do a MessageModal>xxxxxxx prior to my show>dialog1, and the problem of the desktop icons don't disapear.
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

User avatar
Bob Hansen
Automation Wizard
Posts: 2448
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Sep 25, 2009 12:26 am

This doesn't help with the Macro Scheduler issue, but can help get back to normal.

Here is a useful free utility, Icon Restore, to help restore the desktop icons:

Downloaded on 8/30/05 from http://users.rcn.com/taylotr/icon_restore.html

I usually install this on all pcs, very handy tool.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
JRL
Automation Wizard
Posts: 3362
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Sep 25, 2009 4:53 am

Interesting Gary. Thanks for pointing this out.

When I tried this unusual series of events, I found that all I needed to do to restore the icons was press Winkey+D. Also for the purposes of my experimenting I only used WinKey+D to show the desktop.

I'm curious if this is a strictly Windows XP phenomenon or does this also occur under other windows operating systems?

Because "show desktop" has other unusual behaviors I tend to think this is an issue with it rather than an issue with Macro Scheduler.

One thing that seems to be necessary for this phenomena is for the dialog to be modal. I could not find a way make the desktop icons disappear using a non-modal dialog. The other thing is that you need to be in a odd number of invocations of show desktop for this to work. So since this script invokes "show desktop", if you "show desktop" just before running it, your icons will not disappear.

I can't explain why popping a message box first "cures" the phenomena. It doesn't seem to matter whether it stays open or is closed, if you first open a message box the phenomena does not occur


I also don't think that compiling or compiling with NOSTOPKEY has anything to do with this. The following script will clear then restore your desktop icons. It works for me whether it is a script or compiled and it doesn't matter which compile options I choose.

Code: Select all

/*
Message>Ok
Wait>1
Press enter
Wait>1
*/

Press LWinKey
  Send>d
Release LWinKey

Wait>0.5

Dialog>Dialog1
   Caption=Clear It
   Width=189
   Height=127
   Top=CENTER
   Left=CENTER
   Button=Clear Desktop%CRLF%for 3 seconds,35,24,102,41,2
EndDialog>Dialog1
Show>Dialog1,result

Wait>3
Press LWinKey
  Send>d
Release LWinKey

User avatar
jpuziano
Automation Wizard
Posts: 1086
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Wed May 16, 2012 10:57 pm

Hi JRL,
JRL wrote:I can't explain why popping a message box first "cures" the phenomena. It doesn't seem to matter whether it stays open or is closed, if you first open a message box the phenomena does not occur
As a point of interest... I just tried your posted script above (running non-compiled) in MS 13.1.05 on Win XP SP3 and the phenomena occurs as described... however opening a message box first did not stop it from occurring for me. Perhaps others might get different results... or perhaps that "cure" only worked in MS ver 12. Again... just a curiosity... take care.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts