Jump to content

Search the Community

Showing results for tags 'tooltip'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 17 results

  1. Hi, I am still really new with AutoIT. We are using it to automate logging into web sites and I have encountered problems with focus. The target web page is configured to put the cursor into the first text field (username) when the page is loaded, and when I run the AutoIT script, which does the log in seems like it is just not starting where I expect it to be. I have been kind of using ToolTip() to kind of help with debugging, but now I am wondering if the calls to ToolTip() are causing the focus to be messed up. For example, at least visually, when the ToolTip() is called, I can see the cursor disappear from the web page text field and they when I do anything that is supposed to send keystrokes, they are going off somwhere else ("never-neverland"). But when I remove some of the ToolTip() calls, it works correctly. So the questions I have are: 1) Do the ToolTip() calls interfere with/change where the focus on the target page are? 2) In general, what are the "rules" for where ToolTip can be used "safely" (== doesn't interfere with focus)? Thanks, Jim
  2. So I had this Idea of creating a tooltip which shows me my ping. That itself was made quickly and I thought too add a couple features. I want the tooltip background to be a different color depending on the ping. (good ping is green, medium ping is yellow,...) So how do I color in a tooltip? google brought me to this: where in the comments I found this: $s = "LOW" ToolTip($s, 0, 0, "Battery Information");, $icon) $H_TOOLTIP1 = WinGetHandle($s) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $H_TOOLTIP1, "wstr", "", "wstr", "") DllCall("user32.dll", "int", "SendMessage", "hwnd", $H_TOOLTIP1, "int", 1043, "int", 2552550, "int", 0) Sleep(1000) Which I then used in my code with different color codes... Trial and Error brought me these that I wanted to use: The Problem is if I loop through my code it only sets the color for the 1st loop and then sticks to it. The real problem is tho that I don't exactly understand the dllcalls... And I guess that's why it isn't working So if someone would be so awesome to explain to me how they work, or at least can give me a list of these parameters then I would really appreciate that and learn something new Obviously a solution to my problem is awesome aswell ^^ I run this under Windows 8.1 There is my code in a paste. https://pastebin.com/q525f7mS
  3. Hi, i want to display a tooltip when i hover over the listview group. It sounds not difficult but i couldn't find a solution and i searched for autoit as well as for c# :/ So i came up with a not so pretty solution: #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <GuiToolTip.au3> #include <WinAPI.au3> Global $idListview, $hWndListView Global $hToolTip = _GUIToolTip_Create(0, BitOR($_TT_ghTTDefaultStyle, $TTS_BALLOON)); balloon style tooltip Global Const $LVN_GROUPINFO = ($LVN_FIRST - 88) Global Const $tagNMLVGROUP = $tagNMHDR & ";int iGroupId;uint iNewState;uint iOldState" ; $LVGS_flags $LVGS_flags Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $tInfo, $tNMHDR = DllStructCreate($tagNMHDR, $lParam), $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) Local $iIDFrom = DllStructGetData($tNMHDR, "IDFrom"), $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode ; Case $of?????? ; A Group was clicked <---- I need help with this Case $LVN_GROUPINFO ConsoleWrite("hier" & @CRLF) $tInfo = DllStructCreate($tagNMLVGROUP, $lParam) _DebugPrint("$LVN_GROUPINFO" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->GroupId:" & @TAB & DllStructGetData($tInfo, "iGroupId") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "iNewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "iOldState")) Case $LVN_COLUMNCLICK ; A column was clicked $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam) _DebugPrint("$LVN_COLUMNCLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ; No return value Case $NM_CLICK ; Sent by a list-view control when the user clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) _DebugPrint("$NM_CLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func _DebugPrint($s_Text, $sLine = @ScriptLineNumber) ConsoleWrite( _ "!===========================================================" & @CRLF & _ "+======================================================" & @CRLF & _ "-->Line(" & StringFormat("%04d", $sLine) & "):" & @TAB & $s_Text & @CRLF & _ "+======================================================" & @CRLF) EndFunc ;==>_DebugPrint If Not StringInStr($CmdLineRaw, "/ErrorStdOut") Then Exit MsgBox($MB_TOPMOST, @ScriptName, 'please run from the editor, thanks', 10) Example() Func Example() Local $aInfo, $hImage, $idListview $ghui = GUICreate("ListView Group COLLAPSIBLE", 400, 300) $idListview = GUICtrlCreateListView("", 30, 20, 354, 218);, BitOR($LVS_SHOWSELALWAYS, $LVS_SINGLESEL, $LVS_REPORT, $WS_CLIPSIBLINGS)) $hWndListView = GUICtrlGetHandle($idListview) ; Load images $hImage = _GUIImageList_Create() _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0xFF0000, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x00FF00, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x0000FF, 16, 16)) _GUICtrlListView_SetImageList($idListview, $hImage, 1) ; Add columns _GUICtrlListView_AddColumn($idListview, "Column 1", 100) _GUICtrlListView_AddColumn($idListview, "Column 2", 100) _GUICtrlListView_AddColumn($idListview, "Column 3", 100) ; Add items _GUICtrlListView_AddItem($idListview, "Row 1: Col 1", 0) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 2", 1) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 3", 2) _GUICtrlListView_AddItem($idListview, "Row 2: Col 1", 1) _GUICtrlListView_AddSubItem($idListview, 1, "Row 2: Col 2", 1) _GUICtrlListView_AddItem($idListview, "Row 3: Col 1", 2) ; Build groups _GUICtrlListView_EnableGroupView($idListview) _GUICtrlListView_InsertGroup($idListview, -1, 1, "Group 1", 1) ;~ _GUICtrlListView_SetGroupInfo($idListview, 1, "Group 1", 0, $LVGS_COLLAPSIBLE + $LVGS_COLLAPSED) ; <--- _GUICtrlListView_InsertGroup($idListview, -1, 2, "Group 2") ;~ _GUICtrlListView_SetGroupInfo($idListview, 2, "Group 2", 0, $LVGS_COLLAPSIBLE + $LVGS_COLLAPSED) ; <--- _GUICtrlListView_SetItemGroupID($idListview, 0, 1) _GUICtrlListView_SetItemGroupID($idListview, 1, 2) _GUICtrlListView_SetItemGroupID($idListview, 2, 2) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") Local $apos = _GUICtrlListView_GetGroupRect($idListview, 2, $LVGGR_LABEL) Local $test = GUICtrlCreateLabel("a", 2, 2, 10, 17) Local $val = _WinAPI_GetWindowLong(GUICtrlGetHandle($test), $GWL_STYLE) Local $valex = _WinAPI_GetWindowLong(GUICtrlGetHandle($test), $GWL_EXSTYLE) Local $aha = _WinAPI_CreateWindowEx($valex+$WS_EX_LAYERED, "static", "blabla", $val, $apos[0], $apos[1], 50, 20, $hWndListView) _GUIToolTip_AddTool($hToolTip, $hWndListView, "This is a ToolTip3", $aha) GUISetState(@SW_SHOW) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Short description: I only created a label with CreateWindowEx which i can append to the listview control and layered it with the $WS_EX_Layered flag so it looks like it's transparent. Then i only added a tooltip tool to that created label. Hover over the Group 2 text and the Tooltip will be displayed. My question is: does someone know another perhaps much prettier solution? Thanks in advance
  4. I turned to Autoit from AHK just because it support WinForm Application so well. The problem often haunts me that all the application in my job is WinForm. And it indeed help my work so much. Great thanks in advance. However, I can't get the ToolTip text in the application of my company. Specifically´╝înow I want to get the information about some data, however the information is all displayed in the tooltip on the scatter diagram which is made of those data. Is there any advice ? Relative topics I have searched can't get any information about the winform tooltip...
  5. Hey, i can't find a solution, to set the direction of a tool tip. Bootstrap demo see "Bottom Tooltip", thats what i try to get. Can someone help? #include <GUIConstantsEx.au3> #include <GUIToolTip.au3> #include <GuiTab.au3> $hGUI = GUICreate("Built-In Tab Example", 500, 500) $hTab = GUICtrlCreateTab(10, 10, 480, 480) ; Create tabitems For $i = 0 To 2 GUICtrlCreateTabItem("Tab " & $i) $aha = GUICtrlCreateButton("Button " & $i, 20 + ($i * 100), 40 + ($i * 50), 80, 30) Next ; Close Tab definiton GUICtrlCreateTabItem("") ; #TOOL TIPS# ========================================================================================================================================================================= Global $hToolTip = _GUIToolTip_Create(GUICtrlGetHandle($hTab), BitOR($_TT_ghTTDefaultStyle, $TTS_BALLOON)); ) ; default style tooltip _GUICtrlTab_SetToolTips($hTab, $hToolTip) _GUIToolTip_SetMaxTipWidth($hToolTip, 100) ; this allows multiline tooltips _GUIToolTip_AddTool($hToolTip, 0, "Reset current View.", GUICtrlGetHandle($aha)) ; ===================================================================================================================================================================================== GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
  6. Hey all, Hopefully an easy question...if I have a listview with tooltips enabled and I move the mouse cursor off the listview, how can I clear the tooltip? In the reproducer below, the tooltip remains in almost every circumstance - even if I minimize the gui, the tooltip still overlays other windows. I'd like it to be cleared if I'm outside of the listview, ideally. Thanks. #include <GUIConstantsEx.au3> #include <GUIListView.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("ToolTip test", 250, 200) $idListView = GUICtrlCreateListView("Column 0|Column 1|Column 2", 10, 10, 235, 175, $WS_VISIBLE, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_INFOTIP)) For $i = 0 To 5 GUICtrlCreateListViewItem(StringFormat("Item %s|abc%s|def%s", $i, $i, $i), $idListView) Next GUISetState(@SW_SHOW, $hGUI) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func WM_NOTIFY($hWnd, $IMsg, $iwParam, $ilParam) #forceref $hWnd, $IMsg, $iwParam Local $hwndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo, $gText, $aPos $hWndListView = $idListView If Not IsHWnd($hWndListView) Then $hWndListView = GUICtrlGetHandle($hWndListView) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hwndFrom = HWnd(DllStructGetData($tNMHDR, "hwndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "idFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hwndFrom Case $hWndListView Switch $iCode Case $LVN_HOTTRACK; Sent by a list-view control When the user moves the mouse over an item $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) $iItem = DllStructGetData($tInfo, "Item") $iSubItem = DllStructGetData($tInfo, "SubItem") If Not ($iItem = -1 Or $iSubItem = -1) Then $sText = _GUICtrlListView_GetItemText($hwndFrom, $iItem, $iSubItem) ToolTip($sText) Else ToolTip("") EndIf Return 1; the item will not be selected. EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc
  7. Hi I have check tooltip function but, I can not find the way to change font size How to change tooitip font size?
  8. I'm trying to create a dynamic ToolTip that displays the text of the ListView item that the cursor is hovering over. I found examples on line that displayed a ToolTip whenever the cursor is over the ListView, but I cannot figure out how to get the text of the ListView item under the cursor. Test code: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIListView.au3> #include <GUIToolTip.au3> Opt('MustDeclareVars', 1) Global Const $LPSTR_TEXTCALLBACK = -1 Global $hMainWin, $iID_ListView, $iID_ListView_hHeader, $hToolTip _Main() Func _Main() createGUI() GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") While (1) Local $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect Sleep(125) WEnd EndFunc ;==>_Main Func WM_NOTIFY($hWnd, $IMsg, $iwParam, $ilParam) #forceref $hWnd, $IMsg, $iwParam Local $hwndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo, $gText, $aPos $hWndListView = $iID_ListView If Not IsHWnd($iID_ListView) Then $hWndListView = GUICtrlGetHandle($iID_ListView) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hwndFrom = HWnd(DllStructGetData($tNMHDR, "hwndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "idFrom") $iCode = DllStructGetData($tNMHDR, "Code") ; Get the rect of the Listview $aPos = _GUICtrl_GetMessagePos($iIDFrom) Switch $hwndFrom Case $hWndListView Switch $iCode Case $LVN_HOTTRACK; Sent by a list-view control When the user moves the mouse over an item $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) $gText = _GUICtrlListView_GetItemText($hwndFrom, DllStructGetData($tInfo, "Index"), 0) ToolTip($gText) ; Return 0; Allow the ListView to perform its normal track select processing. Return 1; the item will not be selected. ; No returnValue EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY ; e.g.: ; _GUIToolTip_AddToolMod($hToolTip, $hMainWin, $LPSTR_TEXTCALLBACK, _ ; $iID_ListView_hHeader, _ ; 0, 0, 0, 0, BitOR(1, 8), $iID_ListView_hHeader) Func _GUIToolTip_AddToolMod($hTool, $hWnd, $sText, $iID = 0, $iLeft = 0, $iTop = 0, $iRight = 0, $iBottom = 0, $iFlags = 8, $iParam = 0) Local $tToolInfo = DllStructCreate($tagTOOLINFO) Local $pToolInfo = DllStructGetPtr($tToolInfo) Local $iToolInfo = DllStructGetSize($tToolInfo) DllStructSetData($tToolInfo, "Size", $iToolInfo) DllStructSetData($tToolInfo, "Flags", _GUIToolTip_BitsToTTF($iFlags)) DllStructSetData($tToolInfo, "hWnd", $hWnd) DllStructSetData($tToolInfo, "ID", $iID) DllStructSetData($tToolInfo, "Left", $iLeft) DllStructSetData($tToolInfo, "Top", $iTop) DllStructSetData($tToolInfo, "Right", $iRight) DllStructSetData($tToolInfo, "Bottom", $iBottom) DllStructSetData($tToolInfo, "Param", $iParam) Local $iRet = 0 If IsString($sText) Then Local $iBuffer = StringLen($sText) + 1 Local $tBuffer = DllStructCreate("wchar Text[" & $iBuffer & "]") $iBuffer *= 2 Local $pBuffer = DllStructGetPtr($tBuffer) DllStructSetData($tBuffer, "Text", $sText) DllStructSetData($tToolInfo, "Text", $pBuffer) $iRet = _SendMessage($hTool, $TTM_ADDTOOLW, 0, $pToolInfo, 0, "wparam", "ptr") Else DllStructSetData($tToolInfo, "Text", $sText) $iRet = _SendMessage($hTool, $TTM_ADDTOOLW, 0, $pToolInfo, 0, "wparam", "ptr") EndIf Return $iRet <> 0 EndFunc ;==>_GUIToolTip_AddToolMod Func _GUICtrl_GetMessagePos($control) Local $p = DllCall("user32.dll", "DWORD", "GetMessagePos") Local $pt = DllStructCreate($tagPOINT) DllStructSetData($pt, "X", _WinAPI_LoWord($p[0])) DllStructSetData($pt, "Y", _WinAPI_HiWord($p[0])) _WinAPI_ScreenToClient(_GUICtrl_GetHandle($control), $pt) Local $result[2] = [DllStructGetData($pt, "X"), DllStructGetData($pt, "Y")] Return $result EndFunc ;==>_GUICtrl_GetMessagePos Func _GUICtrl_GetHandle($control) If IsHWnd($control) Then Return $control Return GUICtrlGetHandle($control) EndFunc ;==>_GUICtrl_GetHandle Func createGUI() Local $flags, $flagsEX, $w, $h, $str $w = 250 $h = 200 $flags = BitOR($WS_CAPTION, $WS_VISIBLE) $hMainWin = GUICreate("ToolTip test", 250, 200, -1, -1, $flags) $flags = $WS_VISIBLE $flagsEX = BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_INFOTIP) $iID_ListView = GUICtrlCreateListView("Column 0|Column 1|Column 2", 10, 10, $w - 15, $h - 25, $flags, $flagsEX) For $i = 0 To 5 $str = StringFormat("Item %s|abc%s|def%s", $i, $i, $i) GUICtrlCreateListViewItem($str, $iID_ListView) Next $iID_ListView_hHeader = _GUICtrlListView_GetHeader($iID_ListView) $hToolTip = _GUIToolTip_Create($hMainWin) _GUIToolTip_AddToolMod($hToolTip, $hMainWin, $LPSTR_TEXTCALLBACK, _ $iID_ListView_hHeader, 0, 0, 0, 0, BitOR(1, 8), $iID_ListView_hHeader) EndFunc ;==>createGUI
  9. #include <GuiTab.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> AutoItSetOption("GUIOnEventMode", 1) global $tabspace, $tabspace_opt, $old_tab, $tabs[3] = [2], $opt_tabs[6] = [5] global $width = 400, $height = 300, $x = -1, $y = -1 $ExampleGUI = GUICreate("example", $width, $height, $x, $y, BitOr($WS_CAPTION, $WS_SYSMENU, $WS_MINIMIZEBOX, $WS_SIZEBOX)) GUISetOnEvent($GUI_EVENT_CLOSE, "DoExit", $ExampleGUI) $opt_gui = GUICreate("opt_child", $width, $height-50, 3, 5, BitOR($WS_CHILD, $WS_TABSTOP), -1, $ExampleGUI) $tabspace_opt = GUICtrlCreateTab(3, 2, $width-20, $height-20, BitOr($TCS_BUTTONS, $TCS_FLATBUTTONS, $TCS_TOOLTIPS, $TCS_HOTTRACK, $WS_CHILD, $WS_TABSTOP)) $opt_tabs[1] = GUICtrlCreateTabItem(" Option 1 ") $opt_tabs[2] = GUICtrlCreateTabItem(" Option 2 ") $opt_tabs[3] = GUICtrlCreateTabItem(" Option 3 ") $opt_tabs[4] = GUICtrlCreateTabItem(" Option 4 ") $opt_tabs[5] = GUICtrlCreateTabItem(" Option 5 ") GUICtrlCreateTabItem("") GUISwitch($ExampleGUI) $tabspace = GUICtrlCreateTab(3, 2, $width, $height-5, BitOr($TCS_BOTTOM, $TCS_BUTTONS, $TCS_TOOLTIPS, $TCS_HOTTRACK, $WS_TABSTOP)) GUICtrlSetResizing(-1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM) $tabs[1] = GUICtrlCreateTabItem(" Main Tab.. ") $tabs[2] = GUICtrlCreateTabItem(" Options.. ") GUICtrlCreateTabItem("") GUICtrlSetTip($tabs[1], " Tip for the main tab.. ") GUICtrlSetTip($tabs[2], " Tip for the options tab.. ") GUICtrlSetTip($opt_tabs[1], " Tip for options tab 1.. ") GUICtrlSetTip($opt_tabs[2], " Tip for options tab 2.. ") GUICtrlSetTip($opt_tabs[3], " Tip for options tab 3.. ") GUICtrlSetTip($opt_tabs[4], " Tip for options tab 4.. ") GUICtrlSetTip($opt_tabs[5], " Tip for options tab 5.. ") GUISetState(@SW_SHOW, $ExampleGUI) while true local $new_tab = GUICtrlSendMsg($tabspace, $TCM_GETCURSEL, 0, 0) if $new_tab <> $old_tab then if $new_tab = 1 then GUISetState(@SW_SHOW, $opt_gui) else GUISetState(@SW_HIDE, $opt_gui) GUISetState(@SW_SHOW, $ExampleGUI) endif $old_tab = $new_tab endif Sleep(100) wend func DoExit() exit endfunc As you can see, the tooltip for the options tabs 1 & 2 appear when hovering your pointer over the main two tabs. Am I doing something wrong? Or is this a bug? ;o) Cor
  10. Hi everyone I have the following piece of code: Func ManualActions() Opt("GUIOnEventMode", 1) Global $ManualActionsGui = GUICreate("Automated Task List Suite", 460, 490, -1, -1) GUISetIcon ($Images & "\ManualActionsGUI.ico") GUISetBkColor(0xFFFFFF) GUICtrlCreatePic($Images & "\SAClogo.jpg", 110, 10, 240, 80) GUICtrlCreateLabel("---MANUAL ACTIONS---", 173, 100, 300, -1) GUICtrlSetFont(-1, 8.5, 700, 0) Local $ResetAll = GUICtrlCreateButton("Reset Everything", 10, 460, 97, 30) Local $SaveAndQuit = GUICtrlCreateButton ("Save and Quit", 355, 460, 97, 30) Local $Back = GUICtrlCreateButton ("Show Results", 180, 460, 97, 30) Local $iX = 10, $iY = 120 $aCheckboxes = _ReadINI() For $x = 0 To UBound($aCheckboxes) - 1 Local $idCheckBox = _CreateCheckbox($aCheckboxes[$x][0], $iX, $iY) If _Crypt_HashData($aCheckboxes[$x][0] & "|" & $sINIFile & "|" & $GUI_CHECKED, $CALG_MD5) = $aCheckboxes[$x][1] Then GUICtrlSetState(-1, BitOR($GUI_CHECKED, $GUI_DISABLE)) EndIf $aCheckboxes[$x][0] = $idCheckBox $iY += 20 Next GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit", $ManualActionsGui) GUICtrlSetOnEvent($ResetAll, "_ResetAll") GUICtrlSetOnEvent($SaveAndQuit, "_Exit") GUICtrlSetOnEvent ($Back, "_Back2Results") GUISetState() $iRunning = 1 While $iRunning Sleep(10) WEnd GUIDelete($ManualActionsGui) FileDelete($sINIFile) ManualActions() EndFunc Func _Back2Results() ShellExecute ($Results & "\Results.png") EndFunc Func _ResetAll() $iRunning = 0 EndFunc Func _Checked() If GUICtrlRead(@GUI_CtrlId) = 1 Then GUICtrlSetState(@GUI_CtrlId, $GUI_DISABLE) EndFunc Func _CreateCheckbox($sLabel, $iX, $iY) Local $idCheckBox = GUICtrlCreateCheckbox($sLabel, $iX, $iY, -1, -1) GUICtrlSetOnEvent(-1, "_Checked") Return $idCheckBox EndFunc Func _GenINIFile() Local $aCheckboxes[14] = ["Put a label with hostname on the computer?", "Check if AHCI is set in the BIOS?", "Add all applications in AD?", "Check the installed drivers?", "Customize all desktop icons?", _ "Restore User's data?", "Run CISCO ANYCONNECT VPN once?", "Update Firefox and Google Chrome?", "Restore user's Bookmarks?", "Deploy CrashPlanPro, remove new licence and send a mail to the Service Desk?", _ "Check if printers the User needs are present?", "Copy SAPlogin.ini from former Computer (if needed)?", "Encrypt the Disk with PGP?", "Update Remedy database?"] FileClose(FileOpen($sINIFile, 2)) For $x = 0 To UBound($aCheckboxes) - 1 IniWrite($sINIFile, "Checkbox_Labels", $x, $aCheckboxes[$x]) IniWrite($sINIFile, "Checkbox_States", $x, "") Next EndFunc*I have shorten the code by deleting some functions* As you can see, I'm generating checkboxes in an array but I want to improve things by adding tooltips to some of them when the user will hoover a "help" label added at the end of concerned control. If this can help, I uploaded an image adding what I imagine this could be at the end. I don't know how to handle that and I hope that some of you can give me a hand here and don't hesitate to ask if you need more Thanks!
  11. Hi, Here is an UDF to create, delete, set the icon and state, tooltip and tip for your notify icons. The main advantage is that you can handle mouse events as you want, there is no default events. You can create fully customised notifyicons/tooltips. Thanks to Holger Kotsch for his ModernMenu UDF. Note : Breaking changes ! Please use the 1.2+ version. Functions : Attachments : Example + UDF : AutoIt v3.3.10.0+ NotifyIcon_1.2.zip TrayIconEx_1.1.zip AutoIt v3.3.8.0+ TrayIconEx.zip & Requirements : >WinAPIEx UDF. As usual, enjoy !
  12. Hello guys! I've got a simple question: - Is it possible to display a ToolTip on ListBox Item? - I want to display it when an Item is too long for the ListBox width, and a part of it is hidden (Just like a ListView does, but for a ListBox) Thanks!
  13. Greetings, with the below code the Tooltip does not show in the captured image. Any hints? Thanks. #include <ScreenCapture.au3> ToolTip("BlaBla Tooltip", 500, 300) Sleep(1000) _ScreenCapture_Capture(@MyDocumentsDir &"\Image1.jpg", 0, 0, 1600, 1000, True) MsgBox(0, "TTT", "ScreenCapture done") ShellExecute(@MyDocumentsDir &"\Image1.jpg")
  14. I've noticed that a tooltip shows when a GUI closes, and could not find a reference in the forums Anyone knows how to avoid the tooltip from showing ? thanks
  15. I have been working on rewriting the GUIToolTip UDF that comes standard with AutoIt3. Most of the work has involved removing all instances of "magic" numbers and creating working examples for the help file. I have also rewritten most of the ToolTip function entries in the help file to better explain how they work, and how to use them. The original UDF worked well for the most part, but unfortunately there were no examples in the help file and the descriptions for the functions and/or what they did was sorely lacking. Attached is an archive that contains the updated GUIToolTip.au3 UDF, the ToolTipConstants.au3 file, the updated help file entries for the functions, and example scripts for as many of the UDF's functions that I could get working. There is also a script breaking changes document in the archive that describes what was changed and how it will affect any scripts written to use the functions previously. As of this writing, I can almost guarantee that if you have a script that used the original UDF it will NOT work with this one. By that I don't mean it won't work well, I mean it won't work at all, so make sure you read the script breaking changes information. There are some functions in the original UDF that I couldn't get working even with the rewrite, mostly that is because I lack the knowledge necessary to make them work, or they just don't work as written and I can't tell the difference. Any of the functions that don't have example scripts in the help file entries I couldn't get to work, except for the function _GUIToolTip_ToolToArray, which appears to be mostly used as an internal function but I left it as is in case someone ever used it for a script. The new UDF removes the function _GUIToolTip_TTFToBits as it is no longer needed for anything and adds a new function called _GUIToolTip_Deactivate. Please look over the functions, the examples, and the help file entries and give some feedback as to what can be improved, changed, removed etc. Also, please take a look at the functions that I couldn't make work and let me know if you can get them working and an example showing what it does and how it should work. The more eyes looking at this the better it will be in the end. Thanks. GUIToolTip.zip
  16. I discovered bug in AutoIt. I write here first and not directly on BugTrac to be sure. Here is simple test script: GUICreate("ToolTip bug", 400, 300) GUICtrlCreateLabel('Test1', 10,10,100,25) GUICtrlSetTip(-1,'tip 1') GUICtrlCreateLabel('Test2', 10,50,100,25) GUICtrlSetTip(-1,'tip 2') GUISetState(@SW_SHOW) While 1 If GUIGetMsg() = -3 Then ExitLoop WEnd When you place cursor on label1 and then immediatelly after tooltip appear on label2 and back to label1 all is OK (tooltip appears) but when you place cursor on label1 and don't move cursor until tooltip dissapear (approx 5 seconds depends on Windows setting) then after placing cursor on label2 tooltip appears but back on label1 tooltip don't appear anymore Note1: I tested it on "my latest AutoIt beta" 3.3.7.23 Note2: This bug isn't in AutoIt 3.2.12.1 so it was introduced in some new version So question is if this bug is also in latest AutoIt release/beta version. EDIT: Now I discovered that it can be unblocked by click on label, after that ToolTip shows correctly again This bug apply also for other controls not only labels, tested on buttons EDIT2: It seems bug is only on WinXP, i will do more tests ... EDIT3: YES it appears only on WinXP (also with latest release/beta 3.3.8.1/3.3.9.4). Bug ticket reopened http://www.autoitscript.com/trac/autoit/ticket/1275
  17. Here's a snippet that demonstrates how to use the _GUIToolTip_xxx UDF functions, it's only a brief demo showing some of the techniques to use them. There are no examples in the help file that show how to create them, display them, or use them in general, so I had to figure this out by grabbing snippets here and there from around the internet and seeing how they work. There are several UDFs that utilize the tooltip UDF with explanations on how to use them with the controls that they are made for, for example the ListView and Tabs UDFs have functions that allow you to create tooltips for those controls, but not any general purpose examples are around the forum. It took me a while to find out how to get these to work but once I got the basics down they weren't hard to use at all. This script shows you how to create the tooltip, and how you can color them once they're created. It's heavily commented so it should be easy to follow. Take note of the comment after the _GUIToolTip_SetTipTextColor function, it's important to realize how to color the text correctly. #include <GUIConstantsEx.au3> #include <GUIToolTip.au3> Opt('MustDeclareVars', 1) Example() Func Example() Local $MESSAGE = "The following buttons have been clicked" Local $add, $clear, $close, $msg, $mylist Local $hGUI = GUICreate("My GUI list") Local $hToolTip = _GUIToolTip_Create($hGUI, $TTS_BALLOON) ; create a balloon style tooltip control ; turn off visual style for the tooltip otherwise color settings won't work DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hToolTip, "wstr", 0, "wstr", 0) ; if you remove the previous line the tooltip displays normally, but you can't color it $add = GUICtrlCreateButton("Add", 64, 32, 75, 25) Local $hAdd = GUICtrlGetHandle($add) ; we need handles of the controls to use them with the tooltips $clear = GUICtrlCreateButton("Clear", 64, 72, 75, 25) Local $hClear = GUICtrlGetHandle($clear) $mylist = GUICtrlCreateList("buttons that have been clicked", 176, 32, 121, 97) Local $hMylist = GUICtrlGetHandle($mylist) $close = GUICtrlCreateButton("my closing button", 64, 160, 175, 25) Local $hClose = GUICtrlGetHandle($close) GUISetState() ; the last number (9) in the below functions indicates that the $iID parameter is a handle to the control and not an identifier of the tooltip ; as well as subclassing the tooltip control _GUIToolTip_AddTool($hToolTip, 0, "Add something to the list", $hAdd, 0, 0, 0, 0, 9) ; this sets a tooltip to the add button _GUIToolTip_AddTool($hToolTip, 0, "This is the close button", $hClose, 0, 0, 0, 0, 9) ; this sets a tooltip to the close button _GUIToolTip_AddTool($hToolTip, 0, "This is the ListBox", $hMylist, 0, 0, 0, 0, 9) ; this sets a tooltip to the list control _GUIToolTip_AddTool($hToolTip, 0, "Clear the list box", $hClear, 0, 0, 0, 0, 9) ; this sets a tooltip to the clear button _GUIToolTip_AddTool($hToolTip, 0, "This is a tooltip for the whole GUI", $hGUI, 0, 0, 0, 0, 9) ; this sets a tooltip to the GUI, and not any control _GUIToolTip_SetTipBkColor($hToolTip, "0xA6EEA4") ; RGB value of the color for the background of the tooltip _GUIToolTip_SetTipTextColor($hToolTip, "0x6835EE") ; ColorRef value (BGR instead of RGB) for the text color of the tooltip While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $add GUICtrlSetData($mylist, "You clicked button No1|") Case $msg = $clear GUICtrlSetData($mylist, "") Case $msg = $close MsgBox(0, "", "the closing button has been clicked", 2) Exit EndSelect WEnd EndFunc ;==>Example
×
×
  • Create New...