Valuater Posted February 12, 2007 Share Posted February 12, 2007 (edited) Enjoy!!!Updated 7/30/2008 ver 1.2.0 ... ( Thanks Volly )expandcollapse popup#include <GUIConstantsEX.au3> #include <windowsconstants.au3> #include <buttonconstants.au3> #include <StaticConstants.au3> ;Opt("MustDeclareVars", 1) ; ver 1.2.0 ; $h_ToolBar = XSkinToolBarCreate($Xh_Gui, $tool_left, $tool_top, $tool_width, $tool_bkcolor = "") ; XSkinToolBarButton($iNumber, $iDLL = "shell32.dll") ; XSkinToolBarSeparator() Global $TBcnt = -1 ; ************************ YOUR CODE GOES BELOW HERE ***************************** $h_ToolBar = XSkinToolBarCreate("Float-ToolBar", 200, 200, 324) $TButton1 = XSkinToolBarButton( "", @WindowsDir & "\notepad.exe") ; #1 - Using Icons from a dll ( shell32.dll is default) XSkinToolBarButton(21) XSkinToolBarButton(17) XSkinToolBarButton(44) XSkinToolBarSeparator() GUICtrlSetTip( -1, "Drag Me") ; #2 - Using Icons from an exe file XSkinToolBarButton(22) XSkinToolBarButton("", @ProgramFilesDir & "\Internet Explorer\iexplore.exe") XSkinToolBarButton( "", @WindowsDir & "\explorer.exe") XSkinToolBarButton( "", @SystemDir & "\calc.exe") XSkinToolBarSeparator() GUICtrlSetTip( -1, "Drag Me") ; #3 - Using Icons from an ico file XSkinToolBarButton("", @ScriptDir & "\Skins\Default-ToolBar\Admin Tools.ico") XSkinToolBarButton("", @ScriptDir & "\Skins\Default-ToolBar\Control Panel.ico") XSkinToolBarButton("", @ScriptDir & "\Skins\Default-ToolBar\E-Mail.ico") ; Exit Button XSkinToolBarSeparator() GUICtrlSetTip( -1, "Drag Me") $TButtonLast = XSkinToolBarButton(27) GUISetState(@SW_SHOW, $h_ToolBar) WinSetOnTop($h_ToolBar, "", 1) While 1 $msg = GUIGetMsg() if $msg = $TButton1 Then Run('notepad.exe') if $msg = $TButtonLast Then Exit WEnd ; ************************ YOUR CODE ENDS HERE ***************************** Func XSkinToolBarCreate($XTitle, $tool_left, $tool_top, $tool_width, $tool_bkcolor = "") Local $Xh_ToolBar $Xh_ToolBar = GUICreate($XTitle, $tool_width, 24, $tool_left, $tool_top, $WS_POPUP, $WS_CLIPCHILDREN);-1, $WS_EX_STATICEDGE);, $Xh_Gui) If $tool_bkcolor <> "" Then GUISetBkColor($tool_bkcolor, $Xh_ToolBar) Return $Xh_ToolBar EndFunc ;==>XSkinToolBarCreate Func XSkinToolBarButton($iNumber, $iDLL = "shell32.dll") Local $Xhadd, $TBBleft $TBcnt = $TBcnt + 1 $TBBleft = $TBcnt * 24 $Xhadd = GUICtrlCreateButton("", $TBBleft, 1, 24, 24, $BS_ICON) GUICtrlSetImage($Xhadd, $iDLL, $iNumber, 0) Return $Xhadd EndFunc ;==>XSkinToolBarButton Func XSkinToolBarSeparator() Local $TBBleft $TBcnt = $TBcnt + .5 $TBBleft = $TBcnt * 24 GUICtrlCreateLabel("", $TBBleft + 17, 2, 2, 22, $SS_ETCHEDVERT, $GUI_WS_EX_PARENTDRAG) EndFunc ;==>XSkinToolBarSeparator8) Edited August 30, 2008 by Valuater Link to comment Share on other sites More sharing options...
Zedna Posted February 13, 2007 Share Posted February 13, 2007 (edited) VERY nice and simple!! Thanks for sharing Valuater. Edited February 13, 2007 by Zedna Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
Ed_Maximized Posted February 13, 2007 Share Posted February 13, 2007 Cool!!! I'll use it!!! ShapedGUI Creator : Shaped gui the easy way!!!Txt2au3 : the easy way to include text files into your program without fileinstall_GUICreateWithTiledBackground : Put a GIF in the background of your formsSQLite Database BrowserAnimated GIF UDF : Put animations in your GUI's Link to comment Share on other sites More sharing options...
jaenster Posted February 16, 2007 Share Posted February 16, 2007 usefull -jaenster Link to comment Share on other sites More sharing options...
Hello Me You Posted February 16, 2007 Share Posted February 16, 2007 thanks a lot man Random Link to comment Share on other sites More sharing options...
Dolemite50 Posted February 20, 2007 Share Posted February 20, 2007 This works like a champ. Quick question though, I tried to apply my caveman logic to this app and swapped the w/x with the h/y for a vertical bar. It seemed to work fine but choked on the seperator. I thought I could get away with switching the $SS_ETCHEDVERT for $SS_ETCHEDHORIZ but it still collapsed on drawing the divider. I probably just messed up on the measuring variables somewhere, unless you can think of something that would prevent it from working? Thanks again. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 20, 2007 Moderators Share Posted February 20, 2007 This works like a champ. Quick question though, I tried to apply my caveman logic to this app and swapped the w/x with the h/y for a vertical bar. It seemed to work fine but choked on the seperator. I thought I could get away with switching the $SS_ETCHEDVERT for $SS_ETCHEDHORIZ but it still collapsed on drawing the divider. I probably just messed up on the measuring variables somewhere, unless you can think of something that would prevent it from working? Thanks again.Do you have a simple example reproducing the error so those that wish to help don't have to go too far out of their way to recreate the issue your having? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
dabus Posted February 27, 2007 Share Posted February 27, 2007 Yeah, this one is really cool. You can save a lot of space. I already think of a toolbar that can be (un) docked... Btw.: Great work as always... Link to comment Share on other sites More sharing options...
XxXFaNtA Posted February 27, 2007 Share Posted February 27, 2007 It would be sweet if it would be possible to make a dock like rocketdock /[center][/center] Link to comment Share on other sites More sharing options...
ScriptUSER Posted March 1, 2007 Share Posted March 1, 2007 What about a frame around the floating Toolbar ? Link to comment Share on other sites More sharing options...
GEOSoft Posted March 1, 2007 Share Posted March 1, 2007 Good work AGAIN. I'll be using it. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Slashgti Posted April 3, 2007 Share Posted April 3, 2007 Thanks a lot!! I am new to the forum and I can say that there are awesome things here!! I am trying to make a toolbar and this post is really helpfull Thanks a lot again Link to comment Share on other sites More sharing options...
Valuater Posted April 5, 2007 Author Share Posted April 5, 2007 Thanks Guys!!! 8) Link to comment Share on other sites More sharing options...
GEOSoft Posted April 5, 2007 Share Posted April 5, 2007 I've tried the Dll example and it works great and no I'm not surprised. Before I start experimenting I may as well just ask now. Am I correct in assuing that the Dll example will also be valid for an icl file by changing shell32.dll to the icl path/file or would I have to use one of the other examples? George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Valuater Posted April 5, 2007 Author Share Posted April 5, 2007 I've tried the Dll example and it works great and no I'm not surprised.Before I start experimenting I may as well just ask now.Am I correct in assuing that the Dll example will also be valid for an icl file by changing shell32.dll to the icl path/file or would I have to use one of the other examples?With a simple Test... you will see( but please let me know too... lol )8) Link to comment Share on other sites More sharing options...
Bert Posted July 31, 2008 Share Posted July 31, 2008 script updated: CODE#include <GUIConstantsEX.au3> #include <windowsconstants.au3> #include <buttonconstants.au3> #include <StaticConstants.au3> ;Opt("MustDeclareVars", 1) ; ver 1.0.0 ; $h_ToolBar = XSkinToolBarCreate($Xh_Gui, $tool_left, $tool_top, $tool_width, $tool_bkcolor = "") ; XSkinToolBarButton($iNumber, $iDLL = "shell32.dll") ; XSkinToolBarSeparator() Global $TBcnt = -1 ; ************************ YOUR CODE GOES BELOW HERE ***************************** $h_ToolBar = XSkinToolBarCreate("Float-ToolBar", 200, 200, 324) $TButton1 = XSkinToolBarButton( "", @WindowsDir & "\notepad.exe") ; #1 - Using Icons from a dll ( shell32.dll is default) XSkinToolBarButton(21) XSkinToolBarButton(17) XSkinToolBarButton(44) XSkinToolBarSeparator() GUICtrlSetTip( -1, "Drag Me") ; #2 - Using Icons from an exe file XSkinToolBarButton(22) XSkinToolBarButton("", @ProgramFilesDir & "\Internet Explorer\iexplore.exe") XSkinToolBarButton( "", @WindowsDir & "\explorer.exe") XSkinToolBarButton( "", @SystemDir & "\calc.exe") XSkinToolBarSeparator() GUICtrlSetTip( -1, "Drag Me") ; #3 - Using Icons from an ico file XSkinToolBarButton("", @ScriptDir & "\Skins\Default-ToolBar\Admin Tools.ico") XSkinToolBarButton("", @ScriptDir & "\Skins\Default-ToolBar\Control Panel.ico") XSkinToolBarButton("", @ScriptDir & "\Skins\Default-ToolBar\E-Mail.ico") ; Exit Button XSkinToolBarSeparator() GUICtrlSetTip( -1, "Drag Me") $TButtonLast = XSkinToolBarButton(27) GUISetState(@SW_SHOW, $h_ToolBar) WinSetOnTop($h_ToolBar, "", 1) While 1 $msg = GUIGetMsg() if $msg = $TButton1 Then Run('notepad.exe') if $msg = $TButtonLast Then Exit WEnd ; ************************ YOUR CODE ENDS HERE ***************************** Func XSkinToolBarCreate($XTitle, $tool_left, $tool_top, $tool_width, $tool_bkcolor = "") Local $Xh_ToolBar $Xh_ToolBar = GUICreate($XTitle, $tool_width, 24, $tool_left, $tool_top, $WS_POPUP, $WS_CLIPCHILDREN);-1, $WS_EX_STATICEDGE);, $Xh_Gui) If $tool_bkcolor <> "" Then GUISetBkColor($tool_bkcolor, $Xh_ToolBar) Return $Xh_ToolBar EndFunc ;==>XSkinToolBarCreate Func XSkinToolBarButton($iNumber, $iDLL = "shell32.dll") Local $Xhadd, $TBBleft $TBcnt = $TBcnt + 1 $TBBleft = $TBcnt * 24 $Xhadd = GUICtrlCreateButton("", $TBBleft, 1, 24, 24, $BS_ICON) GUICtrlSetImage($Xhadd, $iDLL, $iNumber, 0) Return $Xhadd EndFunc ;==>XSkinToolBarButton Func XSkinToolBarSeparator() Local $TBBleft $TBcnt = $TBcnt + .5 $TBBleft = $TBcnt * 24 GUICtrlCreateLabel("", $TBBleft + 17, 2, 2, 22, $SS_ETCHEDVERT, $GUI_WS_EX_PARENTDRAG) EndFunc ;==>XSkinToolBarSeparator The Vollatran project  My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
smartee Posted July 31, 2008 Share Posted July 31, 2008 great work...some transparency will be nice though Link to comment Share on other sites More sharing options...
Valuater Posted August 30, 2008 Author Share Posted August 30, 2008 script updated:CODE...Thanks Volly....I used your update for ver 1.2.08) Link to comment Share on other sites More sharing options...
peppercorngiant Posted September 1, 2008 Share Posted September 1, 2008 Wow man, this is a great example! Thanks for sharing(cant believe i missed this one when you posted it!) [font="Lucida Console"]The truth is out there[/font] Link to comment Share on other sites More sharing options...
TehWhale Posted October 11, 2008 Share Posted October 11, 2008 I remember this was the first script I ever looked at from Example forums. It really is good, and it helped me learn 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