Jump to content

Pangaea Desktops


rakudave
 Share

Recommended Posts

  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

hey guys, i'm working on the GUI for the settings.

could you tell me if this is clearly laid out?

thx...

CODE

#include <GUIConstants.au3>

#Include <GuiList.au3>

GUICreate("Pangaea Desktops - Settings",461,420,-1,-1)

$ok = GUICtrlCreateButton("OK",250,390,50)

$cancel = GUICtrlCreateButton("Cancel",310,390,50)

$restore = GUICtrlCreateButton("Restore default",370,390,86)

GUICtrlCreateTab(5,5,451,380)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

GUICtrlCreateTabItem(" General ")

GUICtrlCreateLabel("Welcome to Pangaea Desktops!",20,35)

$startup = GUICtrlCreateCheckbox("Launch Pangaea Desktops on StartUp",20,70)

$traymenu = GUICtrlCreateCheckbox("Enable Traymenu",20,95)

GUICtrlCreateGroup("Choose the hiding method:",20,140,420,50)

$hide = GUICtrlCreateRadio("Hide windows",30,160)

$minimize = GUICtrlCreateRadio("Minimize windows",130,160)

$except = GUICtrlCreateButton("Exceptions",360,155,70)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

GUICtrlCreateTabItem(" Hotkeys ")

GUICtrlCreateLabel("Here you can define the HotKeys...",20,40)

$Hotkeys = GUICtrlCreateCheckbox("Enable HotKeys",20,70)

GUICtrlCreateGroup("HotKeys",20,100,420,280)

GUICtrlCreateLabel("Next desktop",30,122)

$next1 = GUICtrlCreateCombo("(none)",180,120,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$next2 = GUICtrlCreateCombo("(none)",260,120,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("{RIGHT-ARROW}",340,122)

GUICtrlCreateLabel("Prev desktop",30,147)

$prev1 = GUICtrlCreateCombo("(none)",180,145,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$prev2 = GUICtrlCreateCombo("(none)",260,145,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("{LEFT-ARROW}",340,147)

GUICtrlCreateLabel("Move window to next desktop",30,172)

$movenext1 = GUICtrlCreateCombo("(none)",180,170,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Ctrl")

$movenext2 = GUICtrlCreateCombo("(none)",260,170,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("{RIGHT-ARROW}",340,172)

GUICtrlCreateLabel("Move window to prev desktop",30,197)

$moveprev1 = GUICtrlCreateCombo("(none)",180,195,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Ctrl")

$moveprev2 = GUICtrlCreateCombo("(none)",260,195,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("{LEFT-ARROW}",340,197)

GUICtrlCreateLabel("Panic (exit programm)",30,222)

$panic1 = GUICtrlCreateCombo("(none)",180,220,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$panic2 = GUICtrlCreateCombo("(none)",260,220,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("{ESC}",340,222)

GUICtrlCreateLabel("Show desktop 1",30,247)

$desk11 = GUICtrlCreateCombo("(none)",180,245,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$desk12 = GUICtrlCreateCombo("(none)",260,245,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("1",340,247)

GUICtrlCreateLabel("Show desktop 2",30,272)

$desk21 = GUICtrlCreateCombo("(none)",180,270,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$desk22 = GUICtrlCreateCombo("(none)",260,270,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("2",340,272)

GUICtrlCreateLabel("Show desktop 3",30,297)

$desk31 = GUICtrlCreateCombo("(none)",180,295,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$desk32 = GUICtrlCreateCombo("(none)",260,295,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("3",340,297)

GUICtrlCreateLabel("Show desktop 4",30,322)

$desk41 = GUICtrlCreateCombo("(none)",180,320,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$desk42 = GUICtrlCreateCombo("(none)",260,320,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("4",340,322)

GUICtrlCreateLabel("Show head-up-display (HUD)",30,347)

$hud1 = GUICtrlCreateCombo("(none)",180,345,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$hud2 = GUICtrlCreateCombo("(none)",260,345,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("H",340,347)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

GUICtrlCreateTabItem(" Hotspots ")

;y/n

;hotspots

GUICtrlCreateLabel("When you move your mouse over a HotSpot, a certain action will take place...",20,40)

$hotspot = GUICtrlCreateCheckbox("Enable HotSpots",20,70)

GUICtrlCreateGroup("HotSpots",20,120,425,220)

$hotul = GUICtrlCreateCombo("",30,140,80) ;upper left

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

$hotml = GUICtrlCreateCombo("",30,225,80) ;middle left

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

$hotll = GUICtrlCreateCombo("",30,310,80) ;lower left

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

$hotur = GUICtrlCreateCombo("",360,140,80) ;upper right

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

$hotmr = GUICtrlCreateCombo("",360,225,80) ;middle right

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

$hotlr = GUICtrlCreateCombo("",360,310,80) ;lower right

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

$hotum = GUICtrlCreateCombo("",195,140,80) ;upper middle

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

$hotlm = GUICtrlCreateCombo("",195,310,80) ;lower middle

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

GUICtrlCreateLabel("",110,160,250,150,$SS_WHITERECT )

GUICtrlCreateLabel("",110,160,25,25,$SS_BLACKFRAME)

GUICtrlCreateLabel("",335,160,25,25,$SS_BLACKFRAME)

GUICtrlCreateLabel("",110,285,25,25,$SS_BLACKFRAME)

GUICtrlCreateLabel("",335,285,25,25,$SS_BLACKFRAME)

GUICtrlCreateLabel("",134,160,202,15,$SS_BLACKFRAME)

GUICtrlCreateLabel("",134,295,202,15,$SS_BLACKFRAME)

GUICtrlCreateLabel("",110,184,15,102,$SS_BLACKFRAME)

GUICtrlCreateLabel("",345,184,15,102,$SS_BLACKFRAME)

GUICtrlCreateLabel("next = switch to next desktop" & @crlf & "prev = switch to prev desktop" & @crlf & "move next = move window to next desktop" & @crlf & "move prev = move window to next desktop",140,210,200,200)

GUICtrlSetFont(-1,7)

GUICtrlSetColor(-1,0x666666)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

GUICtrlCreateTabItem(" Visual Effects ")

;y/n

;animation

GUICtrlCreateLabel("Here you can choose the visual effects when switching to another desktop...",20,40)

$animation = GUICtrlCreateCheckbox("Enable animation",20,70)

GUICtrlCreateGroup("Animation",20,120,420,90)

GUICtrlCreateLabel("Next desktop:",30,145)

$aninext = GUICtrlCreateCombo("",110,142,320)

GUICtrlSetData(-1,"fade-out|slide out to left|slide out to right|slide-out to top|slide-out to bottom|implode","slide out to left")

GUICtrlCreateLabel("Prev desktop:",30,175)

$aniprev = GUICtrlCreateCombo("",110,172,320)

GUICtrlSetData(-1,"fade-out|slide out to left|slide out to right|slide-out to top|slide-out to bottom|implode","slide out to right")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

GUICtrlCreateTabItem(" Desktops ")

;desktop names

;desktop color

;wallpapers

GUICtrlCreateGroup("Display",20,40,420,95)

$display = GUICtrlCreateCheckbox("Enable desktop-display",30,60,130,20)

$dispcol = GUICtrlCreateInput("",140,82,45)

GUICtrlCreateLabel("Display color (hex): # (default: FF0000)",30,85)

$dispsec = GUICtrlCreateInput("",128,108,20)

GUICtrlCreateLabel("Show display during seconds",30,110)

GUICtrlCreateGroup("Names",20,140,420,75)

GUICtrlCreateLabel("Desktop 1:",30,160)

$name1 = GUICtrlCreateInput("",85,158,140)

GUICtrlCreateLabel("Desktop 2:",235,160)

$name2 = GUICtrlCreateInput("",290,158,140)

GUICtrlCreateLabel("Desktop 3:",30,185)

$name3 = GUICtrlCreateInput("",85,182,140)

GUICtrlCreateLabel("Desktop 4:",235,185)

$name4 = GUICtrlCreateInput("",290,182,140)

GUICtrlCreateGroup("Wallpapers",20,225,420,145)

$wallpapers = GUICtrlCreateCheckbox("Enable wallpapers (.bmp only)",30,240)

GUICtrlCreateLabel("Desktop 1:",30,265)

$wall1 = GUICtrlCreateInput("",85,262,300)

$browse1 = GUICtrlCreateButton("Browse",390,262,45,21)

GUICtrlCreateLabel("Desktop 2:",30,290)

$wall2 = GUICtrlCreateInput("",85,287,300)

$browse2 = GUICtrlCreateButton("Browse",390,287,45,21)

GUICtrlCreateLabel("Desktop 3:",30,315)

$wall3 = GUICtrlCreateInput("",85,312,300)

$browse3 = GUICtrlCreateButton("Browse",390,312,45,21)

GUICtrlCreateLabel("Desktop 4:",30,340)

$wall4 = GUICtrlCreateInput("",85,337,300)

$browse4 = GUICtrlCreateButton("Browse",390,337,45,21)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

$tab6 = GUICtrlCreateTabItem(" Ignore List ")

;winlist

GUICtrlCreateLabel("The windows in this list won't be hidden, i.e. they'll appear on every desktop." & @crlf & '...use the name of window, example: "Windows Task-Manager"',20,40,420,40)

$winlist = GUICtrlCreateList("",20,80,420,280)

$add = GUICtrlCreateButton("add",335,352,50)

$remove = GUICtrlCreateButton("remove",390,352,50)

GUISetState()

;------------------------------------------------------------------------

do

$msg = GUIGetMsg()

select

case $msg = $except

GUICtrlSetState($tab6,$GUI_SHOW)

case $msg = $browse1

$file = FileOpenDialog("Select a .bmp-file", "", "Bitmap (*.bmp)",3)

If Stringlen($file) > 8 AND StringRight($file,4) = ".bmp" then GUICtrlSetData($wall1,$file)

case $msg = $browse2

$file = FileOpenDialog("Select a .bmp-file", "", "Bitmap (*.bmp)",3)

If Stringlen($file) > 8 AND StringRight($file,4) = ".bmp" then GUICtrlSetData($wall2,$file)

case $msg = $browse3

$file = FileOpenDialog("Select a .bmp-file", "", "Bitmap (*.bmp)",3)

If Stringlen($file) > 8 AND StringRight($file,4) = ".bmp" then GUICtrlSetData($wall3,$file)

case $msg = $browse4

$file = FileOpenDialog("Select a .bmp-file", "", "Bitmap (*.bmp)",3)

If Stringlen($file) > 8 AND StringRight($file,4) = ".bmp" then GUICtrlSetData($wall4,$file)

case $msg = $add

$in = Inputbox("Add new window","Enter the name of the window you'd like to add...")

If $in <> "" then _GUICtrlListAddItem($winlist, $in)

case $msg = $remove

$sel = _GUICtrlListGetCaretIndex($winlist)

If $sel <> $LB_ERR then _GUICtrlListDeleteItem($winlist,$sel)

endselect

until $msg = $GUI_EVENT_CLOSE

Link to comment
Share on other sites

if you're into designing icons, yep, i d'love to have a cool icon... :D

How's this?

earth.zip

Edited by AutoItKing
http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script]
Link to comment
Share on other sites

perhaps some of you guys know "virtual dimensions"

I don't know about Virtual Dimensions, but I've been using Vern for many years now. It gives you X by Y virtual desktops and has more features than a loaded Monte Carlo. It works great with Win98 through WinXP and is so nice that when I work on a machine that doesn't have it, I get very messed up with overlapping windows. You should check it out if for no reason other than to study its feature-set...
...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
Link to comment
Share on other sites

  • 4 weeks later...

This is really great man! As someone said this reminds me of KDE, GNOME, XFCE, FLUX, basically all Linux GUI's have this, thinks for bringing it to windows.

If you have a ATI video card, they include a program for this.

Link to comment
Share on other sites

Do you want to keep some windows alive while switching?

Some windows seem to be kept when I move to another desk.

Works quite strange here (P4-1.6, 512 MB), but all windows are alive if I go back to Desk1.

Anyway, good clean script. :whistle:

Maybe you could integrate a mousewheel-functionality.

Look here to see how I did / tried to integrate larrys mousehook. :)

Dapwal

Link to comment
Share on other sites

Do you want to keep some windows alive while switching?

Some windows seem to be kept when I move to another desk.

Works quite strange here (P4-1.6, 512 MB), but all windows are alive if I go back to Desk1.

Anyway, good clean script. :whistle:

Maybe you could integrate a mousewheel-functionality.

Look here to see how I did / tried to integrate larrys mousehook. :)

Dapwal

No offence but it would take literally a minute to do it yourself. But nevertheless, I like the idea

Link to comment
Share on other sites

added wallpaper support. YAY!

pangaea_wallpapers.ini must go in the script dir. it has 4 values, 1, 2, 3, and 4. each MUST be either:

  • a bmp file to use as the wallpaper for the virtual desktop, or
  • the word "default", which uses the current wallpaper that was running when the program started.
Drawback: you cant change the wallpaper using control panel while the program is running, because it will just revert back when exiting the program.

Edit: forgot to attach file :whistle:

Edit Edit: spelling

pangaea_desktops.zip

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

nice addon...

but wait 'till i publish the "totally pimped" version thet i'm working on...

thats what you'll get:

CODE

#include <GUIConstants.au3>

#Include <GuiList.au3>

$inidir = @ProgramFilesDir & "\pangaea_desktops.ini"

$gui = GUICreate("Pangaea Desktops - Settings",461,420,-1,-1)

$ok = GUICtrlCreateButton("OK",250,390,50)

$cancel = GUICtrlCreateButton("Cancel",310,390,50)

$restore = GUICtrlCreateButton("Restore default",370,390,86)

GUICtrlCreateTab(5,5,451,380)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

GUICtrlCreateTabItem(" General ")

GUICtrlCreateLabel("Welcome to Pangaea Desktops!",20,35)

$startup = GUICtrlCreateCheckbox("Launch Pangaea Desktops on StartUp",20,70)

$traymenu = GUICtrlCreateCheckbox("Enable Traymenu",20,95)

GUICtrlCreateGroup("Choose the hiding method:",20,140,420,50)

$hide = GUICtrlCreateRadio("Hide windows",30,160)

$minimize = GUICtrlCreateRadio("Minimize windows",130,160)

$except = GUICtrlCreateButton("Exceptions",360,155,70)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

GUICtrlCreateTabItem(" Hotkeys ")

GUICtrlCreateLabel("Here you can define the HotKeys...",20,40)

$hotkeys = GUICtrlCreateCheckbox("Enable HotKeys",20,70)

GUICtrlCreateGroup("HotKeys",20,100,420,280)

GUICtrlCreateLabel("Next desktop",30,122)

$next1 = GUICtrlCreateCombo("(none)",180,120,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$next2 = GUICtrlCreateCombo("(none)",260,120,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("{RIGHT-ARROW}",340,122)

GUICtrlCreateLabel("Prev desktop",30,147)

$prev1 = GUICtrlCreateCombo("(none)",180,145,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$prev2 = GUICtrlCreateCombo("(none)",260,145,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("{LEFT-ARROW}",340,147)

GUICtrlCreateLabel("Move window to next desktop",30,172)

$movenext1 = GUICtrlCreateCombo("(none)",180,170,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Ctrl")

$movenext2 = GUICtrlCreateCombo("(none)",260,170,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("{RIGHT-ARROW}",340,172)

GUICtrlCreateLabel("Move window to prev desktop",30,197)

$moveprev1 = GUICtrlCreateCombo("(none)",180,195,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Ctrl")

$moveprev2 = GUICtrlCreateCombo("(none)",260,195,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("{LEFT-ARROW}",340,197)

GUICtrlCreateLabel("Panic (exit programm)",30,222)

$panic1 = GUICtrlCreateCombo("(none)",180,220,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$panic2 = GUICtrlCreateCombo("(none)",260,220,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("{ESC}",340,222)

GUICtrlCreateLabel("Show desktop 1",30,247)

$desk11 = GUICtrlCreateCombo("(none)",180,245,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$desk12 = GUICtrlCreateCombo("(none)",260,245,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("1",340,247)

GUICtrlCreateLabel("Show desktop 2",30,272)

$desk21 = GUICtrlCreateCombo("(none)",180,270,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$desk22 = GUICtrlCreateCombo("(none)",260,270,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("2",340,272)

GUICtrlCreateLabel("Show desktop 3",30,297)

$desk31 = GUICtrlCreateCombo("(none)",180,295,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$desk32 = GUICtrlCreateCombo("(none)",260,295,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("3",340,297)

GUICtrlCreateLabel("Show desktop 4",30,322)

$desk41 = GUICtrlCreateCombo("(none)",180,320,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$desk42 = GUICtrlCreateCombo("(none)",260,320,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("4",340,322)

GUICtrlCreateLabel("Show head-up-display (HUD)",30,347)

$hud1 = GUICtrlCreateCombo("(none)",180,345,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","(none)")

$hud2 = GUICtrlCreateCombo("(none)",260,345,70)

GUICtrlSetData(-1,"Ctrl|Alt|Win","Win")

GUICtrlCreateLabel("H",340,347)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

GUICtrlCreateTabItem(" Hotspots ")

;y/n

;hotspots

GUICtrlCreateLabel("When you move your mouse over a HotSpot, a certain action will take place...",20,40)

$hotspot = GUICtrlCreateCheckbox("Enable HotSpots",20,70)

GUICtrlCreateGroup("HotSpots",20,120,425,220)

$hotul = GUICtrlCreateCombo("",30,140,80) ;upper left

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

$hotml = GUICtrlCreateCombo("",30,225,80) ;middle left

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

$hotll = GUICtrlCreateCombo("",30,310,80) ;lower left

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

$hotur = GUICtrlCreateCombo("",360,140,80) ;upper right

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

$hotmr = GUICtrlCreateCombo("",360,225,80) ;middle right

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

$hotlr = GUICtrlCreateCombo("",360,310,80) ;lower right

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

$hotum = GUICtrlCreateCombo("",195,140,80) ;upper middle

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

$hotlm = GUICtrlCreateCombo("",195,310,80) ;lower middle

GUICtrlSetData(-1,"(none)|next|prev|move next|move prev","(none)")

GUICtrlCreateLabel("",110,160,250,150,$SS_WHITERECT )

GUICtrlCreateLabel("",110,160,25,25,$SS_BLACKFRAME)

GUICtrlCreateLabel("",335,160,25,25,$SS_BLACKFRAME)

GUICtrlCreateLabel("",110,285,25,25,$SS_BLACKFRAME)

GUICtrlCreateLabel("",335,285,25,25,$SS_BLACKFRAME)

GUICtrlCreateLabel("",134,160,202,15,$SS_BLACKFRAME)

GUICtrlCreateLabel("",134,295,202,15,$SS_BLACKFRAME)

GUICtrlCreateLabel("",110,184,15,102,$SS_BLACKFRAME)

GUICtrlCreateLabel("",345,184,15,102,$SS_BLACKFRAME)

GUICtrlCreateLabel("next = switch to next desktop" & @crlf & "prev = switch to prev desktop" & @crlf & "move next = move window to next desktop" & @crlf & "move prev = move window to next desktop",140,210,200,200)

GUICtrlSetFont(-1,7)

GUICtrlSetColor(-1,0x666666)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

GUICtrlCreateTabItem(" Visual Effects ")

;y/n

;animation

GUICtrlCreateLabel("Here you can choose the visual effects when switching to another desktop...",20,40)

$animation = GUICtrlCreateCheckbox("Enable animation",20,70)

GUICtrlCreateGroup("Animation",20,120,420,90)

GUICtrlCreateLabel("Next desktop:",30,145)

$aninext = GUICtrlCreateCombo("",110,142,320)

GUICtrlSetData(-1,"fade-out|slide out to left|slide out to right|slide-out to top|slide-out to bottom|implode","slide out to left")

GUICtrlCreateLabel("Prev desktop:",30,175)

$aniprev = GUICtrlCreateCombo("",110,172,320)

GUICtrlSetData(-1,"fade-out|slide out to left|slide out to right|slide-out to top|slide-out to bottom|implode","slide out to right")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

GUICtrlCreateTabItem(" Desktops ")

;desktop names

;desktop color

;wallpapers

GUICtrlCreateGroup("Display",20,40,420,95)

$display = GUICtrlCreateCheckbox("Enable desktop-display",30,60,130,20)

$dispcol = GUICtrlCreateInput("",140,82,45)

GUICtrlCreateLabel("Display color (hex): # (default: FF0000)",30,85)

$dispsec = GUICtrlCreateInput("",128,108,20)

GUICtrlCreateLabel("Show display during seconds",30,110)

GUICtrlCreateGroup("Names",20,140,420,75)

GUICtrlCreateLabel("Desktop 1:",30,160)

$name1 = GUICtrlCreateInput("",85,158,140)

GUICtrlCreateLabel("Desktop 2:",235,160)

$name2 = GUICtrlCreateInput("",290,158,140)

GUICtrlCreateLabel("Desktop 3:",30,185)

$name3 = GUICtrlCreateInput("",85,182,140)

GUICtrlCreateLabel("Desktop 4:",235,185)

$name4 = GUICtrlCreateInput("",290,182,140)

GUICtrlCreateGroup("Wallpapers",20,225,420,145)

$wallpapers = GUICtrlCreateCheckbox("Enable wallpapers (.bmp only)",30,240)

GUICtrlCreateLabel("Desktop 1:",30,265)

$wall1 = GUICtrlCreateInput("",85,262,300)

$browse1 = GUICtrlCreateButton("Browse",390,262,45,21)

GUICtrlCreateLabel("Desktop 2:",30,290)

$wall2 = GUICtrlCreateInput("",85,287,300)

$browse2 = GUICtrlCreateButton("Browse",390,287,45,21)

GUICtrlCreateLabel("Desktop 3:",30,315)

$wall3 = GUICtrlCreateInput("",85,312,300)

$browse3 = GUICtrlCreateButton("Browse",390,312,45,21)

GUICtrlCreateLabel("Desktop 4:",30,340)

$wall4 = GUICtrlCreateInput("",85,337,300)

$browse4 = GUICtrlCreateButton("Browse",390,337,45,21)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

$tab6 = GUICtrlCreateTabItem(" Ignore List ")

;winlist

GUICtrlCreateLabel("The windows in this list won't be hidden, i.e. they'll appear on every desktop." & @crlf & '...use the name of window, example: "Windows Task-Manager"',20,40,420,40)

$winlist = GUICtrlCreateList("",20,80,420,280)

$add = GUICtrlCreateButton("add",335,352,50)

$remove = GUICtrlCreateButton("remove",390,352,50)

GUISetState()

_readsettings()

;------------------------------------------------------------------------

do

$msg = GUIGetMsg()

select

case $msg = $except

GUICtrlSetState($tab6,$GUI_SHOW)

case $msg = $browse1

$file = FileOpenDialog("Select a .bmp-file", "", "Bitmap (*.bmp)",3)

If Stringlen($file) > 8 AND StringRight($file,4) = ".bmp" then GUICtrlSetData($wall1,$file)

case $msg = $browse2

$file = FileOpenDialog("Select a .bmp-file", "", "Bitmap (*.bmp)",3)

If Stringlen($file) > 8 AND StringRight($file,4) = ".bmp" then GUICtrlSetData($wall2,$file)

case $msg = $browse3

$file = FileOpenDialog("Select a .bmp-file", "", "Bitmap (*.bmp)",3)

If Stringlen($file) > 8 AND StringRight($file,4) = ".bmp" then GUICtrlSetData($wall3,$file)

case $msg = $browse4

$file = FileOpenDialog("Select a .bmp-file", "", "Bitmap (*.bmp)",3)

If Stringlen($file) > 8 AND StringRight($file,4) = ".bmp" then GUICtrlSetData($wall4,$file)

case $msg = $add

$in = Inputbox("Add new window","Enter the name of the window you'd like to add.")

If $in <> "" then _GUICtrlListAddItem($winlist, $in)

case $msg = $remove

$sel = _GUICtrlListGetCaretIndex($winlist)

If $sel <> $LB_ERR then _GUICtrlListDeleteItem($winlist,$sel)

case $msg = $ok

_writesettings()

$msg = $GUI_EVENT_CLOSE

case $msg = $cancel

$msg = $GUI_EVENT_CLOSE

case $msg = $restore

_restoredefault()

endselect

until $msg = $GUI_EVENT_CLOSE()

Func _readsettings()

If FileExists($inidir) = 0 then _restoredefault()

GUICtrlSetState($startup,IniRead($inidir,"General","startup",""))

GUICtrlSetState($traymenu,IniRead($inidir,"General","traymenu",""))

GUICtrlSetState($hide,IniRead($inidir,"General","hide",""))

GUICtrlSetState($minimize,IniRead($inidir,"General","minimize",""))

If GUICtrlRead($minimize) = 4 then GUICtrlSetState($hide,1) ;workaround... i dunno...

GUICtrlSetState($hotkeys,IniRead($inidir,"Hotkeys","Hotkeys",""))

GUICtrlSetData($next1,IniRead($inidir,"Hotkeys","next1",""))

GUICtrlSetData($next2,IniRead($inidir,"Hotkeys","next2",""))

GUICtrlSetData($prev1,IniRead($inidir,"Hotkeys","prev1",""))

GUICtrlSetData($prev2,IniRead($inidir,"Hotkeys","prev2",""))

GUICtrlSetData($movenext1,IniRead($inidir,"Hotkeys","movenext1",""))

GUICtrlSetData($movenext2,IniRead($inidir,"Hotkeys","movenext2",""))

GUICtrlSetData($moveprev1,IniRead($inidir,"Hotkeys","moveprev1",""))

GUICtrlSetData($moveprev2,IniRead($inidir,"Hotkeys","moveprev2",""))

GUICtrlSetData($panic1,IniRead($inidir,"Hotkeys","panic1",""))

GUICtrlSetData($panic2,IniRead($inidir,"Hotkeys","panic2",""))

GUICtrlSetData($desk11,IniRead($inidir,"Hotkeys","desk11",""))

GUICtrlSetData($desk12,IniRead($inidir,"Hotkeys","desk12",""))

GUICtrlSetData($desk21,IniRead($inidir,"Hotkeys","desk21",""))

GUICtrlSetData($desk22,IniRead($inidir,"Hotkeys","desk22",""))

GUICtrlSetData($desk31,IniRead($inidir,"Hotkeys","desk31",""))

GUICtrlSetData($desk32,IniRead($inidir,"Hotkeys","desk32",""))

GUICtrlSetData($desk41,IniRead($inidir,"Hotkeys","desk41",""))

GUICtrlSetData($desk42,IniRead($inidir,"Hotkeys","desk42",""))

GUICtrlSetData($hud1,IniRead($inidir,"Hotkeys","hud1",""))

GUICtrlSetData($hud2,IniRead($inidir,"Hotkeys","hud2",""))

GUICtrlSetState($hotspot,IniRead($inidir,"Hotspots","hotspot",""))

GUICtrlSetData($hotul,IniRead($inidir,"Hotspots","hotul",""));upper left

GUICtrlSetData($hotml,IniRead($inidir,"Hotspots","hotml",""));middle left

GUICtrlSetData($hotll,IniRead($inidir,"Hotspots","hotll",""));lower left

GUICtrlSetData($hotur,IniRead($inidir,"Hotspots","hotur",""));upper right

GUICtrlSetData($hotmr,IniRead($inidir,"Hotspots","hotmr",""));middle right

GUICtrlSetData($hotlr,IniRead($inidir,"Hotspots","hotlr",""));lower right

GUICtrlSetData($hotum,IniRead($inidir,"Hotspots","hotum",""));upper middle

GUICtrlSetData($hotlm,IniRead($inidir,"Hotspots","hotlm",""));lower middle

GUICtrlSetState($animation,IniRead($inidir,"Visuals","animation",""))

GUICtrlSetData($aninext,IniRead($inidir,"Visuals","aninext",""))

GUICtrlSetData($aniprev,IniRead($inidir,"Visuals","aniprev",""))

GUICtrlSetState($display,IniRead($inidir,"Desktops","display",""))

GUICtrlSetData($dispcol,IniRead($inidir,"Desktops","dispcol",""))

GUICtrlSetData($dispsec,IniRead($inidir,"Desktops","dispsec",""))

GUICtrlSetData($name1,IniRead($inidir,"Desktops","name1",""))

GUICtrlSetData($name2,IniRead($inidir,"Desktops","name2",""))

GUICtrlSetData($name3,IniRead($inidir,"Desktops","name3",""))

GUICtrlSetData($name4,IniRead($inidir,"Desktops","name4",""))

GUICtrlSetState($wallpapers,IniRead($inidir,"Desktops","wallpaper",""))

GUICtrlSetData($wall1,IniRead($inidir,"Desktops","wall1",""))

GUICtrlSetData($wall2,IniRead($inidir,"Desktops","wall2",""))

GUICtrlSetData($wall3,IniRead($inidir,"Desktops","wall3",""))

GUICtrlSetData($wall4,IniRead($inidir,"Desktops","wall4",""))

GUICtrlSetData($winlist,IniRead($inidir,"Ignore","wins",""))

Endfunc

Func _writesettings()

IniWrite($inidir,"General","startup",GUICtrlRead($startup))

IniWrite($inidir,"General","traymenu",GUICtrlRead($traymenu))

IniWrite($inidir,"General","hide",GUICtrlRead($hide))

IniWrite($inidir,"General","minimize",GUICtrlRead($minimize))

IniWrite($inidir,"Hotkeys","Hotkeys",GUICtrlRead($hotkeys))

IniWrite($inidir,"Hotkeys","next1",GUICtrlRead($next1))

IniWrite($inidir,"Hotkeys","next2",GUICtrlRead($next2))

IniWrite($inidir,"Hotkeys","prev1",GUICtrlRead($prev1))

IniWrite($inidir,"Hotkeys","prev2",GUICtrlRead($prev2))

IniWrite($inidir,"Hotkeys","movenext1",GUICtrlRead($movenext1))

IniWrite($inidir,"Hotkeys","movenext2",GUICtrlRead($movenext2))

IniWrite($inidir,"Hotkeys","moveprev1",GUICtrlRead($moveprev1))

IniWrite($inidir,"Hotkeys","moveprev2",GUICtrlRead($moveprev2))

IniWrite($inidir,"Hotkeys","panic1",GUICtrlRead($panic1))

IniWrite($inidir,"Hotkeys","panic2",GUICtrlRead($panic2))

IniWrite($inidir,"Hotkeys","desk11",GUICtrlRead($desk11))

IniWrite($inidir,"Hotkeys","desk12",GUICtrlRead($desk12))

IniWrite($inidir,"Hotkeys","desk21",GUICtrlRead($desk21))

IniWrite($inidir,"Hotkeys","desk22",GUICtrlRead($desk22))

IniWrite($inidir,"Hotkeys","desk31",GUICtrlRead($desk31))

IniWrite($inidir,"Hotkeys","desk32",GUICtrlRead($desk32))

IniWrite($inidir,"Hotkeys","desk41",GUICtrlRead($desk41))

IniWrite($inidir,"Hotkeys","desk42",GUICtrlRead($desk42))

IniWrite($inidir,"Hotkeys","hud1",GUICtrlRead($hud1))

IniWrite($inidir,"Hotkeys","hud2",GUICtrlRead($hud2))

IniWrite($inidir,"Hotspots","hotspot",GUICtrlRead($hotspot))

IniWrite($inidir,"Hotspots","hotul",GUICtrlRead($hotul)) ;upper left

IniWrite($inidir,"Hotspots","hotml",GUICtrlRead($hotml)) ;middle left

IniWrite($inidir,"Hotspots","hotll",GUICtrlRead($hotll)) ;lower left

IniWrite($inidir,"Hotspots","hotur",GUICtrlRead($hotur)) ;upper right

IniWrite($inidir,"Hotspots","hotmr",GUICtrlRead($hotmr)) ;middle right

IniWrite($inidir,"Hotspots","hotlr",GUICtrlRead($hotlr)) ;lower right

IniWrite($inidir,"Hotspots","hotum",GUICtrlRead($hotum)) ;upper middle

IniWrite($inidir,"Hotspots","hotlm",GUICtrlRead($hotlm)) ;lower middle

IniWrite($inidir,"Visuals","animation",GUICtrlRead($animation))

IniWrite($inidir,"Visuals","aninext",GUICtrlRead($aninext))

IniWrite($inidir,"Visuals","aniprev",GUICtrlRead($aniprev))

IniWrite($inidir,"Desktops","display",GUICtrlRead($display))

IniWrite($inidir,"Desktops","dispcol",GUICtrlRead($dispcol))

IniWrite($inidir,"Desktops","dispsec",GUICtrlRead($dispsec))

IniWrite($inidir,"Desktops","name1",GUICtrlRead($name1))

IniWrite($inidir,"Desktops","name2",GUICtrlRead($name2))

IniWrite($inidir,"Desktops","name3",GUICtrlRead($name3))

IniWrite($inidir,"Desktops","name4",GUICtrlRead($name4))

IniWrite($inidir,"Desktops","wallpaper",GUICtrlRead($wallpapers))

IniWrite($inidir,"Desktops","wall1",GUICtrlRead($wall1))

IniWrite($inidir,"Desktops","wall2",GUICtrlRead($wall2))

IniWrite($inidir,"Desktops","wall3",GUICtrlRead($wall3))

IniWrite($inidir,"Desktops","wall4",GUICtrlRead($wall4))

$wins = ""

for $x = 0 to _GUICtrlListGetInfo($winlist)-1

$wins = $wins & "|" & _GUICtrlListGetText($winlist, $x)

next

IniWrite($inidir,"Ignore","wins",StringTrimLeft($wins,1))

FileSetAttrib($inidir,"+H")

EndFunc

Func _restoredefault()

IniWrite($inidir,"General","startup",1)

IniWrite($inidir,"General","traymenu",1)

IniWrite($inidir,"General","hide",1)

IniWrite($inidir,"General","minimize",4)

IniWrite($inidir,"Hotkeys","Hotkeys",1)

IniWrite($inidir,"Hotkeys","next1","(none)")

IniWrite($inidir,"Hotkeys","next2","Win")

IniWrite($inidir,"Hotkeys","prev1","(none)")

IniWrite($inidir,"Hotkeys","prev2","Win")

IniWrite($inidir,"Hotkeys","movenext1","Ctrl")

IniWrite($inidir,"Hotkeys","movenext2","Win")

IniWrite($inidir,"Hotkeys","moveprev1","Ctrl")

IniWrite($inidir,"Hotkeys","moveprev2","Win")

IniWrite($inidir,"Hotkeys","panic1","(none)")

IniWrite($inidir,"Hotkeys","panic2","Win")

IniWrite($inidir,"Hotkeys","desk11","(none)")

IniWrite($inidir,"Hotkeys","desk12","Win")

IniWrite($inidir,"Hotkeys","desk21","(none)")

IniWrite($inidir,"Hotkeys","desk22","Win")

IniWrite($inidir,"Hotkeys","desk31","(none)")

IniWrite($inidir,"Hotkeys","desk32","Win")

IniWrite($inidir,"Hotkeys","desk41","(none)")

IniWrite($inidir,"Hotkeys","desk42","Win")

IniWrite($inidir,"Hotkeys","hud1","(none)")

IniWrite($inidir,"Hotkeys","hud2","Win")

IniWrite($inidir,"Hotspots","hotspot",1)

IniWrite($inidir,"Hotspots","hotul","move prev") ;upper left

IniWrite($inidir,"Hotspots","hotml","prev") ;middle left

IniWrite($inidir,"Hotspots","hotll","(none)") ;lower left

IniWrite($inidir,"Hotspots","hotur","move next") ;upper right

IniWrite($inidir,"Hotspots","hotmr","next") ;middle right

IniWrite($inidir,"Hotspots","hotlr","(none)") ;lower right

IniWrite($inidir,"Hotspots","hotum","(none)") ;upper middle

IniWrite($inidir,"Hotspots","hotlm","(none)") ;lower middle

IniWrite($inidir,"Visuals","animation",1)

IniWrite($inidir,"Visuals","aninext","slide out to left")

IniWrite($inidir,"Visuals","aniprev","slide out to right")

IniWrite($inidir,"Desktops","display",1)

IniWrite($inidir,"Desktops","dispcol","FF0000")

IniWrite($inidir,"Desktops","dispsec",2)

IniWrite($inidir,"Desktops","name1","Desktop 1")

IniWrite($inidir,"Desktops","name2","Desktop 2")

IniWrite($inidir,"Desktops","name3","Desktop 3")

IniWrite($inidir,"Desktops","name4","Desktop 4")

IniWrite($inidir,"Desktops","wallpaper",1)

FileSetAttrib($inidir,"+H")

_readsettings()

EndFunc

Link to comment
Share on other sites

Here is the version I modified for my own use that uses the Mouse to switch desktops.

pangaea_desktops.zip - includes Icon file.

You can use a Bounce wall within 2 seconds as a trigger or you can hold the mouse on edge for more than 2 seconds as a trigger to change the desktop.

Vertically the mouse will wrap the screen based upon trigger used. :blink:

It's just a simple change. :D

Edit: Added Opt("WinWaitDelay", 0) as suggested.

#Region Compiler directives section
;** This is a list of compiler directives used by AutoIt3Wrapper.exe.
;** comment the lines you don't need or else it will override the default settings
#Compiler_Prompt=y                        ;y=show compile menu   
;** AUTOIT3 settings
;#Compiler_AUTOIT3=                        ;Override the default Interpreter version.
;** AUT2EXE settings
#Compiler_AUT2EXE=                        ;Override the default compiler with this version.
#Compiler_Icon=Pangaea_Desktops.ico       ;Filename of the Ico file to use
#Compiler_OutFile=Pangaea_Desktops        ;Target exe/a3x filename.
#Compiler_OutFile_Type=exe                ;a3x=small AutoIt3 file;  exe=Standalone executable(Default)
#Compiler_Compression=4                   ;Compression parameter 0-4  0=Low 2=normal 4=High
#Compiler_Allow_Decompile=y               ;y= allow decompile
#Compiler_PassPhrase=                     ;Password to use for compilation
#Compiler_UseUpx=y                        ;Compress output program works only for 3.1.1.110 and up. Default=Yes
;** Target program Resource info
#Compiler_Res_Comment=Multiple Desktops for Windows ;Comment field
#Compiler_Res_Description=Modified release with Mouse switching Support ;Description field
#Compiler_Res_Fileversion=1.0.1.7         ;File Version
#Compiler_Res_FileVersion_AutoIncrement=y ;AutoIncrement FileVersion After Aut2EXE is finished.
#Compiler_Res_LegalCopyright=by Rakudave, Pangaea WorX 2006   ;Copyright field
; free form resource fields ... max 15
; you can use the following variables:
; %AutoItVer% which will be replaced with the version of AutoIt3
; %date% = PC date in short date format
; %longdate% = PC date in long date format
; %time% = PC timeformat
#Compiler_Res_Field=AutoIt Version|%AutoItVer%
;#Compiler_Res_Field=Name|Value            ;Free format fieldname|fieldvalue
;#Compiler_Res_Field=Name|Value            ;Free format fieldname|fieldvalue
;#Compiler_Res_Field=Name|Value            ;Free format fieldname|fieldvalue
;#Compiler_Res_Field=Name|Value            ;Free format fieldname|fieldvalue
; AU3CHECK settings
#Compiler_Run_AU3Check=Y                  ;(Y/N) Run au3check before compilation. Default=Y
;#Compiler_AU3Check_Parameters=            ;Au3Check parameters
;#Compiler_AU3Check_Dat=                   ;Override the default au3check definition
#Compiler_AU3Check_Stop_OnWarning=Y        ;(Y/N) N=Continue on Warnings.(Default) Y=Always stop on Warnings #Compiler_AU3Check_Parameters=            ;Au3Check parameters
;#Compiler_PlugIn_Funcs=                   ;Define PlugIn function names separated by a Comma to avoid AU3Check errors
; RUN BEFORE AND AFTER definitions
; The following directives can contain:
;   %in% , %out%, %icon% which will be replaced by the fullpath ilename.
;   %scriptdir% same as @ScriptDir and %scriptfile% = filename without extension.
;   %fileversion% is the information from the #Compiler_Res_Fileversion directive
;   %scitedir% will be replaced by the SciTE program directory
;#Compiler_Run_Before=        ;process to run before compilation - you can have multiple records that will be processed in sequence
;#Compiler_Run_After=         ;process to run After compilation - you can have multiple records that will be processed in sequence
;#Compiler_Run_cvsWrapper=    ;(y/n) Run cvsWrapper to update the script source. Default=n
#EndRegion

#Include <Constants.au3>
#include <GUIConstants.au3>
#NoTrayIcon
Opt("MustDeclareVars", 1) ; 0=no, 1=require pre-declare
Opt("TrayMenuMode", 1)  ; 0=append, 1=no default menu, 2=no automatic check, 4=menuitemID  not return
Opt("TrayOnEventMode", 1) ; 0=disable, 1=enable
Opt("WinWaitDelay", 0)  ; default is 250 milliseconds

FileDelete(@tempdir & "pangaeadesktops.ini")
HotKeySet("#{ESC}", "_panic")
HotKeySet("#{LEFT}", "_prevdesk")
HotKeySet("#{RIGHT}", "_nextdesk")
HotKeySet("^#{LEFT}", "_movetoprev")
HotKeySet("^#{RIGHT}", "_movetonext")

Global $activedesk = 1, $winlist[500], $hwnd, $textwin, $texton = 0, $texttime, $desktopitem, $inaction = 0
Global $nextitem, $previtem, $tonextitem, $toprevitem, $aboutitem, $exititem
Global $bInRange, $iMouseTime = 0, $iMouseBounce = 0, $bMouseBounce = True, $sLastTTMsg = ""
Global $sRunDIR, $bAnimate = False, $ti_Animate, $ti_Bounce, $iCountdown = 0, $iCountTime = 0
Global $sTrayTip_MouseOverMsg

Global Const $gcsTrayTip_BalloonTitle = "Pangaea Desktops"
Global Const $gcsTrayTip_MouseOverPrefix = $gcsTrayTip_BalloonTitle & @CRLF

_winget()

$desktopitem = TrayCreateItem("Desktop " & $activedesk)
TrayItemSetState(-1, $TRAY_DISABLE) ; $TRAY_DISABLE =128
$ti_Animate = TrayCreateItem("Animate moves")
TrayItemSetOnEvent(-1, "_trayAnimate")
$ti_Bounce = TrayCreateItem("Require Border Double Hit")
TrayItemSetOnEvent(-1, "_trayBounce")
TrayItemSetState(-1, $TRAY_CHECKED)

TrayCreateItem("")

$nextitem = TrayCreateItem("Next desktop     win + right")
TrayItemSetOnEvent(-1, "_nextdesk")
$previtem = TrayCreateItem("Prev desktop     win + left")
TrayItemSetOnEvent(-1, "_prevdesk")

TrayCreateItem("")

$tonextitem = TrayCreateItem("Move to next desktop    ctrl + win + right")
TrayItemSetOnEvent(-1, "_movetonext")
$toprevitem = TrayCreateItem("Move to prev desktop    ctrl + win + left")
TrayItemSetOnEvent(-1, "_movetoprev")

TrayCreateItem("")

$aboutitem = TrayCreateItem("About")
TrayItemSetOnEvent(-1, "_About")
$exititem  = TrayCreateItem("Exit     win + esc")
TrayItemSetOnEvent(-1, "_panic")

TraySetOnEvent($TRAY_EVENT_MOUSEOVER, "_TrayMouseOver")

TraySetState()

$sTrayTip_MouseOverMsg = $gcsTrayTip_MouseOverPrefix & "Desktop " & $activedesk

If @Compiled Then
 $sRunDIR = @AutoItExe
 $sRunDIR = StringLeft($sRunDIR, StringInStr($sRunDIR, "", 0, -1) - 1)
Else
 $sRunDIR = @ScriptDir
 ; TraySetIcon("shell32.dll", 94)
 TraySetIcon(@ScriptDir & "Pangaea_Desktops.ico")
EndIf


While 1
    If $texton = 1 then
  If TimerDiff($texttime) > 3000 Then
   _text2()
   _TrayTipStatus("")
  EndIf
 Endif

 _warp()

 If $iCountdown > 0 Then
  If TimerDiff($iCountTime) > ($iCountdown * 1000) Then
   $iCountdown = 0
   $sTrayTip_MouseOverMsg = $gcsTrayTip_MouseOverPrefix & "Desktop " & $activedesk
   TraySetState(17)  ; Resets the icon to the defaults (no flashing, default tip text)
   ; Just incase icon disappeared...
   Opt("TrayIconHide", 0) ; 0=show (default), 1=hide tray icon
   TrayTip("", "", 0)  ; Clears any TrayTip Balloon
  EndIf
 EndIf

 Sleep(100)
WEnd

;===============================================================================
; Poll this function from the main loop.
;===============================================================================
Func _warp()
 Local $aMousePos, $aSecondPos

    $aMousePos = MouseGetPos()
 $bInRange = False
 ; Mouse Horizontal Desktop swap tests
 If $aMousePos[0] <= 2 Then
  $bInRange = True
  If $iMouseTime == 0 Then $iMouseTime = TimerInit()
 ElseIf $aMousePos[0] >= @DeskTopWidth - 2 Then
  $bInRange = True
  If $iMouseTime == 0 Then $iMouseTime = TimerInit()
 EndIf
 ; Mouse Vertical Wrap tests
 If $bMouseBounce Then
  If $aMousePos[1] <= 2 Then
   $bInRange = True
   If $iMouseTime == 0 Then $iMouseTime = TimerInit()
  ElseIf $aMousePos[1] >= @DeskTopHeight - 2 Then
   $bInRange = True
   If $iMouseTime == 0 Then $iMouseTime = TimerInit()
  EndIf
 Else
  ; Immediate Warp mouse vertically if in zone...
  If $aMousePos[1] <= 2 Then
   _TrayTipStatus("Mouse Warped to Bottom")
   MouseMove($aMousePos[0], @DesktopHeight - 3, 1)
   _TrayTipStatus("")
  ElseIf $aMousePos[1] >= @DeskTopHeight - 2 Then
   _TrayTipStatus("Mouse Warped to Top")
   MouseMove($aMousePos[0], 3, 1)
   _TrayTipStatus("")
  EndIf
 EndIf
  
 If $bInRange Then
  If $bMouseBounce Then
   ; Mouse must be in-range, out-of-range then back in-range within 2 seconds
   ; $iMouseBounce = 0,         1,                    2
   If TimerDiff($iMouseTime) < 2000 Then
    If $iMouseBounce == 0 Then
     $iMouseBounce = 1 ; Mouse in-range noted for the First Time
    ElseIf $iMouseBounce == 2 Then
     ; In then out-of-range then now, in-range again...
     $aMousePos = MouseGetPos()
     ; Mouse Horizontal Desktop swap tests
     If $aMousePos[0] <= 2 Then
      _MousePrevDesk($aMousePos)
     ElseIf $aMousePos[0] >= @DeskTopWidth - 2 Then
      _MouseNextDesk($aMousePos)
     EndIf
     ; Mouse Vertical Wrap tests
     If $aMousePos[1] <= 2 Then
      _TrayTipStatus("Mouse Warped to Bottom")
      MouseMove($aMousePos[0], @DesktopHeight - 3, 1)
      _TrayTipStatus("")
     ElseIf $aMousePos[1] >= @DeskTopHeight - 2 Then
      _TrayTipStatus("Mouse Warped to Top")
      MouseMove($aMousePos[0], 3, 1)
      _TrayTipStatus("")
     EndIf

     $iMouseBounce = 0
     $bInRange = False
     $iMouseTime = 0
    EndIf
   Else
    ; Timer expired so reset bounce condition
    $iMouseBounce = 0
    $bInRange = False
    $iMouseTime = 0
   EndIf
  Else
   ; Mouse must linger in trigger zone for more than 2 seconds
   If TimerDiff($iMouseTime) > 2000 Then
    $aMousePos = MouseGetPos()
    If $aMousePos[0] <= 2 Then
     _MousePrevDesk($aMousePos)
    ElseIf $aMousePos[0] >= @DeskTopWidth - 2 Then
     _MouseNextDesk($aMousePos)
    EndIf
  
    $bInRange = False
    $iMouseTime = 0
   EndIf
  EndIf
 Else
  If $bMouseBounce and $iMouseTime > 0 Then
   If TimerDiff($iMouseTime) < 2000 Then
    If $iMouseBounce == 1 Then
     $iMouseBounce = 2 ; In then out-of-range
    ElseIf $iMouseBounce == 2 Then
     ; Still out-of-range in time so OK...
    EndIf
   Else
    ; Time expired so reset timer
    $iMouseBounce = 0 ; Reset out of band condition
    $iMouseTime = 0
   EndIf
  Else
   $iMouseTime = 0
  EndIf
 EndIf
EndFunc

Func _showwins()
 Local $var, $x

 $var = IniReadSection(@tempdir & "pangaeadesktops.ini", $activedesk)
 If @error Then 
     return
 Else
     For $x = 1 To $var[0][0]
      WinSetState($var[($var[0][0] +1) -$x][0],"",@SW_SHOW)
     Next
 EndIf
EndFunc

Func _hidewins()
 Local $var, $x

 $var = IniReadSection(@tempdir & "pangaeadesktops.ini", $activedesk)
 If @error Then 
     return
 Else
     For $x = 1 To $var[0][0]
      WinSetState($var[($var[0][0] +1) -$x][0],"",@SW_HIDE)
     Next
 EndIf
EndFunc

Func _MouseNextDesk($aMousePos)
 BlockInput(1)
 MouseMove(5, $aMousePos[1], 1)
 _nextdesk() ; To the right
 BlockInput(0)
EndFunc

Func _MousePrevDesk($aMousePos)
 BlockInput(1)
 MouseMove(@DeskTopWidth - 5, $aMousePos[1], 1)
 _prevdesk() ; To the Left
 BlockInput(0)
EndFunc

Func _nextdesk()
 Local $iDeskNum

 If $inaction = 1 then return
 $inaction = 1

 $iDeskNum = $activedesk + 1
 If $iDeskNum = 5 Then $iDeskNum = 1
 _TrayTipStatus("Desktop " & $iDeskNum)

 If $texton = 1 Then _text2()
 _winget()
 If $bAnimate Then _animate1()
 _hidewins()
 $activedesk = $iDeskNum
 _showwins()
 If $bAnimate Then _animate3()
 $inaction = 0
 _text1()
EndFunc

Func _prevdesk()
 Local $iDeskNum

 If $inaction = 1 then return
 $inaction = 1

 $iDeskNum = $activedesk - 1
 If $iDeskNum == 0 Then $iDeskNum = 4
 _TrayTipStatus("Desktop " & $iDeskNum)
 
 If $texton = 1 Then _text2()
 _winget()
 If $bAnimate Then _animate1()
 _hidewins()
 $activedesk = $iDeskNum
 _showwins()
 If $bAnimate Then _animate2()
 $inaction = 0
 _text1()
EndFunc

Func _movetonext()
 If $inaction = 1 then return
 $inaction = 1

 _winget()
 IniDelete (@tempdir & "pangaeadesktops.ini",$activedesk,$winlist[1])
 $activedesk = $activedesk + 1
 If $activedesk = 5 Then $activedesk = 1
 Iniwrite(@tempdir & "pangaeadesktops.ini",$activedesk,$winlist[1],"moved")
 $activedesk = $activedesk - 1
 If $activedesk = 0 Then $activedesk = 4
 WinSetState($winlist[1],"",@SW_HIDE)
 $inaction = 0
 _nextdesk()
EndFunc

Func _movetoprev()
 If $inaction = 1 then return
 $inaction = 1

 _winget()
 IniDelete (@tempdir & "pangaeadesktops.ini",$activedesk,$winlist[1])
 $activedesk = $activedesk - 1
 If $activedesk = 0 Then $activedesk = 4
 Iniwrite(@tempdir & "pangaeadesktops.ini",$activedesk,$winlist[1],"moved")
 $activedesk = $activedesk + 1
 If $activedesk = 5 Then $activedesk = 1
 WinSetState($winlist[1],"",@SW_HIDE)
 $inaction = 0
 _prevdesk()
EndFunc

Func _winget()
 Local $x, $y, $var

 $y = 0
 $var = WinList()
 IniDelete(@tempdir & "pangaeadesktops.ini",$activedesk)
 For $x = 1 to $var[0][0]
  If $var[$x][0] <> "" AND IsVisible($var[$x][1]) AND $var[$x][0] <> "Program Manager" AND $var[$x][0] <> "Desktop 1" AND $var[$x][0] <> "Desktop 2" AND $var[$x][0] <> "Desktop 3" AND $var[$x][0] <> "Desktop 4" Then
   Iniwrite(@tempdir & "pangaeadesktops.ini",$activedesk,$var[$x][0],$var[$x][1])
   $y = $y + 1
   $winlist[$y] = $var[$x][0]
  EndIf
 Next
 $winlist[0] = $y
EndFunc

Func _panic()
 Local $x, $y, $var

 _TrayTipStatus("Exiting Pangaea Desktops")
 for $y = 1 to 4
  $var = IniReadSection(@tempdir & "pangaeadesktops.ini", $y)
  If @error = 0 then
      For $x = 1 To $var[0][0]
       WinSetState($var[($var[0][0] +1) -$x][0],"",@SW_SHOW)
      Next
     EndIf
 next
 FileDelete(@tempdir & "pangaeadesktops.ini")
 FileDelete(@tempdir & "pangaeaprtsc.jpg")
 Exit
EndFunc

Func _animate1()
 DllCall("captdll.dll", "int", "CaptureScreen", "str", @tempdir & "pangaeaprtsc.jpg", "int", 85)
 _TrayTipStatus($sLastTTMsg)
 $hwnd = GUICreate("AnimatedWindow", @desktopwidth, @desktopheight, 0, 0, $WS_POPUP, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
 GUICtrlCreatePic(@tempdir & "pangaeaprtsc.jpg", 0, 0, @desktopwidth, @desktopheight)
 GUISetState()
 _TrayTipStatus($sLastTTMsg)
EndFunc

Func _animate2()
 DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 500, "long", 0x00050002) ; slide out to left
 _TrayTipStatus($sLastTTMsg)
 GUIDelete($hwnd)
EndFunc

Func _animate3()
 DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 500, "long", 0x00050001) ; slide out to right
 _TrayTipStatus($sLastTTMsg)
 GUIDelete($hwnd)
EndFunc

Func _text1()
 Local $text
 _TrayTipStatus($sLastTTMsg)
 $text = "Desktop " & $activedesk
 TrayItemSetText($desktopitem, $text)
 $textwin = TextWindow($text, 600, 40, "", -1, 10, 10, 0xFF0000)
 GUISetState()
 
 $texton = 1
 $texttime = TimerInit()
EndFunc

Func _text2()
 GUIDelete($textwin)
 $texton = 0
EndFunc

Func OnAutoItExit()
 _panic()
EndFunc

Func IsVisible($handle)
 If BitAnd(WinGetState($handle),2) Then 
  Return 1
 Else
  Return 0
 EndIf
EndFunc

Func TextWindow($zText,$width,$height,$font="Microsoft Sans Serif",$weight=1000,$x=-1,$y=-1,$color=-1)
    Local Const $ANSI_CHARSET = 0
    Local Const $OUT_CHARACTER_PRECIS = 2
    Local Const $CLIP_DEFAULT_PRECIS = 0
    Local Const $PROOF_QUALITY = 2
    Local Const $FIXED_PITCH = 1
    Local Const $RGN_XOR = 3
    
    If $font = "" Then $font = "Microsoft Sans Serif"
    If $weight = -1 Then $weight = 1000
    Local $gui = GUICreate("Text Window",$width,$height,$x,$y,$WS_POPUP,$WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
    If $color <> -1 Then GUISetBkColor($color)
    Local $hDC= DLLCall("user32.dll","int","GetDC","hwnd",$gui)
    Local $hMyFont = DLLCall("gdi32.dll","hwnd","CreateFont","int",$height, _
                    "int",0,"int",0,"int",0,"int",1000,"int",0, _
                    "int",0,"int",0,"int",$ANSI_CHARSET, _
                    "int",$OUT_CHARACTER_PRECIS,"int",$CLIP_DEFAULT_PRECIS, _
                    "int",$PROOF_QUALITY,"int",$FIXED_PITCH,"str",$font )
    Local $hOldFont = DLLCall("gdi32.dll","hwnd","SelectObject","int",$hDC[0], _
                    "hwnd",$hMyFont[0])
    DLLCall("gdi32.dll","int","BeginPath","int",$hDC[0])
    DLLCall("gdi32.dll","int","TextOut","int",$hDC[0],"int",0,"int",0, _
                    "str",$zText,"int",StringLen($zText))
    DLLCall("gdi32.dll","int","EndPath","int",$hDC[0])
    Local $hRgn1 = DLLCall("gdi32.dll","hwnd","PathToRegion","int",$hDC[0])
    Local $rc = DLLStructCreate("int;int;int;int")
    DLLCall("gdi32.dll","int","GetRgnBox","hwnd",$hRgn1[0], _
                    "ptr",DllStructGetPtr($rc))
    Local $hRgn2 = DLLCall("gdi32.dll","hwnd","CreateRectRgnIndirect", _
                    "ptr",DllStructGetPtr($rc))
    DLLCall("gdi32.dll","int","CombineRgn","hwnd",$hRgn2[0],"hwnd",$hRgn2[0], _
                    "hwnd",$hRgn1[0],"int",$RGN_XOR)
    DLLCall("gdi32.dll","int","DeleteObject","hwnd",$hRgn1[0])
    DLLCall("user32.dll","int","ReleaseDC","hwnd",$gui,"int",$hDC[0])
    DLLCall("user32.dll","int","SetWindowRgn","hwnd",$gui,"hwnd",$hRgn2[0],"int",1)
    DLLCall("gdi32.dll","int","SelectObject","int",$hDC[0],"hwnd",$hOldFont[0])
    Return $gui
EndFunc

Func _trayAnimate()
 If $bAnimate Then 
  TrayItemSetState($ti_Animate, $TRAY_UNCHECKED) ; $TRAY_UNCHECKED = 4
  $bAnimate = False
 Else
  TrayItemSetState($ti_Animate, $TRAY_CHECKED) ; $TRAY_CHECKED = 1
  $bAnimate = True
 EndIf
EndFunc

Func _trayBounce()
 If $bMouseBounce Then
  TrayItemSetState($ti_Bounce, $TRAY_UNCHECKED)
  $bMouseBounce = False
  $iMouseBounce = 0
 Else
  TrayItemSetState($ti_Bounce, $TRAY_CHECKED)
  $bMouseBounce = True
  $iMouseBounce = 0
 EndIf
EndFunc

Func _About()
 Local $s
 
 $s = "Pangaea Desktops "
 If @Compiled Then $s &= FileGetVersion(@AutoItExe)
 $s &= @CRLF & "by Rakudave, Pangaea WorX 2006" & @CRLF & "Mouse modification by Foxnolds"
 $s &= @CRLF & @CRLF & "[url="[url="http://www.pangaeaworx.ch.vu"]http://www.pangaeaworx.ch.vu[/url]"]www.pangaeaworx.ch.vu[/url]"
 Msgbox(64,"about:", $s)
EndFunc

Func _TrayTipStatus($sTTMsg)
 If $sTTMsg == "" Then
  TraySetState(17) ; Resets the icon to the defaults (no flashing, default tip text)
  ; Just incase icon disappeared...
  Opt("TrayIconHide", 0) ; 0=show (default), 1=hide tray icon
  $iCountTime = TimerInit()
  $iCountdown = 2  ; Clear TrayTip after 2 seconds via Main Event Loop
  Return    ; Leave old message to expire
 EndIf

 If $sLastTTMsg <> $sTTMsg Then
  $sLastTTMsg = $sTTMsg
  TrayTip("", "", 0) ; Clear and remove any previous TrayTip
 EndIf
 $sTrayTip_MouseOverMsg = $gcsTrayTip_MouseOverPrefix & $sTTMsg

 ; Just incase icon disappeared...
 Opt("TrayIconHide", 0) ; 0=show (default), 1=hide tray icon
 TraySetState(4)  ; Flashes the tray icon

 ; TrayTip ( "title", "text", timeout [, option] )
 ; title  Text appears in bold at the top of the balloon tip. (63 characters maximum) 
 ; text  Message the balloon tip will display. (255 characters maximum) 
 ; timeout A rough estimate of the time (in seconds) the balloon tip should be displayed.
 ;   (Windows has a min and max of about 10-30 seconds but does not always honor a time in that range.) 
 ; option  [optional] See Remarks. 0=No icon (default),
 ;    1=Info icon, 2=Warning icon, 3=Error icon 
 TrayTip($gcsTrayTip_BalloonTitle, $sTTMsg, 30, 1)
EndFunc ;==>_TrayTipStatus

Func _TrayMouseOver()
 TrayTip("", "", 0) ; clears any tray tip
 TraySetToolTip($sTrayTip_MouseOverMsg)
EndFunc ;==>_TrayMouseOver
Edited by Foxnolds
Link to comment
Share on other sites

Hello,

i have a suggestion for your script.

If i switch the virtual desktop to an any, and come back to the prevories Desktop then the elements in the Taskbar have an any order. Can you chance this ?

sorry for my badly english.

many greetings Torsten

Link to comment
Share on other sites

i have a idea ...

show this codepice

; This is a customisation of a Scriptomatic VBS Script
; This is only for Demonstration
;-----------------------------------------------------------
Dim Const $wbemFlagReturnImmediately = 0x10
Dim Const $wbemFlagForwardOnly = 0x20

$oWMIService = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2")
If Not @error Then
    $oItems = $oWMIService.ExecQuery("SELECT * FROM Win32_Process", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

    For $Item In $oItems
        ConsoleWrite("Name: " & $Item.Name & "ProcessId: " & $Item.ProcessId & "CommandLine: " & $Item.CommandLine & @LF)
    Next
EndIf

this will get you a list of all running processes in the order of starttime

you can get many additional infos to the processes

se on msdn

greeting Torsten

Edited by Torsten
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...