Jump to content
Macro Express Forums

MEP Running Too Fast For Its Own Good


Recommended Posts

Maybe this has been discussed, but I can't recall and couldn't find anything immediately to address this, so please bear with me.

 

I have been, very occasionally, experiencing a strange behavior with MEP. I get occasional error messages telling me that a variable "is not defined, or is the wrong variable type." My most recent experience was Line 17 of a particular macro.

 

Line 17:

Delay: %D[1]% seconds

 

What's weird about this is this:

 

Line 3:

Variable Set Decimal %D[1]% to .25

 

Between Lines 3 and 17 are a pair of If/End If statements and a set of Window Activate commands. Nothing that I can see which would upset a Variable Set command. It's as if the macro was in such a hurry that it completely skipped Line 3. I run this particular macro hundreds of times every day, but this is the first time I've gotten this error on this particular macro. I ran it again seconds after it aborted without a problem.

 

On the surface I'd say this is just a random one-time glitch. But I've had it happen on other macros and not always a decimal variables (I don't use decimal variables very often). And in this case, it's not a huge deal, because it's such a small, simple macro. But if somebody were to have this happen in the middle of a large-scale macro it could upset their process severely.

 

Has anybody else seen this problem? Does anybody have any recommendations for slowing the macro down or ensuring that the macro actually reads each line?

Link to comment
Share on other sites

I believe that the command you're using requires an integer variable. If you want to wait for 1/4 second, then you should use 250 milliseconds (also an integer).

No, I learned the trick of using decimal variables in delays from ME's own sample macros, or possibly from featured macros on the www.macros.com website.

 

I've used decimals in delays for years. Never had a problem with them. Never had a problem with this particular macro till today, even.

Link to comment
Share on other sites

It sounds like what you describe is intermittent. Can you make a macro that reproduces the problem reliably?

 

In the cases where you have a problem had you made any changes to the file recently? Yesterday I documented a bug where in certain circumstances it appears if the cache is not getting refreshed and recent changes are not being realized. I doubt this is it though.

 

FWIW there are integers and decimals but no "decimal integers". :)

Link to comment
Share on other sites

It sounds like what you describe is intermittent. Can you make a macro that reproduces the problem reliably?

 

In the cases where you have a problem had you made any changes to the file recently? Yesterday I documented a bug where in certain circumstances it appears if the cache is not getting refreshed and recent changes are not being realized. I doubt this is it though.

 

FWIW there are integers and decimals but no "decimal integers". :)

1. I can't reproduce it at all. It's sooooo intermittent.

2. I hadn't made any changes to that macro at all.

3. Decimal integers? If you go back and read my original post you will see that I used the term "decimal variables" ... don't you look silly now ;)

 

PS - I'm on allergy meds... they loop my brain sometimes (even the non-drowsy kind).

Link to comment
Share on other sites

don't you look silly now ;)
Yes I do, sorry about that. Wait a minute, did you just edit your post? :) I too am under the weather. Went for a mountain bike ride Sunday and have felt crap ever since. Not sure if it was the pollen from all the blossoms on those weeds I busted or if it's just a cold.
Link to comment
Share on other sites

Steve,

 

Even after excluding the many that have turned out to be user error, I've had many broadly similar issues of the "what the heck's going on here" type. I'm coming to the uncomfortable conclusion that ME Pro is somehow not fully 'isolated' from all the other stuff going on inside my XP Pro PC. Of course, it's not alone in that respect. Over two decades of using PCs I've had crashes and bizarre behaviour when working with scores of applications. I'm sure that many are down to the OS itself. Others have occasionally turned out to be rarer causes, like CPU over-heating, the effects of momentary power loss, or a disk sector error on an ageing hard drive, not to mention the odd virus or trojan.

 

But ME Pro does seem to give me rather more intermittent, logically inexplicable glitches than most of my programs. (My video editor, Magix Movie Edit Pro, gets top place!)

 

Some of these are clearly due to conflicts with other programs. To take just one example, you may recall from an earlier thread that I eventually established that sporadic semicolons getting entered by TextType, instead of colons, could be eliminated if I closed down another 'resident' power utility, Stiletto. That's probably because, like ME, Stiletto has macros for typing my frequent text strings. So it's presumably always listening for various keystrokes, one of which happens to be a semicolon. (However, that's only supposed to be active when I'm running Excel, so darned if I know why it causes disruption to ME Pro for 99% of the time when I'm not using Excel. ) And it's interesting that Stiletto has never been affected in reciprocal fashion by ME or ME Pro. Stiletto seems to be able to isolate itself from all the other processes occurring, but ME Pro doesn't.

 

Anyway, I bet I've reported a score of other examples, and so have others like Cory and Paul. The fact that these are apparently random is the most worrying aspect. As you've mentioned in your example, this makes the field behaviour of macros unpredictable. A few stray semicolons are one thing, an extra zero on customer invoices or an accidental reformatting of C: are more serious!

 

This randomness is, of course, also the greatest obstacle to users and ISS isolating the cause. But I would have hoped that by now some sort of pattern of cause and effect might have begun to emerge? Maybe we users could provide more structured input to ISS Support, to their specification, to establish a more methodical approach.

 

It would be good to get some communication here occasionally about this from ISS, even if work is on-going.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Maybe we users could provide more structured input to ISS Support, to their specification, to establish a more methodical approach.

 

It would be good to get some communication here occasionally about this from ISS, even if work is on-going.

 

--

Terry, East Grinstead, UK

Hey Terry,

 

I agree. Mostly when I post a broad and vague error in here, it's because I can't seem to isolate it and I'm hoping that somebody in the forum (whether it's you, Cory, Kevin, or even a brand-new board-poster) has had the same problem and been able to link it to something specific so I can check for the same circumstances in my processes.

 

If nobody else has had any luck pin-pointing it, either, but they're also having the issue, then maybe we can find a common denominator (such as OS, service pack, or something else entirely), so that we have something firm to provide in the official bug report.

 

When it's just a random event, and only one person is experiencing it, I imagine the bug is not a MEP issue so much as an incompatibility or instability in a local application completely outside ISS's control.

 

An example: I work with an application that is really very basic-looking. It's one of those apps that appears to be based on DOS. It's not the easiest program to work with using Macro Express (for various unrelated reasons), but it's a good program if you learn its quirks. I use this program to pull up information on accounts. To access any given page, I have the option of selecting a number from a menu which will take me to the next menu and so on until I finally get to the information I want; or I can simply type in the code for the page I want to be on.

 

Example: To get to the main "title" page of an account, I would type:<ESC> Menu, 6 <Enter>, 2 <Enter>, 1 <Enter>, account number <Tab>, account type (dda/sav/etc) <Enter>

 

Alternatively I could simply type: inpt,rfaupr2,,00000000 (where the 0's are the account number)

 

Much better to learn the simple code, even if it isn't immediately sensible. So I have a macro that takes the account number (already stored in a variable), and pastes the inpt, string into the app. This has worked flawlessly for over a year. Until recently. Suddenly the app no longer likes me to paste information, and so it only works about 60% of the time. I've had to go in and change all the pastes to Simulate Keystrokes. Annoying, but nothing I or ISS can do about it. And nothing my IT department is qualified to do about it, either, I think.

Link to comment
Share on other sites

I do not completely agree with Terry and more agree with you Steve. In innumerable instances I have gotten to a point where I thought MEP was doing random inclusions of things but in the end it has always turned out to be very reproducible, even if it's a bug. The problem is that a computer is incredibly complex and eventually one will run into oddities. For instance I created a quick macro once that issues a string in any application for a person. Once in awhile in Excel it seemed to result in a #NAME? in the in some of the cells. It appeared that MEP was randomly adding an = sign at the beginning of some making the string an invalid formula. It turned out that anytime one starts typing and uses a plus or minus sign in a General formatted cell Excel thinks you want to make a formula and adds an = sign. And the reason it appeared random was because some of the cells were formatted as Text which disables this 'feature'.

 

Also as you pointed out Steve at some point as macro writers we start to move more to the programmatic side to avoid errors. This is why I advocate copying a block of text from excel and processing it internally instead of arrowing around. But in this case it's not MEP's fault but rather the application periodically not listening. I find this in a big way when dealing with Java or other web based applications.

 

These things are just very complex. However complex you think your computer is I'm wiling to bet you're off by at least 3 order's of magnitude. The last couple of days I've made several bugreps to ISS with what seemed like a bevy of broken bits. But yesterday I found the problem and it was something very simple. You see I'm doing something a little unique on how I maintain what files my user's have open and there is a way that if I use this method I can get only one file to appear in the MEP Explorer even when two are open. Don't worry, I doubt anyone will ever see this problem. Anyway because I was only seeing one file open I was assuming that only one was open and I was getting all kinds of bad behavior for dialogs, caches, run errors... But once i realized it was because there were two files open. Point being it was a tiny esoteric bug but it seemed like the sky was falling. Of course this is still a pain and a huge waste of time but my point is that in my experience there's always an explanation and things don't happen randomly. Now whether we ever know that explanation is another matter.

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