Jump to content
Macro Express Forums

MEP Not Recognizing Custom Variable Names!!!!


Recommended Posts

Ok... I'm about to panic.

 

Just now, out of the blue, Macro Express stopped recognizing customized variable names. It's been working fine. I don't know what happened, but suddenly I'm screwed.

 

I've checked and double-checked my variables list in the various macros involved, all of which have the necessary macros in place. I've changed the personalized variable names to old-school %T[1]% variables and the macros work with that... but this is not pretty...

 

Anybody have any ideas what could have happened? Something I may have done inadvertently and can be fixed? Please help!

 

This is the error:

post-2634-1243370841_thumb.jpg

 

If I change %acctnumber% to %T[1]% the macro runs fine.

 

Here is my Variables tab:

post-2634-1243371015_thumb.jpg

 

And just in case you think it might be something as simple as trying to put a Text Variable in to an Integer Only command, here is line 29:

post-2634-1243371194_thumb.jpg

 

What's really confusing me, is that this isn't happening to all my text variables. Just this one.

Link to comment
Share on other sites

<sigh>

Panic over. Still intensely confused.

 

I changed %T[1]% to %TextVariable% and it worked fine. I've now changed it to %AccountNumber% and it is working fine. For some reason %acctnumber% is no longer valid for this macro.

 

As you can see from the screenshot above, this variable's contents gets written to the registry. I have another macro that reads the information later. That macro was using the same %acctnumber% variable, but it stopped working there, too. It is currently set to %T[1]% and is working fine.

 

I'm baffled... but at least I found an effective work-around.

Link to comment
Share on other sites

Is it possible that the original variable %acctnumber% was defined as other than a text variable, e.g. integer? I've experienced this problem once, where a text variable I expected MEP to create for me was created as an integer. I suspect there's a command somewhere which either handles variables of more than one type, or is simply fooling MEP into creating a new variable of the wrong type.

Of course, for this to be relevant, you need to have the following settings:

- Prompt the user to create a variable that is not defined : Unticked

- Automatically create variables in Script Editor : Ticked

Link to comment
Share on other sites

Is it possible that the original variable %acctnumber% was defined as other than a text variable, e.g. integer? I've experienced this problem once, where a text variable I expected MEP to create for me was created as an integer. I suspect there's a command somewhere which either handles variables of more than one type, or is simply fooling MEP into creating a new variable of the wrong type.

Of course, for this to be relevant, you need to have the following settings:

- Prompt the user to create a variable that is not defined : Unticked

- Automatically create variables in Script Editor : Ticked

Thanks Paul, unfortunately, the prompt is enabled, so that doesn't qualify. Additionally, the macro worked fine until just before I posted that thread. It is extremely bizarre.

 

Should that troublesome variable be Global?

I don't see why not. When I first built the macro I was using Save/Restore commands to make sure the contents of the variable were available to other macros (note the other macro I mentioned that was also effected by the strange error). Global had to be checked in order for Save/Restore to function at all.

 

Now that I'm saving to the registry, it shouldn't matter whether it's global or local, the registry shouldn't care one way or another. Unless I'm mistaken, which is possible, I'm far from registry-savvy.

Link to comment
Share on other sites

I just lost another custom variable. While replying to another thread, I lost %cb% as a variable. Is nobody else experiencing this at all? I can't imagine it's just me. The macro was working fine, I was using it as part of a clipboard function to copy a specific bit of text from point A to point B, and then on the third run I got the same error as originally shown above, only replace %cb% for %acctnumber%. It hasn't worked since.

Link to comment
Share on other sites

I just lost another custom variable. While replying to another thread, I lost %cb% as a variable. Is nobody else experiencing this at all? I can't imagine it's just me. The macro was working fine, I was using it as part of a clipboard function to copy a specific bit of text from point A to point B, and then on the third run I got the same error as originally shown above, only replace %cb% for %acctnumber%. It hasn't worked since.

 

Yeah, every now and then I get that same error message for a variable at runtime (for me, though, it always happens at first run, never suddenly appearing after successful runs).

 

My workaround, when my variables are getting the values I want (i.e., everything's working fine except for the flippin' variable error), is to switch off the "Halt Macro" for that error. (From "Variable Set String" window, the "On Error" tab, there's a combobox for every error type to tell MEP how to respond.) Change it from "Halt Macro" to "Ignore Error", and see if that gets your macro to run successfully.

Link to comment
Share on other sites

Perhaps the text on the clipboard contains percent signs? In the past this was a big problem and I thought they were mostly fixed but back then I would have problems because I would copy a bunch of financial data and MEP would get upset because it thought that a string like "The project is 90% to 100% done" and think that "% to 100%" was a variable.

Link to comment
Share on other sites

Perhaps the text on the clipboard contains percent signs? In the past this was a big problem and I thought they were mostly fixed but back then I would have problems because I would copy a bunch of financial data and MEP would get upset because it thought that a string like "The project is 90% to 100% done" and think that "% to 100%" was a variable.

Usually the text is just a string of numbers 5-10 characters long. It's something very mysterious. I can change the name of the variable and it will work fine. If I change it back it stops working again. But if I wait a while (possibly rebooting the mean time - I haven't been able to specifically hunt it down), and then change it back, it works again. It's one of those weird bugs that is not always what it seems.

Link to comment
Share on other sites

Given your other posts on clipboard issues I think you need to fix that first.

I want to tell you to shut up :angry: . But you're probably right :unsure: . I think each time MEP has given me this error it has been in relation to a clipboard-event (like the one in my original example, which had me setting the variable from the clipboard).

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