Jump to content

Recommended Posts

Posted (edited)

Hello, I'm trying to capture script debug line but I only capture first line, how can I capture 2nd line?

AutoItSetOption("TrayIconDebug", 1)
#include <Array.au3>
#Include <GuiToolBar.au3>

HotKeySet("{NUMPAD0}", "QUIT")
; Get handle to system tray
;[Class:ToolbarWindow32;Instance:4] = icon visible in taskbar
;[Class:ToolbarWindow32;Instance:2] = icon in window upon clicking arrow

Get_SysTray_IconText()

Func Get_SysTray_IconText()

    ; Find systray handle
    Global $hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:4]')
    If @error Then
        MsgBox(16, "Error", "System tray not found")
        Exit
    EndIf
;~ Global $wSysTray_Handle = WinGetHandle('[Class:Shell_TrayWnd]')

    ; Get systray item count
    Local $iSysTray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle)
    If $iSysTray_ButCount = 0 Then
        MsgBox(16, "Error", "No items found in system tray")
        Exit
    EndIf
    Local $aSysTray_ButtonText[$iSysTray_ButCount]

    ; Look for wanted tooltip
    For $iSysTray_ButtonNumber = 0 To $iSysTray_ButCount - 1
    $aSysTray_ButtonText[$iSysTray_ButtonNumber] = _GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSysTray_ButtonNumber)
        c($aSysTray_ButtonText[$iSysTray_ButtonNumber])
    Next
    _ArrayDisplay($aSysTray_ButtonText, "SysTray Icon Text", Default, 8)

EndFunc

Func c($msg)
ConsoleWrite( $msg & @CRLF)
EndFunc

Func QUIT()
Exit
EndFunc

 

*Solved*

The code is correct, I just had to make it loop to "re-capture" text instead of using _ArrayDisplay...

 

Best Regards,

~WilliamasKumeliukas

Edited by WilliamasKumeliukas
Bringing back what I had removed

Sorry if it's quite challenging to understand me sometimes, there is 2 possible reasons to this:

Spoiler

#1. I am a native French speaker and learned English mainly from chatting with others players in online games.

#2. I have a developmental disorder mainly affecting my social abilities, way of thinking, understanding stuffs and explaining myself in which it can seem ironic of seeing me here, but I been working on getting better every days for an dozens of years now ^_^

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Do not like my dirty code? It's fine, but in my opinion, the dirty codes are unique and I believe it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

  • Moderators
Posted

WilliamasKumeliukas,

In future, please leave the question and also tell everyone else how you solved it!

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted
30 minutes ago, Melba23 said:

WilliamasKumeliukas,

In future, please leave the question and also tell everyone else how you solved it!

M23

@Melba23, I'm sorry for that, I've changed my first post and Title back to its original text and added the solution.

my reason for changing title and first post was because I was ashamed of me, sometimes I just can't handle my stupidity especially if others can see it, because I overthink about it.

I shouldn't be that harsh to myself...   Next time i'll try better to assume it and respect the rule.

regards,

~WilliamasKumeliukas

Sorry if it's quite challenging to understand me sometimes, there is 2 possible reasons to this:

Spoiler

#1. I am a native French speaker and learned English mainly from chatting with others players in online games.

#2. I have a developmental disorder mainly affecting my social abilities, way of thinking, understanding stuffs and explaining myself in which it can seem ironic of seeing me here, but I been working on getting better every days for an dozens of years now ^_^

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Do not like my dirty code? It's fine, but in my opinion, the dirty codes are unique and I believe it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...