FastJMAN1 Posted September 28, 2011 Share Posted September 28, 2011 You are a wizard for sure. I have been messing around with this same idea for months. Great post!!!!! Graduated with flying colors. Link to comment Share on other sites More sharing options...
rchockxm Posted September 28, 2011 Share Posted September 28, 2011 nice udf. thanks. rchockxm Link to comment Share on other sites More sharing options...
Valuater Posted September 29, 2011 Share Posted September 29, 2011 Really Great Work!!! This type of UDF programming is right up my alley. I have spent allot of time working with visual appearances in Autoit. You have surpassed some of the things I was attempting to accomplish here.. Thanks for sharing, Valuater 8) Link to comment Share on other sites More sharing options...
FastJMAN1 Posted October 24, 2011 Share Posted October 24, 2011 (edited) This is an UDF to create Mac style toolbars, like MobyDock, ObjectDock... screenshots:IconDock_1.jpgIconDock_2.jpgIconDock_3.jpg examples included. Download: IconDock.zip for german users: http://www.autoit.de/index.php?page=Thread&postID=215581#post215581 enjoy I noticed that it does not get the icon for, lnk files or .doc and xls. Right at the moment that is my only issue that I can't seem to overcome. How ever, I can make it read the path to the .lnk file and then add my own icon but then I have to filechangedir then shellexecute in order to make the file open. Any ideas? Edited October 24, 2011 by FastJMAN1 Link to comment Share on other sites More sharing options...
jazzyjeff Posted January 25, 2012 Share Posted January 25, 2012 Thanks for the UDF. It looks great. I have used an example posted here to try and put together a utility for my school. Instead of calling an exe that is already installed on my machine, I'd like to click on an icon in the dock bar, and then have it call a function in my script. It seems like this is possible, but it is not obvious to me right now. Here is the code I have. expandcollapse popup#include <GuiConstantsEx.au3> #include <GuiConstants.au3> #include <WindowsConstants.au3> #include <Misc.au3> #include <IconDock.au3> HotKeySet("{ESC}", "_Exit") Global $iIconSizeMin = 48 Global $iIconSizeMax = 64 Global $hIconDock = _IconDock_Create(0,80 - $iIconSizeMax - $iIconSizeMin, @DesktopWidth, $iIconSizeMax + $iIconSizeMin, BitOR($IconDock_Align_Horizontal, $IconDock_Center), $IconDock_Up, $iIconSizeMin, $iIconSizeMax, True) _IconDock_BeginUpdate($hIconDock) Global $aIcon[8] = [7] $aIcon[1] = _IconDock_IconSetIcon($hIconDock, 1, "d:BackupIconsAcroRd32.ico") $aIcon[2] = @SystemDir & "taskmgr.exe" $aIcon[3] = @SystemDir & "write.exe" $aIcon[4] = @SystemDir & "notepad.exe" $aIcon[5] = @SystemDir & "osk.exe" $aIcon[6] = @SystemDir & "charmap.exe" $aIcon[7] = @SystemDir & "mspaint.exe" For $i = 1 To $aIcon[0] If $i = 1 Then _IconDock_IconAdd($hIconDock, $aIcon[1], _AdobeReader(), $IconDock_RBUTTONDOWN);, $sText = ""[, $iX = 0[, $iY = 0]]]]]) ElseIf $i = 2 Then _IconDock_IconAddFile($hIconDock, $aIcon[2], 0, "_EventFunction", $IconDock_RBUTTONDOWN) ElseIf $i = 3 Then _IconDock_IconAddFile($hIconDock, $aIcon[3], 0, "_EventFunction", $IconDock_RBUTTONDOWN) ElseIf $i = 4 Then _IconDock_IconAddFile($hIconDock, $aIcon[4], 0, "_EventFunction", $IconDock_RBUTTONDOWN) ElseIf $i = 5 Then _IconDock_IconAddFile($hIconDock, $aIcon[5], 0, "_EventFunction", $IconDock_RBUTTONDOWN) ElseIf $i = 6 Then _IconDock_IconAddFile($hIconDock, $aIcon[6], 0, "_EventFunction", $IconDock_RBUTTONDOWN) ElseIf $i = 7 Then _IconDock_IconAddFile($hIconDock, $aIcon[7], 0, "_EventFunction", $IconDock_RBUTTONDOWN) EndIf Next _IconDock_EndUpdate($hIconDock) While 1 Sleep(100) WEnd Func _EventFunction($hID, $iIconIndex, $iEventMsg) Switch $hID Case $hIconDock Switch $iEventMsg Case $IconDock_RBUTTONDOWN Local $moved = DockMoveBar($hIconDock) If $moved = False Then ; If $moved = true the bar was moved - don't open options. DockConfig() EndIf EndSwitch EndSwitch EndFunc ;==>_EventFunction Func DockConfig() Local $hwdDock, $HRadio, $VRadio, $OKButton, $CancelButton, $msg $hwdDock = GUICreate("Dock Config", 280, 150) GUICtrlCreateLabel("IconSizeMin:", 10, 13, 80, 20) GUICtrlCreateLabel("IconSizeMax:", 10, 43, 80, 20) GUICtrlCreateLabel("Orientation:", 10, 83, 80, 20) $HRadio = GUICtrlCreateRadio("Horizontal", 100, 80, 100, 20) $VRadio = GUICtrlCreateRadio("Vertical", 200, 80, 100, 20) $OKButton = GUICtrlCreateButton("OK", 50, 120, 50, 20) $CancelButton = GUICtrlCreateButton("Cancel", 160, 120, 50, 20) GUISetState() ;MsgBox(0,0,"0k") While True $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE, $CancelButton ExitLoop Case $OKButton MsgBox(0,"pressed", "Pressed OK Button") ExitLoop EndSwitch Sleep(20) WEnd GUIDelete($hwdDock) EndFunc Func DockMoveBar($hwdGuiBar) Local $PosDiff[2], $WinPos, $WinPos2, $MousePos, $dll, $moved $dll = DllOpen("user32.dll") While 1 $MousePos = MouseGetPos() $WinPos = WinGetPos($hwdGuiBar) $PosDiff[0] = $WinPos[0] - $MousePos[0] $PosDiff[1] = $WinPos[1] - $MousePos[1] While _IsPressed("02", $dll) $MousePos = MouseGetPos() WinMove($hwdGuiBar, "", $MousePos[0] + $PosDiff[0], $MousePos[1] + $PosDiff[1]) WEnd Sleep(10) ExitLoop WEnd $WinPos2 = WinGetPos($hwdGuiBar, "") If ($WinPos[0] < $WinPos2[0] - 3) Or ($WinPos[1] < $WinPos2[1] - 3) Or ($WinPos[0] > $WinPos2[0] + 3) Or ($WinPos[1] > $WinPos2[1] + 3) Then $moved = True ; If the window was moved, don't run program on return. Else $moved = False EndIf Sleep(10) Return $moved EndFunc Func _Exit() _IconDock_Destroy($hIconDock) Exit EndFunc ;==>_Exit Func _AdobeReader() MsgBox(0,"Adobe Reader", "Opening Adobe Reader") Run("c:Program FilesAdobeReader 10.0ReaderAcroRd32.exe") EndFunc When I start the program it instantly tries to run the function, but I only want it to run when I click on the icon, which also doesn't appear. If you can offer me any help, it would be much appreciated. Thanks, Jeff Link to comment Share on other sites More sharing options...
lgvlgv Posted January 25, 2012 Share Posted January 25, 2012 Wow!! Link to comment Share on other sites More sharing options...
LiquidNitrogen Posted January 25, 2012 Share Posted January 25, 2012 Freakin Sweet. Formerly ReaperX Link to comment Share on other sites More sharing options...
xeroTechnologiesLLC Posted March 29, 2012 Share Posted March 29, 2012 (edited) Hoooly snap this is awesome! lolol i literally giggled when i started using it. hahahahahaha edit: would love to see some support for something other than .exe on the bar, such as loading links to webpages, etc, but i'll be working with this over the next few days to try and meet a project we are working on. if anything comes up i'll note it. Still enjoying the heck out of this lol Edited March 30, 2012 by xeroTechnologiesLLC Link to comment Share on other sites More sharing options...
marsfann Posted January 10, 2016 Share Posted January 10, 2016 hi how to set dock no always on top? Link to comment Share on other sites More sharing options...
qwert Posted January 11, 2016 Share Posted January 11, 2016 I just noticed this revived thread ... and the example sounds very worthwhile.Great stuff eukalyptus The art of GDI+ programming can be learned by your code Br,UEZWould anyone have current links? Link to comment Share on other sites More sharing options...
TouchOdeath Posted January 11, 2016 Share Posted January 11, 2016 https://autoit.de/index.php/Attachment/79469-IconDock-zip/With current version of autoit you'll need to rename $ghGDIPDLL to $__g_hGDIPDll in IconDock.au3 twothirtyone 1 Link to comment Share on other sites More sharing options...
qwert Posted January 11, 2016 Share Posted January 11, 2016 (edited) Thank you for that link. It's good to see that such a dramatic example of GDI+ hasn't evaporated. Edited January 11, 2016 by qwert Added image for reference Link to comment Share on other sites More sharing options...
areeb Posted July 14, 2017 Share Posted July 14, 2017 (edited) Excellent ! But when we compile this Script as 64-bit EXE, it does not work. What changes we have to do, so it can be compiled as 64-bit EXE ? Edited August 10, 2017 by areeb Areeb Qaisar Link to comment Share on other sites More sharing options...
TouchOdeath Posted June 20 Share Posted June 20 Heres an updated link again: ioa747 1 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