>
> It doesn't appear that PowerPro is making any attempt to select
the window, it seems that that it's only tracking one active window
for all desktops.
PowerPro definitely tries to track and restore foreground window by
desktop. Please try the following experiment exactly as described
so we can by sure we are comparing the same situation.
1. Shutdown all windows except PowerPro. Make sure you are on
desktop. Uncheck "move window to current desktop if switchto when
active applies when launched" on vdesk setup.
2. Create the following hot keys
F2 *vdesk switchto 1
F3 *vdesk switchto 2
3. Use start|run to run notepad, explorer (just type program name
into run box). Activate notepad.
4. Press F3 to switch to desktop 2.
5. Use start|run to run calc, regedit (just type program name into
run box). Activate regedit.
6. Use F2 and F3 to switch between desktops. Note the active
window.
7. Try changing foreground window on either or both desktops and
switching with the F keys.
In my tests on two different XP machines, the correct window stays
activated.
Do you see that same in your tests? If it consistently fails, I
have no explanation. If it fails sporadically, I would be
disappointed but not surprised (and I would have no immediate
solution).
>
> Now to your other question I am using keys to change desktops. IE-
ALT-1,2,3,4 to switch desktops. I use the KeyTrap module to do this
since the built in PowerPro key macros don't appear to be able to
map holding the key down as a key. For example I wanted to be able
to hold alt and cycle through 1,2,3,4 desktops without releasing the
alt key. However it doesn't actually change the desktop until I
release the alt. KeyTrap has been able to do this, but I wanted to
mention it in case it helps.
Possibly keytray or the above approach is interfering with the way
PowerPro captures and resets the foreground window on each desktop.
One thing you may want to try is created a "run after switching"
command list with the command
win.debug(win.caption("rawactive"))
to show the window that is active after the switch. I suspect it is
a bar.
>> Is it possible to make a command the would select (activate) the
foremost window? Since this would be the window on top it would most
likely be the last one in use. I could then implement this under the
desktop switch.
As it happens, I added an undocumented
win.topwindow
to return the handle of the topmost window in the z-order to the
win.dll I uploaded yesterday. It is _not_ the one in 4.6; you have
to download win.dll from the usual folder where I put the beta's on
webeddie.
After you download,
win.show(win.topwindow)
or possibly
win.show(win.topwindow, 3)