Mat Posted June 24, 2009 Posted June 24, 2009 (edited) kk, this is called a big workaround.I was trying to find a way that some programs have a different taskbar text to their title, and I came up with this. I then expanded it to include some useful functions that people ask for quite often like hiding the taskbar. And thats actually just 2 lines of code... It helps when you consider the taskbar to be a window like any other.No examples just yet, i'm still trying to get some parts to work, on the the whole though, its complete. the project gradually slowed to a halt last tuesday, so I thought I should just release it in the hope it might still be of use to/could be extended by someone else. There is a basic example a few posts below: ←.Stuff to do: * Sort out the sync events. Its not perfect yet, and only handles some events. ("Move" is working now! It was returning RunDefMsg) * Find a way to inforce aspects of $WS_EX_TOOLWINDOW on the parent without affecting the graphics.22 functions... * _TaskBarItemCreate * _TaskBarItemSetUpSync * _TaskBarItemRemoveSync * _TaskBarItemDestroy * _TaskBarItemSetState * _TaskBarItemSetStyle * _TaskBarItemGetStyle * _TaskBarItemGetState * _TaskBarItemSetText * _TaskBarItemGetText * _TaskBarItemSetIcon * _TaskBarItemSwitch * _TaskBarGetHandle * _TaskBarGetPos * _TaskBarGetSide * _TaskBarSetState * _TaskBarGetState * _TaskBarSetTrans * _TaskBarSetStartState * _TaskBarGetStartState * _TaskBarSetClockState * _TaskBarGetClockStateDownloadUpdated 24/01/11Mat Edited January 25, 2011 by Mat AutoIt Project Listing
Mat Posted June 25, 2009 Author Posted June 25, 2009 2 new functions, to do with the startmenu... I can't find a way to automize the "all programs" bar, according to winfo, its a window with class "basebar", which doesn't like being controlled by me... anyway: * _TaskBarSetStartMenuState * _TaskBarGetStartMenuState No one interested? no? ah well. MDiesel AutoIt Project Listing
Thornhunt Posted June 25, 2009 Posted June 25, 2009 2 new functions, to do with the startmenu... I can't find a way to automize the "all programs" bar, according to winfo, its a window with class "basebar", which doesn't like being controlled by me...anyway:* _TaskBarSetStartMenuState* _TaskBarGetStartMenuStateNo one interested? no? ah well.MDieselim interested ANDthis is Alot of help thankyou if i find out anything in my medeling. i will let you know Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D
Mat Posted June 26, 2009 Author Posted June 26, 2009 Thanks Thornhunt, it was you who got me to write the second half of these functions in the first place! Still no success automating the "basebar", It doesn't like me. I fiund out I'm not the first to automate the taskbar in this way, gafrost did... But that was a long time ago, and uses a lot of winapi.au3, whereas mines only include is SendMessage.au3. MDiesel AutoIt Project Listing
amokoura Posted July 19, 2009 Posted July 19, 2009 (edited) A very nice function collection, thank you! I had to calculate the full desktop area minus taskbar's dimensions. Therefore I needed _TaskBarGetSide() and _TaskBarGetPos(). Feature request: A function to tell whether Autohide is on or off. Maybe the info is found from registry somehow. Edited July 19, 2009 by amokoura
Yashied Posted July 19, 2009 Posted July 19, 2009 Could you give some examples? My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
Mat Posted July 19, 2009 Author Posted July 19, 2009 Basic example... #include<_taskbar.au3> $hMainUI = GUICreate ("Main Window", 300, 300, -1, -1, -1, 0x00000080) GUISetIcon (-1, "Shell32.dll", 36) GUISetState (@SW_SHOW, $hMainUI) $hTaskItem = _TaskBarItemCreate ("Taskbar Item text!", "shell32.dll", 14) _TaskBarItemSetState ($TASKSTATE_SHOW, -1) _TaskBarItemSetupSync ($hMainUI, $hTaskItem) While GUIGetMsg () <> -3 WEnd I'll make a full list soon MDiesel AutoIt Project Listing
Yashied Posted July 19, 2009 Posted July 19, 2009 Basic example... #include<_taskbar.au3> $hMainUI = GUICreate ("Main Window", 300, 300, -1, -1, -1, 0x00000080) GUISetIcon (-1, "Shell32.dll", 36) GUISetState (@SW_SHOW, $hMainUI) $hTaskItem = _TaskBarItemCreate ("Taskbar Item text!", "shell32.dll", 14) _TaskBarItemSetState ($TASKSTATE_SHOW, -1) _TaskBarItemSetupSync ($hMainUI, $hTaskItem) While GUIGetMsg () <> -3 WEnd I'll make a full list soon MDiesel This does not work!!! My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
Mat Posted July 19, 2009 Author Posted July 19, 2009 Are you using the latest version of the udf? I made some changes and didn't post them. Re download it and then see... cus its working here! and there is no reason I can see for it not working... the internals are all very basic. MDiesel AutoIt Project Listing
Yashied Posted July 19, 2009 Posted July 19, 2009 Are you using the latest version of the udf? I made some changes and didn't post them.Re download it and then see... cus its working here! and there is no reason I can see for it not working... the internals are all very basic.MDieselC:\Documents and Settings\Jack\Desktop\_taskbar.au3 (95) : ==> Unknown function name.:_TaskBarItemSetOptions ($nStyle, $hRet)^ ERROR My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
dantay9 Posted July 20, 2009 Posted July 20, 2009 This is very useful. Thanks. Keep up the great work.
Mat Posted July 20, 2009 Author Posted July 20, 2009 (edited) Thanks dantay!C:\Documents and Settings\Jack\Desktop\_taskbar.au3 (95) : ==> Unknown function name.:_TaskBarItemSetOptions ($nStyle, $hRet)^ ERRORhmm... Did I upload the wrong one then? Give me a sec, the link might be wrong. Becouse Iremember changing that.MDieselEdit: Try re downloading, I need to speak to manadar, as I know I uploaded it, and my log file says I uploaded it a few times recently, about a month ago:25\06\2009 _TaskBar.au3 - Out of date.24\06\2009 _TaskBar.au3 - Out of date.and yesterday, 4 times! It might be the script I wrote, but I doubt it... or I uploaded the wrong thing. I have just manually uploaded it, and it seems to be fine (checked the file, no _TaskbarItemSetOptions in there!), What happened was... is I named it that becouse it essentially controls the conrtext menu for the item, so options seemed appropriate, but thats going to expand when I llok at custom context menus. Edited July 20, 2009 by mdiesel AutoIt Project Listing
guinness Posted January 25, 2011 Posted January 25, 2011 Just had a little play around with this as it looked interesting there are some errors with Functions missing & Variables but its a case of simply renaming. This is to Fix the problem with "Get The Taskbar Side", as currently it is Returning the wrong side. ConsoleWrite(_Taskbar_GetSide() & @CRLF) ConsoleWrite(_Taskbar_GetSideEx() & @CRLF) Func _Taskbar_GetSide() Local $tg_WinGetPos = WinGetPos("[CLASS:Shell_TrayWnd]") If Not IsArray($tg_WinGetPos) Then Return SetError(1, 1, "None") If $tg_WinGetPos[1] > 0 Then Return "Bottom" ElseIf $tg_WinGetPos[0] > 0 Then Return "Right" ElseIf $tg_WinGetPos[2] = @DesktopWidth Then Return "Top" ElseIf $tg_WinGetPos[3] = @DesktopHeight Then Return "Left" EndIf EndFunc ;==>_Taskbar_GetSide Func _Taskbar_GetSideEx() Local $tg_WinGetPos = WinGetPos("[CLASS:Shell_TrayWnd]") If Not IsArray($tg_WinGetPos) Then Return SetError(1, 1, "None") If $tg_WinGetPos[1] > 0 Then If $tg_WinGetPos[0] > 0 Then Return "Right" Return "Bottom" EndIf If $tg_WinGetPos[2] = @DesktopWidth Then Return "Top" Return "Left" EndFunc ;==>_Taskbar_GetSideEx UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
Mat Posted January 25, 2011 Author Posted January 25, 2011 I haven't looked at this for a while, but thanks I'll take your word for it that you're right, but I don't think I'll be able to edit the files (they're not on my google code page), so I'll have to edit the top post. I'll have to see what's going on as it worked for me (and still does in some programs I use it in). Geez, I don't even recognise the code as being mine at all. Mat AutoIt Project Listing
guinness Posted January 25, 2011 Posted January 25, 2011 I found it on Google Code >>http://code.google.com/p/m-a-t/downloads/detail?name=Taskbar.zip&can=2&q= And that code is kind of mine with the silly Variable prefix of $tg_ UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
Mat Posted January 25, 2011 Author Posted January 25, 2011 I found it on Google Code >>http://code.google.com/p/m-a-t/downloads/detail?name=Taskbar.zip&can=2&q= And that code is kind of mine with the silly Variable prefix of $tg_ Hmmm... Funny I didn't link it at the top of this thread... When I said I didn't recognize my code I wasn't referring to what you'd written at all, but the example earlier in the thread This is how I have the code in other projects: Func _TaskBarGetSide() Local $aPos = _TaskBarGetPos() If $aPos[0] < 10 Then If $aPos[1] < 10 Then If $aPos[2] > 400 Then Return "Top" Return "Left" EndIf Return "Bottom" EndIf Return "Right" EndFunc ;==>_TaskBarGetSide I will update the first post now Thanks again. AutoIt Project Listing
wakillon Posted January 25, 2011 Posted January 25, 2011 (edited) I will update the first post now Thanks again. That crash at start... C:\Documents and Settings\Administrateur\Bureau\TaskBar.au3(697,37) : WARNING: $hTaskBarSyncTaskItem: possibly used before declaration. If $hWnd = $hTaskBarSyncTaskItem Then ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrateur\Bureau\TaskBar.au3(698,36) : WARNING: $hTaskbarSyncItem: possibly used before declaration. _SendMessage($hTaskbarSyncItem, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrateur\Bureau\TaskBar.au3(122,43) : WARNING: $hTaskBarSyncTaskItem: declared global in function only. Prefer top of file. Global $hTaskBarSyncTaskItem = $hTaskItem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrateur\Bureau\TaskBar.au3(89,82) : ERROR: __TaskbarPrintDebug(): undefined function. If $bTaskBarDebug Then __TaskbarPrintDebug("_TaskBarItemCreate (" & $sText & ")") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrateur\Bureau\TaskBar.au3(95,39) : ERROR: _TaskBarItemSetOptions(): undefined function. _TaskBarItemSetOptions($nStyle, $hRet) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrateur\Bureau\TaskBar.au3 - 2 error(s), 3 warning(s) Edited January 25, 2011 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
Bluesmaster Posted December 1, 2013 Posted December 1, 2013 Hello, great work! Is it possible with that udf to create a custom toolbar in the taskbar? Something like this: http://stackoverflow.com/questions/8646510/how-to-make-my-deskbands-taskbar-toolbar-form-transparent and if not what to do to make it possible? best regards Bluesmaster My UDF: [topic='156155']_shellExecuteHidden[/topic]
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