MvGulik Posted October 16, 2014 Posted October 16, 2014 (edited) Output from Au3Info on the application-buttons in my taskbar. >>>> ToolsBar <<<< 1: 2 Google Chrome 2: 3 AutoIt Forums - Google Chrome 3: 8 AutoIt3Help viewer 4: 9 AutoIt Help 5: 4 SciTE - a Scintilla based Text Editor 6: 5 ***an8_taskbar_titlelookup.au3 - SciT 7: 7 Anim8or 8: 11 Object: object01 9: 1 Winamp 10: 10 1. Frostbyte - The Spirit Stirs (Original mix) (Chillout Dreams - DIGITALLY IMP (Order: Task name followed by the task-text/tip for that task.) (Seeing "N:" as first number column here.) Using the following code-parts I can retrieve the task-name and the task-text data. (Win-Xp) $hTaskbar = ControlGetHandle('[CLASS:Shell_TrayWnd]', '', '[CLASS:ToolbarWindow32;INSTANCE:3]') ;; Win-XP! $iTaskCount = _GUICtrlToolbar_ButtonCount($hTaskbar) $sTask = _GUICtrlToolbar_GetButtonText($hTaskbar, $i) $sText = _GUICtrlToolbar_GetButtonText($hTaskbar, $i+1) But, the retrieved data in this case is ordered according to the second number column in the Au3Info data. (rendering it kinda unusable as a task and it text are not guaranteed to be grouped together.) I figure there must be some additional/other way/data that Au3Info is using to link the right task with its related text. But how ... ??? (Its probably something simple, but I'm not seeing it.) *spelling* Edited October 16, 2014 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ...
Solution MvGulik Posted October 16, 2014 Author Solution Posted October 16, 2014 (edited) Mmm, Think I found a/the solution.(After just trying out some of the GUICtrlToolbar functions, and seeing what I got returned.) _GUICtrlToolbar_IndexToCommand()...Yep, that did it. ... Local $hTaskbar = ControlGetHandle('[CLASS:Shell_TrayWnd]', '', '[CLASS:ToolbarWindow32;INSTANCE:3]') ;; Win-XP! Local $iTaskCount = _GUICtrlToolbar_ButtonCount($hTaskbar) Local $iC, $sTask, $sText_out = '' For $i = 0 to $iTaskCount-2 step 2 $iC = _GUICtrlToolbar_IndexToCommand($hTaskbar, $i) $sTask = _GUICtrlToolbar_GetButtonText($hTaskbar, $iC) If $sTask == $sName_in Then ;; note: case sensitive string compare. $iC = _GUICtrlToolbar_IndexToCommand($hTaskbar, $i+1) $sText_out = _GUICtrlToolbar_GetButtonText($hTaskbar, $iC) ExitLoop EndIf Next ... Edited October 16, 2014 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ...
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