Jump to content
Sign in to follow this  

How to show progress in Windows 10

Recommended Posts

Hello everyone

I've just upgraded from Windows 7 to Windows 10, and discovered that tray tips can no longer be used to track progress (since (a) setting a new tray tip does not instantly cancel the previous one and (b) the tray tip does not display instantly but instead sort of flows in from the side, not to mention (c) making notification beeping noises).

$j = 100
For $i = 1 to $j
TrayTip ("Progress...", $i & " processed so far", 10)
Sleep ("100")

What other simple forms of showing progress on screen are available?  I know of ProgressOn, but that only shows a bar based on percentages.  Is there a way to include numerical information on the ProgressOn progress bar, e.g. "currently processing $i out of $j"?

Sometimes my script don't know what "100%" is going to be, but I would like the progress to be displayed on screen anyway.  I could use a ToolTip:

$j = 100
For $i = 1 to $j
ToolTip ($i & " processed so far", @DesktopWidth - 200, 100, "Progress...")
Sleep ("100")

Do you know of any ready-made GUI elements that I can use to output similar progress messages?




Share this post

Link to post
Share on other sites


Perhaps my Notify or Toast UDFs might be of use - links are in my sig.


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:


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


Share this post

Link to post
Share on other sites
;~ #include "_TraySetToolTip_Ex.au3" ; http://www.autoitscript.com/forum/index.php?showtopic=146910

If HotKeySet("[ESC}", "_Hotkey") = 0 Then exit MsgBox(16 + 262144, Default, "Hotkey ESC invalid or set by another application.")
Local $iLoopcount = 0
While Sleep(1000) ; never ending loop
    $iLoopcount += 1
    _TraySetToolTip_Ex("Loopcount: " & $iLoopcount)

Func _Hotkey()
    MsgBox(64 + 262144, Default, "Exit", 3)
EndFunc   ;==>_Hotkey

Func _TraySetToolTip_Ex($sText = "")
    ; #include "_TraySetToolTip_Ex.au3" ; http://www.autoitscript.com/forum/index.php?showtopic=146910
    If Not $sText Then $sText = Chr(0) ; Chr(0) = no tooltip displayed
    Local $_SysTray_hToolTip = DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", ControlGetHandle(ControlGetHandle(ControlGetHandle(WinGetHandle("[CLASS:Shell_TrayWnd]"), "", "[CLASS:TrayNotifyWnd]"), "", "[CLASS:SysPager]"), "", "[CLASS:ToolbarWindow32; INSTANCE:1]"), "uint", 0x423, "wparam", 0, "lparam", 0) ; $TB_GETTOOLTIPS = 0x423
    $_SysTray_hToolTip = HWnd($_SysTray_hToolTip[0])
    If Not IsHWnd($_SysTray_hToolTip) Or WinGetTitle($_SysTray_hToolTip) <> $sText Then Return
    DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", $_SysTray_hToolTip, "uint", 0x41D, "wparam", 0, "lparam", 0) ; $TTM_UPDATE = 0x41D
EndFunc   ;==>_TraySetToolTip_Ex

Run this script and point the mouse pointer at the Autoit symbol in the system tray.
A tooltip appears, which changes every second.
With ESC you can leave the script.
Have fun

App: Au3toCmd              UDF: _SingleScript()                             

Share this post

Link to post
Share on other sites

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...