Jump to content
Macro Express Forums

extraneous characters appearing out of nowhere


margaret

Recommended Posts

I'm having a problem with a macro in which, at the end of a series of string manipulations, the final resulting string is pasted into a program. The macro was working fine most of yesterday with many tests. Then suddenly it started adding an extra character to the final string that it pastes in. I put in dialog boxes to test the string throughout the macro (like the dialog tells me "T10 is now %T10%") and I can't find anywhere that this extraneous character shows up. When I test the string just before it's pasted in, it's correct!!! But when it's pasted in, the extra character appears (it is the same as another character in the string). The final string is in the format

 

Smith, J. J. (2005)

 

Last night I was getting Smmith, J. J. (2005)

Now I'm getting Smith, J. J. ((2005)

 

The final string is created by appending " (2005)" to "Smith, J. J.".

 

So the extra character is a copy of the second character in one or the other of the last two strings.

 

What the macro is doing is breaking up a long string of names from a bibliography into separate entries. This only happens with the last name in the string; the preceding names come out OK. But I've tested every step of the last loop without finding the problem. And my loops that break up and manipulate the other names don't manipulate the text of the names themselves, only the spaces, periods, and commas in order to calculate where one name ends and another begins, etc.

 

Where do I look for the problem now??

Link to comment
Share on other sites

False alarm, folks -- after I finished my previous post, I thought: this makes absolutely no sense. How can Macro Express put something into a variable that wasn't there a second ago? What if the problem is somehow in the receiving program? I changed the macro so that it pastes the last string into Notepad. It came out fine. The program I'm pasting into has some autocomplete functions. After I turned that off, everything's working right again. (It still doesn't make sense how the autocomplete could add a character unpredictably, but as long as I know it's not Macro Express's fault, that's all I need for now.)

 

Sorry to waste your time.

 

Thanks,

 

Meg

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