Jump to content
Macro Express Forums

Run (F9) delay?


Recommended Posts

When I run a macro with F9 from the Script Editor there seems a relatively long wait (close to 2 secs) before the new dialog Start Debugger in a Different Window appears. Is that delay correct behaviour please, or maybe some setting of mine?

 

Also, how do I set ME Pro to always start in the last window, as I can in ME 3, to avoid this extra step?

 

BTW, 'debugger' gives no hits in Help > Search.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

My dialog pops up immediately so I'm guessing it's something with your system. As far as I know there is no delay setting to configure.

 

I can't answer your second question.

Link to comment
Share on other sites

'debugger' gives no hits in Help > Search.

Try the search term 'Debug'. There are hits for both 'debug' and 'debugging'. I have found that searches are often more successful using the root parts of words. This applies not just to the Macro Express Pro help but any type of search.

 

I'll ask if the word 'debugger' can be added as a keyword somewhere. [iSS6356]

Link to comment
Share on other sites

When I run a macro with F9 from the Script Editor there seems a relatively long wait (close to 2 secs) before the new dialog Start Debugger in a Different Window appears. Is that delay correct behaviour please, or maybe some setting of mine?

 

My dialog pops up immediately so I'm guessing it's something with your system. As far as I know there is no delay setting to configure.

There is a delay using F9 on my computer. Sometimes it is less than a second, sometimes it is longer. I am looking for a pattern. Any ideas? Here are some questions that may help.

 

1. How many macros in your macro file?

2. How many macros are open in the Script Editor?

3. How many variables are in use on that macro?

4. How many programs are running or windows are open when you press the F9 key?

Link to comment
Share on other sites

Try the search term 'Debug'. There are hits for both 'debug' and 'debugging'. I have found that searches are often more successful using the root parts of words. This applies not just to the Macro Express Pro help but any type of search.

 

I'll ask if the word 'debugger' can be added as a keyword somewhere. [iSS6356]

 

Thanks Kevin - but could you instead ask for the restoration of the universal context help button please! ;)

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

There is a delay using F9 on my computer. Sometimes it is less than a second, sometimes it is longer. I am looking for a pattern. Any ideas? Here are some questions that may help.

 

Seems about 2 s here. But F9 was/is 'immediate' in ME3, under identical conditions, so it's an ME Pro issue.

 

1. How many macros in your macro file?
504

 

2. How many macros are open in the Script Editor?
Usually 1 or 2

 

3. How many variables are in use on that macro?
Typically 0-2

 

4. How many programs are running or windows are open when you press the F9 key?
Wide variations. Typically 2-5 applications apart from ME Pro, but scores of processes in XP Pro task Mgr.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Hopefully this will help diagnose the cause. I ran Process Monitor for a couple of seconds while using F9 from ME Pro, and filtered the hundreds of entries to show only those with 'mac' in the Process column.

 

ME-F9Delay-1.jpg

 

As you see, about half of the entries appear to be trying to 'Enable Autodial', which looks very odd!

 

---------

 

A few minutes later: those 'Enable Autodial' processes are still continuing at a high rate even with no macro running! That may account for some other general sluggishness I've noticed when using the ME Pro Editor and Explorer - operations not quite so brisk as with ME 3.

 

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Terry, this is a user to user forum which is not hosted by ISS. In a case like this you should start a support incident with ISS to get you your due attention. I'm guessing ISS's first priority it to deal with their support incidents filed this way and the forum secondly so I'm guessing your issue will get handled much more quickly if you go this route. If they think it looks like a bug then they will create a bug tracker then.

 

For what it's worth it really does look like you have something going very wrong here.

Link to comment
Share on other sites

Earlier in this thread I asked some questions to try to find out the scope of this issue. Terry was the only one to reply with information. Anyone else?

 

Here are the questions I asked plus one I should have asked:

  1. How many macros in your macro file?
  2. How many macros are open in the Script Editor?
  3. How many variables are in use on that macro?
  4. How many programs are running or windows are open when you press the F9 key?
  5. How new/fast is your computer (what CPU, amount of memory, etc.)?

How about anyone else? Has anyone seen the delay Terry is describing?

 

Any feedback from ISS on this please? Is it a bug I should report?
As mentioned, this forum is provided and run by Professional Grade Macros. Insight Software Solutions employees try to monitor this forum but to be guaranteed a timely response you need to contact Insight Software Solutions Support directly.
Link to comment
Share on other sites

Terry, this is a user to user forum which is not hosted by ISS. In a case like this you should start a support incident with ISS to get you your due attention. I'm guessing ISS's first priority it to deal with their support incidents filed this way and the forum secondly so I'm guessing your issue will get handled much more quickly if you go this route. If they think it looks like a bug then they will create a bug tracker then.

 

For what it's worth it really does look like you have something going very wrong here.

 

OK Kevin, I've reported it via the Bug page.

 

A couple of additional points I've observed since:

 

1) If I open any macro in the Script Editor, the very first time I use F9 the dialog window comes up immediately; thereafter it's about 2 s.

 

2) I closed ME Pro, opened ME 3 instead and ran Process Monitor while doing an F9 from Script Editor on an arbitrarily chosen macro. There were none of those strange 'Enable AutoDial' entries during the fraction of a second before the macro ran, nor while it ran, nor after it had finished. So that reinforces this as exclusively ME Pro behaviour.

 

3) In ME Pro I again ran ProcMon and it shows that the Enable AutoDial processes occur continuously at a rough rate of 2 per second as long as ME Pro is loaded. So that might or might not be related to the F9 delay, but in any case is an unwanted overhead that must be slowing down ME Pro to some degree.

 

BTW, I didn't get any answer to my earlier question '...how do I set ME Pro to always start in the last window, as I can in ME 3, to avoid this extra step?' Is that in fact not possible in ME Pro? I'm speculating it might either avoid the delay or at least shorten it. I never want the macro to start running in the ME Script Editor window itself - does anyone? So I don't understand why that's the default?

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

BTW, I didn't get any answer to my earlier question '...how do I set ME Pro to always start in the last window, as I can in ME 3, to avoid this extra step?'

One question per thread please. If you ask different questions in the same thread then it gets confusing and some questions go unanswered. Changing the topic of a thread in the middle of the thread is called 'Thread Hijacking' and is considered bad form.

Link to comment
Share on other sites

One question per thread please. If you ask different questions in the same thread then it gets confusing and some questions go unanswered. Changing the topic of a thread in the middle of the thread is called 'Thread Hijacking' and is considered bad form.

 

That question was in this thread, in my opening post!

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Well, fortunately this isn't a bug with MEPro. You can't compare the dialog with the test dialog in ME3 because it's not the same dialog.

 

In ME3, when you hit F9, it brings up a text box where a macro can type into. In MEPro, the dialog that comes up is a list of all of the visible windows. The delay you're experiencing is due to the fact that MEPro is querying all of those windows for their titles. If a program isn't responding quickly then it adds to the delay you're seeing.

 

You can turn off this dialog by going to Debug > Switch Focus. This will become unchecked and the dialog will no longer appear, making your test runs a whole lot faster.

Link to comment
Share on other sites

Well, fortunately this isn't a bug with MEPro. You can't compare the dialog with the test dialog in ME3 because it's not the same dialog.

 

In ME3, when you hit F9, it brings up a text box where a macro can type into. In MEPro, the dialog that comes up is a list of all of the visible windows. The delay you're experiencing is due to the fact that MEPro is querying all of those windows for their titles. If a program isn't responding quickly then it adds to the delay you're seeing.

 

You can turn off this dialog by going to Debug > Switch Focus. This will become unchecked and the dialog will no longer appear, making your test runs a whole lot faster.

 

Thanks Chris, but that doesn't solve the problem. If I uncheck that as you suggest then the macro runs (quickly) without changing focus at all. Which means it runs in the ME Script Editor, which obviously is not what's normally wanted. In ME 3 the option was 'Change Focus to Previous Window', which was what was usually required and worked well. The question I asked in my opening post 6 days ago was "how do I set ME Pro to always start in the last window, as I can in ME 3, to avoid this extra step?"

 

And what about those continuous EnabeAutodial processes? While presumably unrelated to the F9 delay, are you saying they don't indicate some sort of bug?

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

I can report the same problems Terry is having with the F9 delay. The delay also occurs with F7 and F8.

 

Chris, your answer that the problem is "due to the fact that MEPro is querying all of those windows for their titles" can't be right because, as Terry has reported, the first time I run F9 there is no delay.

 

I also checked my processes and found the failed attempts to "Enable Autodial" at the rate of about two per second. Does this have anything to do with the fact that I have not yet upgraded my license to Macro Express Pro?

Link to comment
Share on other sites

I can report the same problems Terry is having with the F9 delay. The delay also occurs with F7 and F8.

 

Chris, your answer that the problem is "due to the fact that MEPro is querying all of those windows for their titles" can't be right because, as Terry has reported, the first time I run F9 there is no delay.

 

I also checked my processes and found the failed attempts to "Enable Autodial" at the rate of about two per second. Does this have anything to do with the fact that I have not yet upgraded my license to Macro Express Pro?

 

mfseeker: Re that last point, no, it can't be anything related to that, as I registered from the outset (act of faith!).

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

  • 2 weeks later...

The RegQueryValue of the EnableAutodial setting is a result of the TCP/IP macro activation. This allows a macro to be activated when the computer goes 'online' or 'offline'. Macro Express Pro checks every 1/2 second or so. The check causes something deep inside Windows to look in the registry for the EnableAutodial value.

Link to comment
Share on other sites

That question was in this thread, in my opening post!

I'm sorry. I see that now.

 

I think your question was answered elsewhere but the short answer is no. When you press F9 from within the Script Editor Macro Express asks Windows (the OS) for a list of open windows (the programs). This takes time and is the cause of the delay you are seeing when you press the F9 button. The number of programs that are open and how busy your computer is will affect the delay.

 

For some macros I will leave the Macro Explorer window visible and, instead of pressing F9 or clicking the green run macro button, I will right click on the macro in Macro Explorer and then click on Run Macro Now. Of course I only do this if I am not trying to use the debugger to step through the macro or to stop on a breakpoint.

Link to comment
Share on other sites

I'm sorry. I see that now.

 

I think your question was answered elsewhere but the short answer is no. When you press F9 from within the Script Editor Macro Express asks Windows (the OS) for a list of open windows (the programs). This takes time and is the cause of the delay you are seeing when you press the F9 button. The number of programs that are open and how busy your computer is will affect the delay.

 

For some macros I will leave the Macro Explorer window visible and, instead of pressing F9 or clicking the green run macro button, I will right click on the macro in Macro Explorer and then click on Run Macro Now. Of course I only do this if I am not trying to use the debugger to step through the macro or to stop on a breakpoint.

 

Thanks Kevin.

 

But I'm not satisfied with the F9 explanation. It just doesn't square with the facts. To repeat some points that have already been made by me and mfseeker but which you have not yet addressed:

 

1) The F9 delay does not occur the first time it is used. So that point alone proves beyond question what common sense says is obvious anyway: that a high end quad core PC doesn't need 2 million microseconds to scan a list of 400 macros!

 

2) ME 3 doesn't exhibit the F9 delay at all; with virtually the same number of macros, its response is immediate

 

So there's plainly something wrong with the coding IMO, that wan't present in ME 3, and I'm surprised your developers haven't found it by now. Or haven't even looked properly?

 

I was disappointed at the poor response to your request up-thread for more feedback from other users. So far only you, mfseeker and I seem to be aware of the issue. I'm probably less tolerant than most ;) but the long pause is a real frustration to me when I'm testing. Your work-around is OK in a few situations, but nowhere near as convenient as hitting F9 from the Script Editor. Hey, if I do this say 100 times a day that's over 3 minutes lost! If I could take the hit in one go that would be fine, I'd grab another coffee or run another program, but what can you do in 2 seconds except wait..wait..wait?

 

---------

 

On the apparently unrelated issue of the Enable/Autodial processes, they don't occur in ME 3 either.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Never at any time did we say that it was scanning the macros. When you press F9 it scans the list of open windows. There can be a delay when querying these if a window does not respond to the message immediately. That is what you're seeing. It has nothing to do with your processor or the number of macros. And, the fact that it works the first time doesn't have any bearing on whether or not it will work a second time. It all depends upon what the running applications on your system is doing.

 

Please trust me on this because I have profiled this (because I've experienced it myself) and the most significant delay occurs when the windows are being queried for their titles. The remaining code leading up to it has taken less than one second on a P4 2.4GHz machine.

 

Now, I will revisit the code to see if I can speed up the querying a bit, but please believe me when I say that this is the problem.

Link to comment
Share on other sites

Thanks for explaining this further and for looking into the code again. Nevertheless, it is really annoying to have to keep waiting for it.

 

I just tested again with no windows open except the macro editor window itself. The delay seems to be just as long as when several windows are open. Perhaps this will be of some use to you in fixing the problem.

 

Stan

Link to comment
Share on other sites

Never at any time did we say that it was scanning the macros.

Yet it was the first question in Kevin's request for data, in post #4 of this thread: "1. How many macros in your macro file?"

 

When you press F9 it scans the list of open windows. There can be a delay when querying these if a window does not respond to the message immediately. That is what you're seeing. It has nothing to do with your processor or the number of macros.

 

That doesn't make any sense to me! I get the same delay whether I have 1 or 20 windows open

 

And, the fact that it works the first time doesn't have any bearing on whether or not it will work a second time. It all depends upon what the running applications on your system is doing.

 

Eh? That also flies in the face of common sense! The conditions don't change significantly between my first use of F9 and the next. And the next, and next... Yet only on the first is it immediate. And that behaviour applies to every macro, in every ME Pro session, on every date I've been doing this! Are you seriously suggesting that this is an insignificant factor? That it doesn't indicate some error in the coding, affecting all uses of Run except the first?

 

Please trust me on this because I have profiled this (because I've experienced it myself) and the most significant delay occurs when the windows are being queried for their titles. The remaining code leading up to it has taken less than one second on a P4 2.4GHz machine.

 

I'd like to, but you're simply not addressing the facts.

 

Now, I will revisit the code to see if I can spee up the querying a bit, but please believe me when I say that this is the problem.

 

I'm looking forward to whatever improvements you can make.

 

And, once again, you still haven't addressed the central question of why ME 3 doesn't have this problem.

 

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Yet it was the first question in Kevin's request for data, in post #4 of this thread: "1. How many macros in your macro file?"
I asked a series of questions to see if it revealed something common. There is nothing to conclude that the number of macros affects the delay. The few answers to the questions seem to indicate that it does not.

 

And, once again, you still haven't addressed the central question of why ME 3 doesn't have this problem.
This has been answered. More than once. Stop comparing apples and oranges. Again, Macro Express 3 handles the F9 key differently than Macro Express Pro. Macro Express 3 does not display a list of open windows before running the macro. Macro Express Pro does.
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...