youknowwho4eva
Active Members-
Posts
701 -
Joined
-
Last visited
About youknowwho4eva
- Birthday 11/26/1985
Profile Information
-
Member Title
Giggity Giggity Goo
-
Location
Maryland
-
Interests
Engineer
youknowwho4eva's Achievements
Universalist (7/7)
0
Reputation
-
Perhaps it could be used in an application that collects data, and we've all seen when you get a result that is way out in left field that would throw off your calculations if you included it in your data set.
-
Detect Launch Via DblClick or commandline
youknowwho4eva replied to BigDaddyO's topic in AutoIt General Help and Support
What about adding a right click menu with a properties button? -
exactly what I was looking for. Thanks a million
-
I noticed (well checked to see if it did this) that it doesn't get shortcut icons. Something I've been working on myself. I know I don't have the knowledge to do it right without finding hints in examples. I was close last week but haven't had time to work on it, so I've lost most knowledge of which I gained.
-
Some Graphical Examples using GDI+ Vol. I
youknowwho4eva replied to UEZ's topic in AutoIt Example Scripts
Nothing is more painful than when your AutoIteroids explodes. Yea it flickers a lot, because the desktop has to refresh. I may try some stuff to make it look better, dono, have a lot of work to do this week. May just go with my original idea of something that only needs to refresh ever minute or so. -
@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.
-
Some Graphical Examples using GDI+ Vol. I
youknowwho4eva replied to UEZ's topic in AutoIt Example Scripts
Despite the annoying flicker, I think this may have some promising effects. I'm a little rusty on my GDI+ right now, but I was thinking a background that reflected time of day, maybe even have the time back there, eventually have it incompuse your whole world, weather, upcoming events, everything on your background. And here's my start. I was a little excited about the idea so I took UEZ's spinning squares and used it as my example. Yes lots of flicker, but if it were a updated every minute type deal, it wouldn't be so bad. CODE#include <Constants.au3> #include <GuiListView.au3> #include <GuiConstantsEx.au3> #include <GDIPlus.au3> $hdesk=ControlGetHandle("Program Manager", "", "SysListView321") $deskpos=WinGetPos($hDesk) Opt('MustDeclareVars', 1) Global Const $Pi = 3.1415926535897932384626 Global Const $width = @DesktopWidth / 2 Global Const $height = @DesktopHeight / 2 Global $hGUI, $hGraphic, $Bitmap, $GDI_Buffer, $Pen, $Brush Global $i, $j, $k, $xcoord, $ycoord, $red, $green, $blue Global $x1, $x2, $x3, $x4, $y1, $y2, $y3, $y4 $hGUI = GUICreate("GDI+: Rotating Squares by UEZ 2009", $width, $height) GUISetState(@SW_SHOW) _GDIPlus_Startup () $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hGUI) ;create graphic $Bitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $hGraphic) ;create bitmap $GDI_Buffer = _GDIPlus_ImageGetGraphicsContext($Bitmap) ;create buffer $Pen = _GDIPlus_PenCreate(0, 2) $Brush = _GDIPlus_BrushCreateSolid(0xFF000000) _GDIPlus_GraphicsSetSmoothingMode($GDI_Buffer, 4) _GDIPlus_GraphicsClear($GDI_Buffer) $i = 1 Do ;~ _GDIPlus_GraphicsClear($GDI_Buffer) ;clear buffer _GDIPlus_GraphicsFillEllipse($GDI_Buffer, $width / 2 - $k, $height / 2 - $k, 2 * $k, 2 * $k, $Brush) ;clear only area where the squares are drawn If $k <= 3 * $width / 7 Then $k += 1 For $j = 8 To $k Step 24 + Cos($i * $Pi / 60) * 12 $red = ((Sin(2^0 * ($j - $i) / 2^5) + 1) / 2) * 256 $green = ((Sin(2^0 * ($j - $i) / 2^7) + 1) / 2) * 256 $blue = ((Sin(2^0 * ($j - $i) / 2^9) + 1) / 2) * 256 _GDIPlus_PenSetColor($Pen, "0xEF" & Hex($red, 2) & Hex($green, 2) & Hex($blue, 2)) ;Set the pen color $xcoord = $j ;+ Sin($i * $Pi / 60) * 8 $ycoord = $j ;+ Cos($i * $Pi / 60) * 8 Square($xcoord, $ycoord, $j * Sin($i / $k * $Pi * 4) * 2 / 3) Next _GDIPlus_GraphicsDrawImageRect($hGraphic, $Bitmap, 0, 0, $width, $height) ;copy to bitmap $i += 1.5 Sleep(30) _GDIPlus_ImageSaveToFile($bitmap,@MyDocumentsDir & "\gdibkg.jpg") _GUICtrlListView_SetBkImage($hDesk,@MyDocumentsDir & "\gdibkg.jpg",1) Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Clean up resources _GDIPlus_PenDispose($Pen) _GDIPlus_BitmapDispose($Bitmap) _GDIPlus_GraphicsDispose($GDI_Buffer) _GDIPlus_GraphicsDispose ($hGraphic) _GDIPlus_Shutdown () Func Square($xx1, $yy1, $i) Local $degree $degree = 45 $x1 = $xx1 * Cos(($i + $degree + 0) * $Pi / 180) + $width / 2 $y1 = $yy1 * Sin(($i + $degree + 0) * $Pi / 180) + $height / 2 $x2 = $xx1 * Cos(($i + $degree + 90) * $Pi / 180) + $width / 2 $y2 = $yy1 * Sin(($i + $degree + 90) * $Pi / 180) + $height / 2 $x3 = $xx1 * Cos(($i + $degree + 180) * $Pi / 180) + $width / 2 $y3 = $yy1 * Sin(($i + $degree + 180) * $Pi / 180) + $height / 2 $x4 = $xx1 * Cos(($i + $degree + 270) * $Pi / 180) + $width / 2 $y4 = $yy1 * Sin(($i + $degree + 270) * $Pi / 180) + $height / 2 _GDIPlus_GraphicsDrawLine($GDI_Buffer, $x1, $y1, $x2, $y2, $Pen) _GDIPlus_GraphicsDrawLine($GDI_Buffer, $x2, $y2, $x3, $y3, $Pen) _GDIPlus_GraphicsDrawLine($GDI_Buffer, $x3, $y3, $x4, $y4, $Pen) _GDIPlus_GraphicsDrawLine($GDI_Buffer, $x4, $y4, $x1, $y1, $Pen) EndFunc -
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.
-
As for the first, I've got that functionality. I grab the current positions and all. As far as the second, I'll have too look into it deeper to see if it pulls the actual icons or if it has it's own library. But it doesn't appear either addresses putting the icon above the text. Edit: thanks for those links btw. Can someone grab the code and forward that my way? I always get that the download is blocked for some reason.
-
ah, now I see
-
I'm trying to emulate the desktop, and have run into a few road blocks. Right now I'm working on Icon transparency. I made up this little script to start off testing with. I made every icon the empty recycle bin icon. What I'd like to do is have the names listed under the icons. And if anyone can figure out how to get the icon locations for me that'd be great too. I haven't done as much research on that part. maybe able to find something on my own on that one. CODE#Include <GuiListView.au3> #include <Array.au3> #Include <Misc.au3> #Include <GuiImageList.au3> HotKeySet("{ESC}","close") $hProgMan = WinGetHandle("Program Manager") $progmanpos = WinGetPos($hProgman) $hDeskTop = ControlGetHandle( "Program Manager", "", "SysListView321" ) $desktoppos = ControlGetPos($hprogman,"",$hdesktop) Global $oldcount = _GUICtrlListView_GetItemCount($hdesktop) Global $aIcons[_GUICtrlListView_GetItemCount($hDeskTop)][4] Global $bIcons[_GUICtrlListView_GetItemCount($hDeskTop)][4] Global $dll = DllOpen("user32.dll") $images=_GUIImageList_Create(32,32,5,3) For $i = 0 to _GUICtrlListView_GetItemCount($hDeskTop) - 1 ; Name $bIcons[$i][0] = _GUICtrlListView_GetItemText($hDeskTop, $i) $bPos = _GUICtrlListView_GetItemPosition($hDeskTop, $i) ; Left $bIcons[$i][1] = $bPos[0] ; Top $bIcons[$i][2] = $bPos[1] $bIcons[$i][3] = _GUICtrlListView_GetItemImage($hDesktop,$i) _GUIImageList_AddIcon($images,@SystemDir & "\shell32.dll",32,True) $bIcons[0][0] = $i Next $fuxdesktop = GUICreate("Fux Desktop",$progmanpos[2] - $progmanpos[0], $progmanpos[3] - $progmanpos[1], $progmanpos[0] + 80, $progmanpos[1]) $desktop2 = GUICtrlCreateListView("", $desktoppos[0] , $desktoppos[1],$desktoppos[2] - $desktoppos[0] ,$desktoppos[3] - $desktoppos[1]) _GUICtrlListView_SetImageList($desktop2,$images,1) _GUICtrlListView_SetExtendedListViewStyle($desktop2,$LVS_SHOWSELALWAYS) _GUICtrlListView_AddColumn($desktop2, " ", 220) GUISetState() For $i = 0 to $bIcons[0][0] _GUICtrlListView_AddItem($desktop2,$bIcons[$i][0],0) _GUICtrlListView_SetItemImage($fuxdesktop,$i,$bIcons[$i][3],1) Next While 1 Sleep(10) WEnd Func close() Exit EndFunc
-
I couldn't get it to do anything.
-
Sorry to bump but wanted to update where I am at know and look for a little help for progression. Right now I pull the same icon for all items. I'm ecstatic that I got that far. So now what I'd like to do is put the text under the icon, which I think I may be able to do. Fully expand the columns, another probably easy. I don't have a mess of experience with list view so I've got a little curve to learn it. The big thing will be finding the proper path to the icons. I've been doing searches, but haven't seen anything promising yet. I think I've seen something with changing I think the recycle bin icon, which may prove promising. CODE#Include <GuiListView.au3> #include <Array.au3> #Include <Misc.au3> #Include <GuiImageList.au3> HotKeySet("{ESC}","close") $hProgMan = WinGetHandle("Program Manager") $progmanpos = WinGetPos($hProgman) $hDeskTop = ControlGetHandle( "Program Manager", "", "SysListView321" ) $desktoppos = ControlGetPos($hprogman,"",$hdesktop) Global $oldcount = _GUICtrlListView_GetItemCount($hdesktop) Global $aIcons[_GUICtrlListView_GetItemCount($hDeskTop)][4] Global $bIcons[_GUICtrlListView_GetItemCount($hDeskTop)][4] Global $dll = DllOpen("user32.dll") $images=_GUIImageList_Create(30,30) For $i = 0 to _GUICtrlListView_GetItemCount($hDeskTop) - 1 ; Name $bIcons[$i][0] = _GUICtrlListView_GetItemText($hDeskTop, $i) $bPos = _GUICtrlListView_GetItemPosition($hDeskTop, $i) ; Left $bIcons[$i][1] = $bPos[0] ; Top $bIcons[$i][2] = $bPos[1] _GUIImageList_AddIcon($images,@SystemDir & "\shell32.dll",146) $bIcons[0][0] = $i Next $fuxdesktop = GUICreate("Fux Desktop",$progmanpos[2] - $progmanpos[0], $progmanpos[3] - $progmanpos[1], $progmanpos[0], $progmanpos[1]) $desktop2 = GUICtrlCreateListView(" | ", $desktoppos[0] , $desktoppos[1],$desktoppos[2] - $desktoppos[0] ,$desktoppos[3] - $desktoppos[1]) _GUICtrlListView_SetImageList($desktop2,$images,1) _GUICtrlListView_SetExtendedListViewStyle($desktop2,$lvs_ex_subitemimages) GUISetState() For $i = 0 to $bIcons[0][0] _GUICtrlListView_AddItem($desktop2,$bIcons[$i][0],1) _GUICtrlListView_SetItemImage($fuxdesktop,$i,$bIcons[$i][3],1) Next While 1 $mouse = MouseGetPos() If _IsPressed("10", $dll) = 0 Then For $i = 0 to _GUICtrlListView_GetItemCount($hDeskTop) - 1 ; Name $aIcons[$i][0] = _GUICtrlListView_GetItemText($hDeskTop, $i) $aPos = _GUICtrlListView_GetItemPosition($hDeskTop, $i) ; Left $aIcons[$i][1] = $aPos[0] ; Top $aIcons[$i][2] = $aPos[1] $aIcons[0][0] = $i Next If _GUICtrlListView_GetItemCount($hdesktop) > $oldcount Then count() Sleep(10) ElseIf _IsPressed("10", $dll) = 1 Then If $mouse[0] < 20 or $mouse[0] > @DesktopWidth*2 - 20 or $mouse[1] < 20 or $mouse[1] > @DesktopHeight - 20 then For $i = 0 To $aIcons[0][0] If $mouse[0] < 20 Then $aIcons[$i][1] += 5 _GUICtrlListView_SetItemPosition32($hDeskTop, $i, $aIcons[$i][1],$aicons[$i][2]) EndIf If $mouse[0] > @DesktopWidth*2 - 20 Then $aIcons[$i][1] -= 5 _GUICtrlListView_SetItemPosition32($hDeskTop, $i, $aIcons[$i][1],$aicons[$i][2]) EndIf If $mouse[1] <20 Then $aIcons[$i][2] += 5 _GUICtrlListView_SetItemPosition32($hDeskTop, $i, $aIcons[$i][1],$aicons[$i][2]) EndIf If $mouse[1] > @DesktopHeight - 20 Then $aIcons[$i][2] -= 5 _GUICtrlListView_SetItemPosition32($hDeskTop, $i, $aIcons[$i][1],$aicons[$i][2]) EndIf ; Wait a bit Next EndIf EndIf ;~ Sleep(1) WEnd Func close() For $i = 0 To $bIcons[0][0] If $mouse[0] < 20 Then _GUICtrlListView_SetItemPosition($hDeskTop, $i, $bIcons[$i][1],$bicons[$i][2]) EndIf If $mouse[0] > @DesktopWidth - 20 Then _GUICtrlListView_SetItemPosition($hDeskTop, $i, $bIcons[$i][1],$bicons[$i][2]) EndIf If $mouse[1] <20 Then _GUICtrlListView_SetItemPosition($hDeskTop, $i, $bIcons[$i][1],$bicons[$i][2]) EndIf If $mouse[1] > @DesktopHeight - 20 Then _GUICtrlListView_SetItemPosition($hDeskTop, $i, $bIcons[$i][1],$bicons[$i][2]) EndIf ; Wait a bit Next Exit EndFunc
-
Does just using _guictrllistview_getitemimage and setitemimage not work? I'm going to try some more things today to see if I can't get something working external of progman. I did play with controlsetpos, put it acts very odd. It would flash the desk top but not move anything until a guictrllistview_setitemposition was used, then it would move the control to where you specified, and do the setitemposition you specified. I'm sure one of us will find a way to make it behave properly.
-
I was thinking similar to that. I was thinking an iPod Touch/iPhone slide. With that you have black dots at the bottom indicating the number of pages, and the white dot is the active page. I'm working on a better slide effect.