Hazivi wrote:
H> I am trying to do a seemingly simple thing. Want to define
H> a hotkey to move the current active window to the next vdesk,
H> and if at the last vdesk wrap around to the first.
H> I have 4 vdesks defined.
H> I am aware of vdesk.moveactive but it doesn't seem to take
H> a numeric argument.
I don't use vdesks, so I waited to see if someone else
can answer your question. There has been no answer from
an experienced vdesk user, so it might be worth trying my
three untested ideas:
[1]
nextvdesknum=(desknum+1)%4
;; that's if you have 4 vdesks - so 5 will become 1
vdesk.moveactive(nextvdesknum)
[2]
Try this short script:
; local activehandle=window("firstwindow","active")
vdesk next
local nextvdeskname=deskname
vdesk previous
; window show activehandle
vdesk.moveactive(nextvdeskname)
Note: I think both of the lines starting with a ; are unnecessary.
Only use them if you find that the active window loses focus
when you switch back to the original desktop.
I don't know whether "vdesk next" wraps from the last vdesk to the
first. I hope so - else you will need a more complicated script,
to cope with the case where you are on your last desktop:
[3]
local thisvdesknum=desknum
local nextvdesknum=(desknum+1)%4
;; that's if you have 4 vdesks - so 5 will become 1
vdesk.switchto(nextvdesknum)
local nextvdeskname=deskname
vdesk.switchto(desknum)
vdesk.moveactive(nextvdeskname)
I hope at least one of those three ideas will work for you,
Alan Martin
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~->
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/