Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/16/2020 in all areas

  1. WilliamasKumeliukas, In future, please leave the question and also tell everyone else how you solved it! M23
    1 point
  2. For now, perform the login manually and change the _IECreate to _IEAttach.
    1 point
  3. TheDcoder

    AutoIt Snippets

    And I'd like to mention that it is probably because AutoIt has a lot of overhead in string processing and the interpreter itself is a bit slow. Compare that to an optimized RegEx engine written in C(++) and it is clear why it is faster, despite being logically a more complex operation Speed isn't everything, and AutoIt isn't that fast really, so unless you are processing many strings in bulk, it is okay to use whatever you prefer, it won't make a significant difference in operation.
    1 point
  4. Not sure if this has been corrected or not but I downloaded the most recent version (2.1.16 BETA), there is a bug in __ADO_MSSQL_CONNECTION_STRING_WinAuth and caused me a huge headache as I was getting provider not found errors when I knew the provider was installed fine. The curly brackets are not needed around the PROVIDER= $sConnectionString = "PROVIDER={" & _ADO_MSSQL_GetProviderVersion() & "};SERVER=" & $sServer & ";DATABASE=" & $sDataBase & ";" should be $sConnectionString = "PROVIDER=" & _ADO_MSSQL_GetProviderVersion() & ";SERVER=" & $sServer & ";DATABASE=" & $sDataBase & ";" I also added Integrated Security=SSPI; to this line... $sConnectionString &= "Trusted_Connection=True;Integrated Security=SSPI;"
    1 point
  5. Tstudent, This code will right-click on an icon in the systray (notification area) if you add a part of the tooltip text for the specific app: #Include <GuiToolBar.au3> Global $hSysTray_Handle, $iSystray_ButtonNumber Global $sToolTipTitle = "" ; <<<<<<<<<<<<<<<< Enter some tooltip text for the icon you want here $iSystray_ButtonNumber = Get_Systray_Index($sToolTipTitle) If $iSystray_ButtonNumber = 0 Then MsgBox(16, "Error", "Icon not found in system tray") Exit Else Sleep(500) _GUICtrlToolbar_ClickButton($hSysTray_Handle, $iSystray_ButtonNumber, "right") EndIf Exit ;............ Func Get_Systray_Index($sToolTipTitle) ; Find systray handle $hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]') If @error Then MsgBox(16, "Error", "System tray not found") Exit EndIf ; 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 ; Look for wanted tooltip For $iSystray_ButtonNumber = 0 To $iSystray_ButCount - 1 If StringInStr(_GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSystray_ButtonNumber), $sToolTipTitle) > 0 Then ExitLoop Next If $iSystray_ButtonNumber = $iSystray_ButCount Then Return 0 ; Not found Else Return $iSystray_ButtonNumber ; Found EndIf EndFunc It should not be too hard to adapt for your needs. I hope it helps. M23
    1 point
  6. 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
    0 points
×
×
  • Create New...