Jump to content
Macro Express Forums

Continue running scripts with dialog diplayed


Recommended Posts

How do I have Macro Express (using v4.4) continue to run scripts while an informative message is displayed on the screen. Basically, it's a message informing the user that a program will be shut down in 5 mins and whether they are there or not to close the message box it should start the timer and continue to run the script.

Link to comment
Share on other sites

Hello i wrote you a macro. Hope this is what you wan't ?!

<VARIABLE SET INTEGER Option="\x00" Destination="%minutes%" Value="1"/>
<VARIABLE SET INTEGER Option="\x00" Destination="%seconds%" Value="59"/>
<TEXT BOX DISPLAY Title="Info" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1031{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Application will terminate in 5 minutes !\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x01" Delay="0"/>
<DELAY Flags="\x00" Time="1"/>
<REPEAT UNTIL Variable="%minutes%" Condition="\x00" Value="-1" _COMMENT="Repeat until 4 min (59 sec) left"/>
<COMMENT Value="Decrease seconds from 59 until 0"/>
<REPEAT UNTIL Variable="%seconds%" Condition="\x02" Value="0"/>
<UPDATE TEXTBOX Header="Info" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1031{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Application will terminate in %minutes%:%seconds% minutes !\r\n\\par }\r\n"/>
<DELAY Flags="\x02" Time="950"/>
<IF NOT WINDOW Option="\x01" Title="Info" Partial="FALSE" Wildcards="FALSE" _COMMENT="check if window \"Info\" closed by user action"/>
<BREAK _COMMENT="if the window doesn't exist (closed by user), marco exit the loop"/>
<END IF/>
<VARIABLE MODIFY INTEGER Option="\x01" Destination="%seconds%" Value1="%seconds%" Value2="1"/>
<END REPEAT/>
<COMMENT Value="End of Decrease seconds "/>
<VARIABLE SET INTEGER Option="\x00" Destination="%seconds%" Value="59"/>
<VARIABLE MODIFY INTEGER Option="\x01" Destination="%minutes%" Value1="%minutes%" Value2="1"/>
<END REPEAT/>

Download macro below

time_left_macro_with_window.mex

Edited by Look_Up
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...