Macro Notification Message box

Creating macros. Working with QM.

Macro Notification Message box

Postby oImageZo on Wed Sep 13, 2017 8:15 am

Hi There,

I've created a macro for a very length process (takes around 15minutes and uses multiple applications) which is great and works - hoorah!

However, there are a few elements where the macro appears to the user it is doing nothing (wait times/background stuff) which is fine for me, because I know what it is doing. However I want to have other users use this macro but am afraid they will think it has crashed/stopped/died and will attempt to restart/take over manually.

I'm looking to just have a constant transparent message box style in the top corner just to display updates but am having a melt down trying to figure it out.

Any ideas?
oImageZo
 
Posts: 15
Joined: Wed Sep 13, 2017 8:09 am

Re: Macro Notification Message box

Postby Gintaras on Wed Sep 13, 2017 8:47 am

You can use function OnScreenDisplay. It displays transparent or tooltip-like text, depending on flags. Example:
Macro Macro1011     ?
OnScreenDisplay "Macro X is running" -1 -1 1 "" 0 0 8
rep 5
,wait 1



This macro changes OnScreenDisplay text while running:
Macro Macro1011     ?
sub.OSD "Starting..."
1
int i
for i 0 5
,sub.OSD i+1
,1
sub.OSD "DONE"
1


#sub OSD
function str'text
OnScreenDisplay F"---- Macro X ----[]{text}" -1 -1 1 "" 12 0xff0000 8|4 "Macro X"



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

Or just use the Quick Macros tray icon, which changes color when a macro is running.
If it is a type of macro/function that does not change icon when running, or it is an exe-macro that runs not from QM, use function AddTrayIcon. Example:
Macro Macro1011     ?
AddTrayIcon "$qm$\macro.ico" "Macro X is running.[]You can Ctrl+click this icon to end it."
rep 5
,wait 1


But problem: Windows by default hides tray icons.
Gintaras
Site Admin
 
Posts: 10385
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests