Mat Posted May 21, 2009 Share Posted May 21, 2009 Someones already written a multi-desktop program in autoit.http://www.autoitscript.com/forum/index.php?showtopic=44724And it looks like thats where you guys are headed. AutoIt Project Listing Link to comment Share on other sites More sharing options...
FireFox Posted May 21, 2009 Share Posted May 21, 2009 Someones already written a multi-desktop program in autoit.http://www.autoitscript.com/forum/index.php?showtopic=44724And it looks like thats where you guys are headed.Its not the same thing, here you can show what you can't (in the right side) and not change the desktop directory for have differents icons Cheers, FireFox. Link to comment Share on other sites More sharing options...
Mat Posted May 21, 2009 Share Posted May 21, 2009 I was saying thats probably were they're going to end up. Someones going to mention it will be more efficient to create a second icon directory, and use that... etc. see what I mean? Maybe they won't, but I'm giving them another option. MDiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
youknowwho4eva Posted May 21, 2009 Author Share Posted May 21, 2009 (edited) This is wonderful. Exactly what I was hoping to get out of this. I'll have to try them out to see how they work. I was looking at emulating the desktop, but this would be more along the lines of what I was looking to do. CODEOpt("MouseCoordMode",1) HotKeySet("{ESC}","foo") #Include <GuiListView.au3> Global $hDesk, $aStartDim, $aCurrentDim $hDesk=ControlGetHandle("Program Manager", "", "SysListView321") $aStartDim=WinGetPos($hDesk) $bkg = _GUICtrlListView_GetBkImage($hdesk) $aCurrentDim=$aStartDim $speed = 9 $border = 26 $minx=-$aStartDim[2]*2 $miny=-$aStartDim[3]*2 $aCurrentDim[2] *=3 $aCurrentDim[3] *=3 $maxx=0 $maxy=0 _DesktopMove_Set() $borderr=@DesktopWidth - $border $borderb=@DesktopHeight - $border While 1 If WinActive("Program Manager") Then $mouse=MouseGetPos() Select Case $mouse[0] < $border $aCurrentDim[0]+= 4*($border -$mouse[0])/$speed _DesktopMove_Set() Case $mouse[0] > $borderr $aCurrentDim[0]+= 4*($borderr-$mouse[0])/$speed _DesktopMove_Set() Case $mouse[1] < $border $aCurrentDim[1]+= 4*($border -$mouse[1])/$speed _DesktopMove_Set() Case $mouse[1] > $borderb $aCurrentDim[1]+= 4*($borderb-$mouse[1])/$speed _DesktopMove_Set() EndSelect EndIf Sleep(100) WEnd Func foo() _DesktopMove_Restore() Exit EndFunc Func _DesktopMove_Set() $aCurrentDim[0]=iLimit($aCurrentDim[0], $minx, $maxx) $aCurrentDim[1]=iLimit($aCurrentDim[1], $miny, $maxy) WinMove($hDesk,'',$aCurrentDim[0],$aCurrentDim[1],$aCurrentDim[2],$aCurrentDim[3]) _GUICtrlListView_SetBkImage($hdesk,$bkg[1],0,$bkg[2],$bkg[3]) EndFunc Func _DesktopMove_Restore() WinMove($hDesk,'',$aStartDim[0],$aStartDim[1],$aStartDim[2],$aStartDim[3]) EndFunc Func OnAutoItExit ( ) _DesktopMove_Restore() EndFunc Func iLimit($i, $n, $x) If $i<$n Then Return $n If $i>$x Then Return $x Return $i EndFunc Edit: Refreshes background, with light flicker. Edited May 21, 2009 by youknowwho4eva Giggity Link to comment Share on other sites More sharing options...
corgano Posted May 21, 2009 Share Posted May 21, 2009 expandcollapse popupOpt("MouseCoordMode",1) #Include <GuiListView.au3> HotKeySet("{ESC}","foo") Global $hDesk, $aStartDim, $aCurrentDim $hDesk=ControlGetHandle("Program Manager", "", "SysListView321") $aStartDim=WinGetPos($hDesk) $aCurrentDim=$aStartDim $bkg = _GUICtrlListView_GetBkImage($hdesk) $r = 0 $speed = 7 $border = 26 ;$aCurrentDim[0]-= $aStartDim[2] ;$aCurrentDim[1]-= $aStartDim[3] $minx=-$aStartDim[2]*2 $miny=-$aStartDim[3]*2 $aCurrentDim[2] *=3 $aCurrentDim[3] *=3 $maxx=0 $maxy=0 _DesktopMove_Set() $borderr=@DesktopWidth - $border $borderb=@DesktopHeight - $border While 1 If WinActive("Program Manager") Then $mouse=MouseGetPos() While $mouse[0] < $border $aCurrentDim[0]+= 4*($border -$mouse[0])/(10 - $speed) _DesktopMove_Set() $mouse=MouseGetPos() $r = 1 WEnd While $mouse[0] > $borderr $aCurrentDim[0]+= 4*($borderr-$mouse[0])/(10 - $speed) _DesktopMove_Set() $mouse=MouseGetPos() $r = 1 WEnd While $mouse[1] < $border $aCurrentDim[1]+= 4*($border -$mouse[1])/(10 - $speed) _DesktopMove_Set() $mouse=MouseGetPos() $r = 1 WEnd While $mouse[1] > $borderb $aCurrentDim[1]+= 4*($borderb-$mouse[1])/(10 - $speed) _DesktopMove_Set() $mouse=MouseGetPos() $r = 1 WEnd If $r = 1 Then _GUICtrlListView_SetBkImage($hdesk,$bkg[1],0,$bkg[2],$bkg[3]) $r = 0 EndIf ;~ _DesktopMove_Set() EndIf Sleep(100) WEnd Func foo() _DesktopMove_Restore() Exit EndFunc Func _DesktopMove_Set() $aCurrentDim[0]=iLimit($aCurrentDim[0], $minx, $maxx) $aCurrentDim[1]=iLimit($aCurrentDim[1], $miny, $maxy) WinMove($hDesk,'',$aCurrentDim[0],$aCurrentDim[1],$aCurrentDim[2],$aCurrentDim[3]) EndFunc Func _DesktopMove_Restore() WinMove($hDesk,'',$aStartDim[0],$aStartDim[1],$aStartDim[2],$aStartDim[3]) EndFunc Func OnAutoItExit ( ) _DesktopMove_Restore() EndFunc Func iLimit($i, $n, $x) If $i<$n Then Return $n If $i>$x Then Return $x Return $i EndFunc try something like this to make it get weather it needs to refresh or not. 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
FireFox Posted May 21, 2009 Share Posted May 21, 2009 (edited) Functions :Desktop icons won't move while the mouse is hovering the taskbar windowDesktop icons move by the width and height of them (fast and better)Edit1 : Corner moves (double move)Edit2 : Wallpaper restore on exitexpandcollapse popupOpt('MouseCoordMode', 1) HotKeySet('{ESC}', '_Exit') #include <GuiListView.au3> Local $hDesk = ControlGetHandle('Program Manager', '', 'SysListView321') Local $aStartDim = WinGetPos($hDesk) Local $bkg = _GUICtrlListView_GetBkImage($hDesk) Local $aCurrentDim = $aStartDim Local $speed = 100 ;speed = sleep between moves Local $movex = 85 ;movex = witdh moving Local $movey = 75 ;movey = height moving Local $minx = 0 ;min moving from the top Local $miny = 0 ;min moving from the left Local $left = 30 ;witdh zone from left (when mouse hover it the desktop move from left or right) Local $top = 30 ;height zone from top Local $taskbar = @DesktopHeight - 30 ;taskbar height zone Local $right = @DesktopWidth - 30 ;witdh zone from right Local $bottom = @DesktopHeight - 60 ;height zone from bottom (30px + taskbar height 30px = 60) $aCurrentDim[2] *=3 $aCurrentDim[3] *=3 _DesktopMove_Set( ) While 1 $Active = WinGetTitle("[active]") If $Active = 'Program Manager' Or $Active = '' Then $mouse = MouseGetPos( ) Select ;check for corners Case $mouse[0] < $left And $mouse[1] < $top $aCurrentDim[0] += $movex $aCurrentDim[1] += $movex _DesktopMove_Set( ) Case $mouse[0] > $right And ($mouse[1] > $bottom And $mouse[1] < $taskbar) $aCurrentDim[0] -= $movex $aCurrentDim[1] -= $movex _DesktopMove_Set( ) Case $mouse[1] < $top And $mouse[0] > $right $aCurrentDim[0] -= $movey $aCurrentDim[1] += $movey _DesktopMove_Set( ) Case $mouse[0] < $left And ($mouse[1] > $bottom And $mouse[1] < $taskbar) $aCurrentDim[0] += $movex $aCurrentDim[1] -= $movey _DesktopMove_Set( ) ;check for sides Case $mouse[0] < $left ConsoleWrite('left > ' & $mouse[0] & @CRLF) $aCurrentDim[0] += $movex _DesktopMove_Set( ) Case $mouse[0] > $right ConsoleWrite('right > ' & $mouse[0] & @CRLF) $aCurrentDim[0] -= $movex _DesktopMove_Set( ) Case $mouse[1] < $top ConsoleWrite('top > ' & $mouse[1] & @CRLF) $aCurrentDim[1] += $movey _DesktopMove_Set( ) Case $mouse[1] > $bottom And $mouse[1] < $taskbar ConsoleWrite('bottom > ' & $mouse[1] & @CRLF) $aCurrentDim[1] -= $movey _DesktopMove_Set( ) EndSelect EndIf Sleep($speed) WEnd Func _Exit( ) Exit EndFunc Func OnAutoItExit( ) _DesktopMove_Restore( ) EndFunc ;==>OnAutoItExit Func _DesktopMove_Set( ) If $aCurrentDim[0] > $minx Then $aCurrentDim[0] = $minx If $aCurrentDim[1] > $miny Then $aCurrentDim[1] = $miny WinMove($hDesk, '', $aCurrentDim[0], $aCurrentDim[1], $aCurrentDim[2], $aCurrentDim[3]) _GUICtrlListView_SetBkImage($hDesk, $bkg[1], 0, $bkg[2], $bkg[3]) EndFunc ;==>_DesktopMove_Set Func _DesktopMove_Restore( ) WinMove($hDesk, '', $aStartDim[0], $aStartDim[1], $aStartDim[2], $aStartDim[3]) _GUICtrlListView_SetBkImage($hDesk, $bkg[1], 0, $bkg[2], $bkg[3]) EndFunc ;==>_DesktopMove_RestoreEnjoy ! Cheers, FireFox. Edited May 22, 2009 by FireFox Link to comment Share on other sites More sharing options...
Cynagen Posted May 22, 2009 Share Posted May 22, 2009 beleve me crating a listview that supports the correct icons you have on desktop is a mess, and i didn't ever finished it, there are always some icons that don't display correct.for example if you just read the ico from an exe what do you do with documents?if you use the global icon cache, some native icons don't work, and to decide which one is the correct icon to dosplay on this listview, is like hell.i would love the idea changing the style of the procman listview to list or detailed.there is already a solution here in the forum ( don't remember where), but this gets screwed by pressing F5 on the desktop.anyone an idea?Here's an idea for your issue with incorrect/missing icons for the listview. Check the registry for the default application that handles the filetype, and get the app icon for that, typically the file icon is the second one compiled into the program, so it's relatively easy to pick it out, now for things like winamp files, that's a bit more atypical since you can set your icon in the winamp settings. Maybe there's something that sets that in the registry as well? Blah, blah, blah... lip service... lip service.Working on a number of projects right now, just waiting for my time to post them here on AutoIt forums. Link to comment Share on other sites More sharing options...
youknowwho4eva Posted May 22, 2009 Author Share Posted May 22, 2009 @FireFox, that's very smooth, still a good bit of flicker. I have an idea that I'm working on, I have some real work to do today, but I still may have something before the end of the day. Giggity Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now