Jump to content

Search the Community

Showing results for tags 'tip'.

  • 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


Member Title


Location


WWW


Interests

Found 4 results

  1. LAST VERSION - 1.0 19-May-12 I think many of you would like to perform some action (for example, to call the dialog box) when a user clicks on the tray tip. Here is a simple way to do it. Unfortunately, without .dll do not seem possible. Note, only AutoIt window can be registered as a source window, see example. AITray.dll (x86 and x64) Previous downloads: 74 AITray.zip Example #Include <WindowsConstants.au3> Opt('TrayAutoPause', 0) Opt('WinTitleMatchMode', 3) Opt('WinWaitDelay', 0) Global Const $NIN_BALLOONSHOW = $WM_USER + 2 Global Const $NIN_BALLOONHIDE = $WM_USER + 3 Global Const $NIN_BALLOONUSERCLICK = $WM_USER + 5 Global Const $NIN_BALLOONTIMEOUT = $WM_USER + 4 $hForm = GUICreate('') If @AutoItX64 Then $hDll = DllOpen(@ScriptDir & '\AITray_x64.dll') Else $hDll = DllOpen(@ScriptDir & '\AITray.dll') EndIf If $hDll <> -1 Then $Ret = DllCall($hDll, 'int', 'AISetTrayRedirection', 'hwnd', WinGetHandle(AutoItWinGetTitle()), 'hwnd', $hForm) If (@Error) Or (Not $Ret[0]) Then DllClose($hDll) Exit EndIf Else Exit EndIf GUIRegisterMsg($WM_USER + 1, 'WM_TRAYNOTIFY') TrayTip('Tip', 'This is a tray tip, click here.', 10, 1) While 1 Sleep(1000) WEnd DllCall($hDll, 'int', 'AIRemoveTrayRedirection') DllClose($hDll) Func WM_TRAYNOTIFY($hWnd, $iMsg, $wParam, $lParam) Switch $hWnd Case $hForm Switch $lParam Case $NIN_BALLOONSHOW ConsoleWrite('Balloon tip show.' & @CR) Case $NIN_BALLOONHIDE ConsoleWrite('Balloon tip hide.' & @CR) Case $NIN_BALLOONUSERCLICK ConsoleWrite('Balloon tip click.' & @CR) Case $NIN_BALLOONTIMEOUT ConsoleWrite('Balloon tip close.' & @CR) EndSwitch EndSwitch EndFunc ;==>WM_TRAYNOTIFY
  2. I want associate a multi line tip text to each tab items using GUICtrlSetTip. I have recreated a simple example : #include <GUIConstantsEx.au3> GUICreate("My GUI Tab", 250, 150); will create a dialog box that when displayed is centered GUISetBkColor(0x00E0FFFF) GUISetFont(9, 300) $sTipTxt1 = 'Line 1 : Paul' & @CR & _ 'Line 2 : Jo' & @CR & _ 'Line 3 : Al' & @CR & _ 'Line 4 : Steve' $sTipTxt2 = 'Line 1 : Marc' & @CR & _ 'Line 6 : Mickael' & @CR & _ 'Line 7 : Franck' Local $idTab = GUICtrlCreateTab(10, 10, 200, 100) $idTabItem0 = GUICtrlCreateTabItem("tab0") $idTabItem1 = GUICtrlCreateTabItem("tab----1") $idTabItem2 = GUICtrlCreateTabItem("tab2") GUICtrlSetState(-1, $GUI_SHOW); will be display first GUICtrlCreateTabItem(""); end tabitem definition GUICtrlCreateLabel("Label With Tip", 20, 130, 250, 20) GUISetState(@SW_SHOW) GUICtrlSetTip ( -1, $sTipTxt1, ' ', 1, 1 ) GUICtrlSetTip ( $idTabItem0, $sTipTxt2, ' ', 1, 1 ) GUICtrlSetTip ( $idTabItem1, $sTipTxt1, ' ', 1, 1 ) GUICtrlSetTip ( $idTabItem2, $sTipTxt2, ' ', 1, 1 ) Local $idMsg ; Loop until the user exits. While 1 $idMsg = GUIGetMsg() If $idMsg = $GUI_EVENT_CLOSE Then ExitLoop If $idMsg = $idTab Then ; display the clicked tab WinSetTitle("My GUI Tab", "", "My GUI Tab" & GUICtrlRead($idTab)) EndIf WEndNothing found about that in help file or wiki/Tabs. I have only seen that GUICtrlSetTip for tabitems sets incorrectly in certain situations but i also seen it was fixed for the 3.3.10.0 AutoIt version. So... may be not in case of multi lines ?
  3. 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!
  4. hello guys checkout this Code $array = ProcessList("explorer.exe") $iPID = $array[1][1] $sProcess = $iPID ;PID number for test process name ;~ $sProcess = "Idle" ;Other test process names ;~ $sProcess = "_Total" ;funny one ;~ $sProcess = "ntvdm" ;DOS process ;~ $sProcess = "AutoIt3" ;do not assign .exe to process name While 1 $iProcessCPU = _ProcessGetCPU($sProcess, 300 ) $sTip = "Process " & $sProcess & " CPU: " & $iProcessCPU & "%" traytip("", $sTip ,1) ;~ sleep(1000) ;set your own sleep time for LOOP mode WEnd Func _ProcessGetCPU($strProcess = "Idle", $iSampleTime = 10, $sComputerName = @ComputerName) ;~ All Parameters are optional: ;~ - Idle process will be measured if first parameter is not set ;~ - 500 ms is default sample time ;~ - This computer will be measured by default ;~ Process could be string ("Name") or PID number (1234) ;~ When more processes are runing with identical name, then the last opened is measured (use PID for other) ;~ For NORMAL MODE(one time measuring): set Sample value to more than 0 ms ;~ ( average CPU usage will be measured during sleep time within function) ;~ For LOOP MODE (continuous measuring): set Sample value to 0 ms ;~ ( average CPU usage will be measured between two function calls ) ;~ Total CPU usage is: ( 100 - _ProcessGetCPU()) ;~ Success: Returns process CPU usage in percent ;~ (Sample times below 100ms may return inaccurate results) ;~ (First result in Loop Mode may be inaccurate, ;~ because first call in Loop Mode is only used to trigger counters) ;~ Failure: Returns -1 ( wrong process name or PID ) ;~ : Returns -2 ( WMI service not found or Computer not found) if $strProcess = "" then $strProcess = "Idle" if $iSampleTime = "" AND IsString($iSampleTime) then $iSampleTime = 500 if $sComputerName = "" then $sComputerName = @ComputerName if not IsDeclared("iP1") AND $iSampleTime = 0 then ;first time in loop mode $bFirstTimeInLoopMode = 1 else $bFirstTimeInLoopMode = 0 endif if not IsDeclared("iP1") then assign("iP1", 0, 2) ;forced global declaration first time assign("iT1", 0, 2) endif $objWMIService = ObjGet("winmgmts:\\" & $sComputerName & "\root\CIMV2") if @error then return -2 if number($strProcess) then $strProcess = " WHERE IDProcess = '" & $strProcess & "'" else $strProcess = " WHERE Name = '" & $strProcess & "'" endif if $iSampleTime OR $bFirstTimeInLoopMode = 1 then ;skip if Loop Mode, but not First time $colItems = $objWMIService.ExecQuery ("SELECT * FROM Win32_PerfRawData_PerfProc_Process" & $strProcess) For $objItem In $colItems $iT1 = $objItem.TimeStamp_Sys100NS $iP1 = $objItem.PercentProcessorTime next if $objItem = "" then return -1 ;process not found sleep($iSampleTime) endif $colItems = $objWMIService.ExecQuery ("SELECT * FROM Win32_PerfRawData_PerfProc_Process" & $strProcess) For $objItem In $colItems $iP2 = $objItem.PercentProcessorTime $iT2 = $objItem.TimeStamp_Sys100NS next if $objItem = "" then return -1 ;process not found $iPP = ($iP2 - $iP1) $iTT = ($iT2 - $iT1) if $iTT = 0 Then return 100 ;do not divide by 0 $iCPU = round( ($iPP/$iTT) * 100, 0) $iP1 = $iP2 $iT1 = $iT2 Return $iCPU EndFunc ;==>_ProcessGetCPU() by novaTek ...ver 0.11 ok as you see this will show you your Explorer.exe in tip, im wondering about how to make this show you the CPU Usage in The Progress bar Lets say we will put the CPU usage in this progress bar #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 129, 192, 124) $Progress1 = GUICtrlCreateProgress(32, 16, 545, 89) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd i hope someone know how to ..
×
×
  • Create New...