Jump to content
Macro Express Forums

Need Clarification on Incrementing Text Variables


stevecasper

Recommended Posts

Hi,

 

I've been using this forum off and on for several weeks though this is the first I've posted. I've been using Macro

Express at work for between 4-5 years now, and just a few weeks ago I purchased a license for at home (I've

become somewhat addicted to ME).

 

Right now I'm attempting to develop a process for work that will help me collect, save, and retrieve information.

So far I've got a working set-up, but it's unbearably long.

 

Here's the basic gist:

 

I run Macro#1 which, through prompts and various screen-scraping, collects a series of information. The end of the

macro pastes all the information into a word document, which I then have to print out for hard-copy record-keeping.

 

Macro #2 (which I will eventually just append to the end of Macro #1), saves the text of the word document to a

text-file titled from one of the prompts of Macro #1.

 

Macro #3 is the bear. This macro finds the text-file, then processes line by line the information on it. Since I only

need the information which falls after the colon on each line, getting the important information from each line isn't

a problem at all. The problem is in the unmanageable length of the macro itself.

 

I built a test macro using my first, middle, and last names; my wife's names, our baby's first and middle names and

the month and year of her birth. It works fine, but it's only 10 lines of processed text, and yet the macro itself is

insanely long and is going to be an immensely overwhelming task to convert for work (which is going to need at least

twice as many processes).

 

Here's the part of the macro that I'm trying to make more manageable:

 

<BTFBEG:004:N00003:000001:%T2%><NMVAR:08:03:0:0000001:0:0000000><NMVAR:08:03:0:0000001:0:0000000><IVAR2:01:13:4::><IVAR2:02:12:4><NMVAR:01:01:1:0000001:2:0000001><TMVAR2:11:04:00:001:N01:><TMVAR2:10:04:04:001:N02:><TMVAR2:01:04:00:000:000:><IVAR2:01:12:4><NMVAR:01:01:1:0000001:2:0000001><TMVAR2:15:04:00:%N1%:000:><BTFEND>[/

Link to comment
Share on other sites

Ok, I think I got it.

 

So often I see posts where the person in need figures out their problem but fails to post what it was that they

did to fix it... well I want to see what I can to do help anybody else who's having the same problem as me.

 

Here's the updated code:

 

<BTFBEG:004:N00003:000000:%T2%><IVAR2:01:13:4::><NMVAR:01:01:1:0000001:2:0000001><TMVAR2:11:04:00:001:N01:><TMVAR2:01:04:00:000:000:><IFVAR2:1:04:2:><IVAR2:01:12:4><NMVAR:01:01:1:0000001:2:0000001><TMVAR2:15:04:00:%N1%:000:><TVAR2:05:01:<TVAR2:%N4%:01:%T4%\s>><RUNMACVAR:5><NMVAR:08:04:0:0000001:0:0000000><ENDIF><BTFEND>

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