--- In [email protected], "brucexs" <[EMAIL PROTECTED]> wrote:
>
> >
> > Problem is, unless icons are visible (via Windows context: Arrange
> > Icons By-> Show Desktop Icons), Middle desk (and other desktop
> > hotkeys) only work on the first execution in a session.
>
>
> PowerPro caches desktop window handles used to detect clikc on
> middle desk, so possible restarting PowerPro after you change
> this setting may help.
I just changed the hotkey to "middle anywhere" and added code to test
the exename under the mouse. Seems to work fine for my purpose.
local regex_status
if (regex.pcrematch(?"(?i)^(?:progman|explorer|)$",
win.exename("under")) <1) do
Exec.Hotkeys("off")
win.sendmouse("ab "++xmouse++" "++ymouse++" mc")
wait.for(50)
Exec.Hotkeys("on")
quit
endif
local dialog_status rg_status
local
initfolder=file.folder(reg.get_string(?"HKEY_CURRENT_USER\Control
Panel\Desktop\PowerProJpegFile"))
local selectwpfile = dialog.browse_for_file("open", initfolder,
"Wallpaper File Browser", "", "Jpg Files (*.jpg)\n*.jpg\nAll Files
(*.*)\n*.*")
if (selectwpfile ne "") do
Wallpaper.ChangeTo(selectwpfile)
endif