Jump to content
Macro Express Forums

Progress bars ?


Recommended Posts

In searching this forum, I found reference to progress bars (i.e., http://pgmacros.invisionzone.com/index.php...l=progress+bar) but nowhere can I find how to display macro progress. I do not care in the slightest how it looks, but I need to be able to tell how far along a macro is.

 

Actually, regarding not caring about looks, if it were possible I'd like it to display the step it was on (description) or whatever. But anything at all would help. The running man tells me nothing.

 

Thanks in advance for any information, links, instructions, etc.

 

laurel

Link to comment
Share on other sites

The first exercise is to determine how to measure progress. Macros are not necessarily linear according to lines/tasks completed. At various points in the macro you would update the progress number/string and display it, say with a Text Box. File manipulations can show standard Windows progress if you check the box in the dialog.

 

I've never bothered but you could:

 

Update an Integer and display as percent eg 15%

You could sequentially add a character to a text string and display eg XXXXX (choosing the text box width to equal say 10 Xs)

I'm sure there are more sophisticated possibilities with the new Text Box capabilities of MEPro

 

If you look solely at line numbers, in most cases the indicated progress would be meaningless. For example, a repeat may only cover 5 lines but represent 2000 steps. To know where you are in a macro you can display/update a text box at completion of certain tasks eg "Web Pages Downloaded", "File List Complete", "Printing Started".

 

If I'm searching for files or strings through my PC I indicate current folder or file being searched in a Text Box.

If I'm extracting information from a long search in progress, I usually append to a text file. You can open it any time and get not only an idea of progress, but quality of what you have so far.

Link to comment
Share on other sites

In searching this forum, I found reference to progress bars (i.e., http://pgmacros.invisionzone.com/index.php...l=progress+bar) but nowhere can I find how to display macro progress. I do not care in the slightest how it looks, but I need to be able to tell how far along a macro is.

 

Actually, regarding not caring about looks, if it were possible I'd like it to display the step it was on (description) or whatever. But anything at all would help. The running man tells me nothing.

 

Thanks in advance for any information, links, instructions, etc.

 

laurel

 

As John says, there are several ways to do it. Did you try the Update Textbox command Cory recommended in post #5 of the thread you referenced ?

 

I suppose you could really go all the way and have the macro fill a bar with colour in familiar fashion, but I wonder how much slower that would make the main macro? :)

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

You have to make your own.

..............................

In the thread you linked we were talking about the Macro Express system tray icon that appears when a macro is running, not a progress indictor. He looks like a running man so I named him Forrest because in the past he was prone to just keep running and running even when the need had expired.

 

I have several different progress indicators I use depending on the need. In relatively short macros I have a subroutine I use to calculate percentage which updates the text box every 5% or what have you. But I have some very elaborate ones which first count the number of operations, calculates time remaining, elapsed time, average time, and will even calculate time of completion. Heck, it even allows one to stop the macro and resume in the middle of a big batch. Oh, and it does error counts and such. I even used a mono spaced font and padded all the values so that they all line up in a nice tabular form! But in most cases I make it a floating box and update it each time. However in some cases this can slow the macro so in many case it’s better to only update it about 1/100 or 1/1000 of the total time. Use the Floating Box option and in some cases yo might want it to be always on top but more and more I like making it not on top so the user can go about their way. IOW a lot depends.

 

You can also create quasi-graphic progress indicators. We used to make them for run in BASIC where we would have characters like asterisk, equal signs or even some of the special characters to make a bar or whatever. I remember one very elaborate one where the guy made a little ASCII character dog that would run back and forth across the screen! In fact there are all kinds of nerds out there who like to make ASCII Art. Just do a YouTube search. Amazing stuff.

Link to comment
Share on other sites

Here's a cool looking progress indicator!

.........................................................

post-281-1260898209_thumb.png

I like this concept. I used the ASCII Extended set (High) character "Block" (0xDB) and colored them. However since we can't change formatting of the text box directly we need to get tricky. This one has 20 blocks for a 5% resolution. We could create all 20 and use conditions or we could get really bold and create the command (like you see in the Direct Editor) in a variable and use Run Macro in Variable command. Hmmmm.... This could be fun. Could even have multiline indicators mix with text, and all kinds of stuff.

Link to comment
Share on other sites

  • 2 weeks later...

Good Idea, here is a simple one i came up with. It has 25 steps, will display a text line and a progress bar (kind of)

 

 

<REPEAT START Start="1" Step="1" Count="25" Save="TRUE" Variable="%StatusCount25%" _ENABLED="FALSE"/>
<VARIABLE SET STRING Option="\x00" Destination="%StatusText%" Value="Step %StatusCount25%" _ENABLED="FALSE"/>
<SWITCH Variable="%StatusCount25%"/>
<CASE Value="1"/>
<TEXT BOX DISPLAY Title="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 n\\f1 \r\n\\par %StatusText%\\cf0\\f2 \r\n\\par }\r\n" Left="Left" Top="Bottom" Width="225" Height="68" Monitor="0" OnTop="TRUE" Keep_Focus="FALSE" Mode="\x02" Delay="0"/>
<END CASE/>
<CASE Value="2"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="3"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="4"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnn\\cf2\\f1 \r\n\\par %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="5"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="6"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="7"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="8"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnn\\cf2\\f1 \r\n\\par %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="9"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="10"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="11"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="12"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="13"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="14"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="15"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="16"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="17"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="18"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="19"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnnnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="20"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnnnnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="21"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnnnnnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="22"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnnnnnnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="23"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnnnnnnnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="24"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnnnnnnnnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<CASE Value="25"/>
<UPDATE TEXTBOX Header="Macro Status" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset2 Wingdings;}{\\f1\\fnil\\fcharset0 Tahoma;}{\\f2\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;\\red0\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\cf1\\f0\\fs16 nnnnnnnnnnnnnnnnnnnnnnnnn\\f1 \r\n\\par \\cf2 %StatusText%\\cf0\\f2 \r\n\\par }\r\n"/>
<END CASE/>
<END SWITCH/>
<DELAY Flags="\x01" Time="1" _ENABLED="FALSE"/>
<END REPEAT _ENABLED="FALSE"/>

 

Just add three lines of code to the macro you are tracking

 

<VARIABLE SET INTEGER Option="\x00" Destination="%StatusCount25%" Value="1"/>
<VARIABLE SET STRING Option="\x00" Destination="%StatusText%" Value="Step %StatusCount25%"/>
<MACRO RUN Use_ID="FALSE" Name="Status Bar" ID="-1" Wait="TRUE"/>

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...