Jump to content
Macro Express Forums

2nd Macro Lags When Text Box Still Open


Recommended Posts

I have several macros that open a text box and update its contents periodically. Whenever these text boxes are open, my other macros lag and hang, becoming inefficient.

 

Has anybody else noticed similar problems?

 

As an example:

 

Macro 1:

Read Registry Value to %TVariable%

Text Box Display: %TVariable%

Repeat Until %T1%<>%T1%

Read Registry Value to %TVariable%

__Update Text Box

Delay: 5 seconds

Repeat End

 

Macro 2:

//At some point there may be cause to write a different value to the Registry Value being read in Macro 1. While the text box from Macro 1 is displayed, Macro 2 drags and drags.

 

The information in the Registry Value is important. It's useful to have it visible while processing my work. I have considered utilizing a notepad for this, but I can't make a Notepad stay visible.

 

Of course, with the Text Box Update, I can keep it on top without keeping focus, but that doesn't stop it from regaining focus when it updates. So I'm having to deal with the little problems that that causes to some of my other processes, but I just really thought having the Text Box Display/Update would be more fun than a boring old notepad stuffed in a corner.

 

I don't know if the problem is universal, or specific to my crappy work PC. I haven't tested it on my home PC, yet. I may do that tonight or maybe sometime over the weekend.

Link to comment
Share on other sites

Well, consider this!

 

Macro Test1

Text Box Display: Counter Display (Timed floating box for 10 seconds)

Delay: 10 seconds

 

Macro Test2

Date/Time: Set %t[1]% to the current date/time using "hh:mm:ss" as the format

Repeat Start (Repeat 1000000 times) (Storing counter in %n[1]%)

End Repeat

Date/Time: Set %t[2]% to the current date/time using "hh:mm:ss" as the format

Text Box Display: (Started at %t[1], Ended at %t[2]%)

 

Case 1

If I run Test2 (not with F9!), it consistently takes 17 seconds.

 

Case 2

If I insert the command Macro Run: Test2 (do not wait for test2 to terminate before proceeding)

into Test1, and disable the rest of the macro, it takes a consistent 17 seconds (no overhead).

 

Case 3

If I insert the command Macro Run: Test2 (wait for test2 to terminate before proceeding)

into Test1, and disable the rest of the macro, it takes a consistent 27 seconds (an increase of 59%).

 

Case 4

If I insert into Test1 (at the top of the macro) the command Macro Run: Test2 (do not wait for test2 to terminate before proceeding)

into Test1, and enable the rest of the macro, it takes a consistent 25 seconds (an increase of 47%).

 

And here's the absurdity. Insert the command Macro Run: Test2 (do not wait for test2 to terminate before proceeding)

at the end of test1, i.e. after that 10-second pause during which nothing is happening, and the overall execution time remains the same at around 27 seconds! (that's 10 seconds for Test1 plus 17 seconds for Test2).

 

I think Insight has a lot of work still to do on MEP.

Link to comment
Share on other sites

Well, consider this!

 

 

Macro Test1

Text Box Display: Counter Display (Timed floating box for 10 seconds)

Delay: 10 seconds

 

Macro Test2

Date/Time: Set %t[1]% to the current date/time using "hh:mm:ss" as the format

Repeat Start (Repeat 1000000 times) (Storing counter in %n[1]%)

End Repeat

Date/Time: Set %t[2]% to the current date/time using "hh:mm:ss" as the format

Text Box Display: (Started at %t[1], Ended at %t[2]%)

 

I reproduced your two macros (code would have been useful!) and show my results below.

 

Case 1

If I run Test2 (not with F9!), it consistently takes 17 seconds.

 

6 seconds here.

 

Case 2

If I insert the command Macro Run: Test2 (do not wait for test2 to terminate before proceeding)

into Test1, and disable the rest of the macro, it takes a consistent 17 seconds (no overhead).

 

6 seconds.

 

Case 3

If I insert the command Macro Run: Test2 (wait for test2 to terminate before proceeding)

into Test1, and disable the rest of the macro, it takes a consistent 27 seconds (an increase of 59%).

 

9 seconds, a 50% increase.

 

Case 4

If I insert into Test1 (at the top of the macro) the command Macro Run: Test2 (do not wait for test2 to terminate before proceeding)

into Test1, and enable the rest of the macro, it takes a consistent 25 seconds (an increase of 47%).

 

Do you mean so that Macro Test2 is now as follows?

<MACRO RUN Use_ID="FALSE" Name="Macro Test2" ID="-1" Wait="TRUE"/>

<TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Timed floating, 10 seconds\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x01" Delay="10"/>

<DELAY Flags="\x01" Time="10"

 

If so, then that takes 9 seconds here, an increase of 50%.

 

And here's the absurdity. Insert the command Macro Run: Test2 (do not wait for test2 to terminate before proceeding)

at the end of test1, i.e. after that 10-second pause during which nothing is happening, and the overall execution time remains the same at around 27 seconds! (that's 10 seconds for Test1 plus 17 seconds for Test2).

 

Again, if I've faithfully interpreted that, it takes 16 seconds here.

 

I think Insight has a lot of work still to do on MEP.

 

I'll be interested to see Insight's explanation.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

I reproduced your two macros (code would have been useful!) and show my results below.

How delicious! I believe I made exactly the same comment to you only last week! Mind you, in your case you were asking for help, in mine I was simply showing what I'd done. Unfortunately I no longer have the code (I know, I should have kept it :rolleyes: ).

Yes, I agree these results require some explanation, and, hopefully, more work from Insight.

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...
×
×
  • Create New...