Jump to content
Macro Express Forums
GRichard

nubie needs help with Variable Integer commands

Recommended Posts

Let me make this clear from the start. I know almost nothing about this program or computers in general. I stumbled on Marco Express thru a net search engine and realized it might be the answer I need. I have played with it for several hours a day for the past 3 days and quite frankly I am lost.

 

I wrote to Macro Express and they told me what I want to do can be done by Macro Express then went into computer talk about Variable Integers and Save Integers and several other things that might as well have been writen in Greek. I didnt understand a word of it but I did catch the part where the mentioned that IT CAN BE DONE. Now thats the part I was looking for! I have ordered a copy of the license and here I am searching for a pile of help.

 

I have played with the program enough so I CAN get what I need by hitting the hot key and typing in the last 2 numbers and pressing return to print this to the screen but there has to be a better way.

 

Let me explain what I would like to do:

 

You have a serial number like this: A00000001A I need to call this number with a hot key (lets use the SPACE BAR as the hot key) and each time I call this number I need it to increase by 1.

 

As in:

 

A00000001A

 

A00000002A

 

A00000003A and so on...........

 

Also, I need to be able to set the letters and numbers to where I would like the program to start. As an example I might like to start with A012345678B then continue my hotkey-driven numbering sequence with A012345679B A012345680B ect.

 

It is NOT necessary to have the program ask me for the starting numbers and letters because I could very easily (I think) edit the macro with Direct Editor at the beginning of each secession. Compaired to what I am doing now, this editing would not be a hardship in the least! On second thought, you might want to let me know how to set the numbers to begin with. I am looking at this forum screen and the only thing I full understand is the box I am supposed to type my question into!

 

I would much appreciate you’re help with the code that I need. Please keep in mind if you do send me code, I will need explicit, and I do mean explicit, instructions on what to do with it! I know next to nothing (or maybe even a little less than that!) about computer programs.

 

Thanks in advance for your time and trouble

 

GRichard

Share this post


Link to post
Share on other sites
Let me explain what I would like to do:

 

You have a serial number like this: A00000001A I need to call this number with a hot key (lets use the SPACE BAR as the hot key) and each time I call this number I need it to increase by 1.

 

As in:

 

A00000001A

 

A00000002A

 

A00000003A and so on...........

 

Also, I need to be able to set the letters and numbers to where I would like the program to start. As an example I might like to start with A012345678B then continue my hotkey-driven numbering sequence with A012345679B A012345680B ect.

 

It is NOT necessary to have the program ask me for the starting numbers and letters because I could very easily (I think) edit the macro with Direct Editor at the beginning of each secession. Compaired to what I am doing now, this editing would not be a hardship in the least! On second thought, you might want to let me know how to set the numbers to begin with. I am looking at this forum screen and the only thing I full understand is the box I am supposed to type my question into!

 

I would much appreciate you’re help with the code that I need. Please keep in mind if you do send me code, I will need explicit, and I do mean explicit, instructions on what to do with it! I know next to nothing (or maybe even a little less than that!) about computer programs.

 

Thanks in advance for your time and trouble

 

GRichard

 

 

Hello,

 

I had to make an assumption about your serial number that it always starts with a letter and ends with a letter. If this assumption is correct, then this code should work. The output is displayed in a text box. However, it would be possible to have the output saved to a text file. The macro could generate hundreds or thousands of serial numbers quickly, all showing up in a text file.

 

<REM2:><MENU2:2:T:21:CenterCenter:First letter in serial number:Please choose which letter this serial number begins with:A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z><MENU2:2:T:22:CenterCenter:Last letter in serial number:Please choose which letter this serial number ends with:A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z><TVAR2:01:02:FPlease enter the serial number here:

ie: A00000001AFFCenter:Center><TMVAR2:09:11:01:000:000:><TMVAR2:01:01:00:000:000:><IFVAR2:1:01:7:TA><TMVAR2:21:01:01:000:000:A><ENDIF><IFVAR2:1:01:7:TB><TMVAR2:21:01:01:000:000:B><ENDIF><IFVAR2:1:01:7:TC><TMVAR2:21:01:01:000:000:C><ENDIF><IFVAR2:1:01:7:TD><TMVAR2:21:01:01:000:000:D><ENDIF><IFVAR2:1:01:7:TE><TMVAR2:21:01:01:000:000:E><ENDIF><IFVAR2:1:01:7:TF><TMVAR2:21:01:01:000:000:F><ENDIF><IFVAR2:1:01:7:TG><TMVAR2:21:01:01:000:000:G><ENDIF><IFVAR2:1:01:7:TH><TMVAR2:21:01:01:000:000:H><ENDIF><IFVAR2:1:01:7:TI><TMVAR2:21:01:01:000:000:I><ENDIF><IFVAR2:1:01:7:TJ><TMVAR2:21:01:01:000:000:J><ENDIF><IFVAR2:1:01:7:TK><TMVAR2:21:01:01:000:000:K><ENDIF><IFVAR2:1:01:7:TL><TMVAR2:21:01:01:000:000:L><ENDIF><IFVAR2:1:01:7:TM><TMVAR2:21:01:01:000:000:M><ENDIF><IFVAR2:1:01:7:TN><TMVAR2:21:01:01:000:000:N><ENDIF><IFVAR2:1:01:7:TO><TMVAR2:21:01:01:000:000:O><ENDIF><IFVAR2:1:01:7:TP><TMVAR2:21:01:01:000:000:P><ENDIF><IFVAR2:1:01:7:TQ><TMVAR2:21:01:01:000:000:Q><ENDIF><IFVAR2:1:01:7:TR><TMVAR2:21:01:01:000:000:R><ENDIF><IFVAR2:1:01:7:TS><TMVAR2:21:01:01:000:000:S><ENDIF><IFVAR2:1:01:7:TT><TMVAR2:21:01:01:000:000:T><ENDIF><IFVAR2:1:01:7:TU><TMVAR2:21:01:01:000:000:U><ENDIF><IFVAR2:1:01:7:TV><TMVAR2:21:01:01:000:000:V><ENDIF><IFVAR2:1:01:7:TW><TMVAR2:21:01:01:000:000:W><ENDIF><IFVAR2:1:01:7:TX><TMVAR2:21:01:01:000:000:X><ENDIF><IFVAR2:1:01:7:TY><TMVAR2:21:01:01:000:000:Y><ENDIF><IFVAR2:1:01:7:TZ><TMVAR2:21:01:01:000:000:Z><ENDIF><REM2:><IVAR2:05:12:1><TMVAR2:05:01:01:000:000:><NMVAR:08:01:0:0000001:0:0000000><NMVAR:05:01:0:0000001:0:0000000><IVAR2:06:12:1><NMVAR:02:02:1:0000005:1:0000006><REM2:><TMVAR2:07:10:00:000:000:%T21%><REP3:05:000001:000001:0002:1:03:><TMVAR2:07:10:00:000:000:0><ENDREP><TMVAR2:07:10:00:000:000:%T1%><TMVAR2:07:10:00:000:000:%T22%><REM2:><TBOX4:T:1:CenterCenter000278000200:000:OutputYou entered:

%T11%

Macro created:

%T10%><REM2:>

Share this post


Link to post
Share on other sites

Since you are new to Macro express, I thought I would also explain that you need to copy the code above starting with "<REM2" and continuing to the end of the post. Once you have copied it (control-C), open up macro express, go to the Scripting editor, click in white space underneath "Macro Script". Then paste (control-V).

 

While in the scripting editor, if you move from the "script" tab to the "properties" tab, you can give the macro a name, and assign whatever hotkey activation you want. (I would not recommend using the spacebar. Instead, i would use control+shift+spacebar, or even win+spacebar).

 

You can then save the macro by clicking on File Menu and choosing save, or simply typing control+S.

 

I hope this macro accomplishes what you need!

Share this post


Link to post
Share on other sites
Since you are new to Macro express, I thought I would also explain that you need to copy the code above starting with "<REM2" and continuing to the end of the post. Once you have copied it (control-C), open up macro express, go to the Scripting editor, click in white space underneath "Macro Script". Then paste (control-V).

 

While in the scripting editor, if you move from the "script" tab to the "properties" tab, you can give the macro a name, and assign whatever hotkey activation you want. (I would not recommend using the spacebar. Instead, i would use control+shift+spacebar, or even win+spacebar).

 

You can then save the macro by clicking on File Menu and choosing save, or simply typing control+S.

 

I hope this macro accomplishes what you need!

 

WOW! Thanks! That letter menu is great and you are correct about the number not always starting or ending with 'A'.

 

I copy/paste like you mentioned (thanks for the details on copy from REM, I needed that) and got the macro to run but when it runs it opens its own box in the center of the screen and prints the letter/number in that box. Also it prints only once, then when I hit the hot key again it will cycle back to the letter menu again. Also, the numbers will not print to a cell in Excel. Is this because I am doing something wrong?

 

To sum up:

 

1. I need it to print to a cell in Excel. The maco needs to repeat with the hotkeys (using both first chosen letters) as many times as I need acending numbers (usually 100 but sometimes 1000+) with the letters staying with what I chose when I first started the program (A-A, B-D, or whatever I first slected)

 

2. Each time I hit the hotkey, have the number add one and print the result to an Excel cell with an ENTER key so the next hotkey number in the sequence will print in the next cell down. Hit the key again, the letters stay the same, the number goes up by 1, prints to the cell and then moves to the next cell. Hit the key again and again and again ect.

 

I would like to start with say A0000001A (both letters will not always be 'A' so keep both letter menus!) and will not always be 00000001 so keep the number box also!) and each time I hit the hotkey have the number add one and print the result to an Excel cell followed by the ENTER key so the next hotkey number in the sequence will print in the next cell down.

 

As for the spacebar, it is handy for me to use as a hotkey. I can always disable Macros when I am done, that is, have the correct number of excel cells (hotkey presses). This Macro will be a stand alone program used to generate number/letter combations in an excell program. All the rest of the data will be added later by hand.

Share this post


Link to post
Share on other sites
WOW! Thanks! That letter menu is great and you are correct about the number not always starting or ending with 'A'.

 

I copy/paste like you mentioned (thanks for the details on copy from REM, I needed that) and got the macro to run but when it runs it opens its own box in the center of the screen and prints the letter/number in that box. Also it prints only once, then when I hit the hot key again it will cycle back to the letter menu again. Also, the numbers will not print to a cell in Excel. Is this because I am doing something wrong?

 

To sum up:

 

1. I need it to print to a cell in Excel. The maco needs to repeat with the hotkeys (using both first chosen letters) as many times as I need acending numbers (usually 100 but sometimes 1000+) with the letters staying with what I chose when I first started the program (A-A, B-D, or whatever I first slected)

 

2. Each time I hit the hotkey, have the number add one and print the result to an Excel cell with an ENTER key so the next hotkey number in the sequence will print in the next cell down. Hit the key again, the letters stay the same, the number goes up by 1, prints to the cell and then moves to the next cell. Hit the key again and again and again ect.

 

I would like to start with say A0000001A (both letters will not always be 'A' so keep both letter menus!) and will not always be 00000001 so keep the number box also!) and each time I hit the hotkey have the number add one and print the result to an Excel cell followed by the ENTER key so the next hotkey number in the sequence will print in the next cell down.

 

As for the spacebar, it is handy for me to use as a hotkey. I can always disable Macros when I am done, that is, have the correct number of excel cells (hotkey presses). This Macro will be a stand alone program used to generate number/letter combations in an excell program. All the rest of the data will be added later by hand.

 

I seem to have lost MarcoPolo. Anybody else want to lend a hand? The above code is close to what I need but not exactly......

Share this post


Link to post
Share on other sites
WOW! Thanks! That letter menu is great and you are correct about the number not always starting or ending with 'A'.

 

I copy/paste like you mentioned (thanks for the details on copy from REM, I needed that) and got the macro to run but when it runs it opens its own box in the center of the screen and prints the letter/number in that box. Also it prints only once, then when I hit the hot key again it will cycle back to the letter menu again. Also, the numbers will not print to a cell in Excel. Is this because I am doing something wrong?

 

To sum up:

 

1. I need it to print to a cell in Excel. The maco needs to repeat with the hotkeys (using both first chosen letters) as many times as I need acending numbers (usually 100 but sometimes 1000+) with the letters staying with what I chose when I first started the program (A-A, B-D, or whatever I first slected)

 

2. Each time I hit the hotkey, have the number add one and print the result to an Excel cell with an ENTER key so the next hotkey number in the sequence will print in the next cell down. Hit the key again, the letters stay the same, the number goes up by 1, prints to the cell and then moves to the next cell. Hit the key again and again and again ect.

 

I would like to start with say A0000001A (both letters will not always be 'A' so keep both letter menus!) and will not always be 00000001 so keep the number box also!) and each time I hit the hotkey have the number add one and print the result to an Excel cell followed by the ENTER key so the next hotkey number in the sequence will print in the next cell down.

 

As for the spacebar, it is handy for me to use as a hotkey. I can always disable Macros when I am done, that is, have the correct number of excel cells (hotkey presses). This Macro will be a stand alone program used to generate number/letter combations in an excell program. All the rest of the data will be added later by hand.

 

 

OK, i'll post the updated code in a separate post below. Sorry for the delay, I was gone on a business trip.

 

With Macro Express and Excel, I haven't had much luck getting the two programs to work smoothly together. Trying to get macro express to paste one piece of data in one cell, then advance to another cell, and paste more data can be tedious. It also leaves more room for error if there is a macro delay causing the wrong cell to become activated.

 

Having said that, I know if you have a vertical list of data and you copy all of it at once, and then paste it in the first cell in Excel, it will achieve the same results as if you had pasted data in cell A1, then A2, A3, etc. etc. Pasting information straight from the windows clipboard is also much faster than trying to get macro express to copy paste, copy paste... one piece of data at a time.

 

I don't have Microsoft Excel installed on my home computer, however I was able to test the macro with google docs (google's online version of a spreadsheet program). I tested the macro having it increment 100 times and then 1000 times. Needless to say the macro is very fast and easy to use.

 

The macro works just as before. Select a beginning letter per your criteria, then select an ending letter per your criteria; then copy in the serial number you want to start with. The new thing with this macro is that it will now ask you how many times you want the serial number to increment (ie: 100 times 1000 times, etc). You can enter any integer you want.

 

Instantly, you will see a pop-up message saying the macro is complete and the results have been copied to the windows clipboard. From here, you can open up excel, insert your cursor in the first cell, and then use windows paste. It will paste all the data downward (vertically).

 

Your original post didn't mention anything about excel, so I hope this new version is more useful for you.

Share this post


Link to post
Share on other sites

<REM2:><CLIPE><REM2:Set Environment variable "CRLF" to cr/lf characters><ASCIIC:2:1:10><ASCIIC:3:1:13><TMVAR2:08:03:02:000:000:><TMVAR2:19:03:00:000:000:CRLF><REM2:><MENU2:2:T:21:CenterCenter:First letter in serial number:Please choose which letter this serial number begins with:A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z><MENU2:2:T:22:CenterCenter:Last letter in serial number:Please choose which letter this serial number ends with:A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z><TVAR2:01:02:FPlease enter the serial number here:

ie: A00000001AFFCenter:Center><TMVAR2:01:01:00:000:000:><TMVAR2:09:91:01:000:000:><IFVAR2:1:01:7:TA><TMVAR2:21:01:01:000:000:A><ENDIF><IFVAR2:1:01:7:TB><TMVAR2:21:01:01:000:000:B><ENDIF><IFVAR2:1:01:7:TC><TMVAR2:21:01:01:000:000:C><ENDIF><IFVAR2:1:01:7:TD><TMVAR2:21:01:01:000:000:D><ENDIF><IFVAR2:1:01:7:TE><TMVAR2:21:01:01:000:000:E><ENDIF><IFVAR2:1:01:7:TF><TMVAR2:21:01:01:000:000:F><ENDIF><IFVAR2:1:01:7:TG><TMVAR2:21:01:01:000:000:G><ENDIF><IFVAR2:1:01:7:TH><TMVAR2:21:01:01:000:000:H><ENDIF><IFVAR2:1:01:7:TI><TMVAR2:21:01:01:000:000:I><ENDIF><IFVAR2:1:01:7:TJ><TMVAR2:21:01:01:000:000:J><ENDIF><IFVAR2:1:01:7:TK><TMVAR2:21:01:01:000:000:K><ENDIF><IFVAR2:1:01:7:TL><TMVAR2:21:01:01:000:000:L><ENDIF><IFVAR2:1:01:7:TM><TMVAR2:21:01:01:000:000:M><ENDIF><IFVAR2:1:01:7:TN><TMVAR2:21:01:01:000:000:N><ENDIF><IFVAR2:1:01:7:TO><TMVAR2:21:01:01:000:000:O><ENDIF><IFVAR2:1:01:7:TP><TMVAR2:21:01:01:000:000:P><ENDIF><IFVAR2:1:01:7:TQ><TMVAR2:21:01:01:000:000:Q><ENDIF><IFVAR2:1:01:7:TR><TMVAR2:21:01:01:000:000:R><ENDIF><IFVAR2:1:01:7:TS><TMVAR2:21:01:01:000:000:S><ENDIF><IFVAR2:1:01:7:TT><TMVAR2:21:01:01:000:000:T><ENDIF><IFVAR2:1:01:7:TU><TMVAR2:21:01:01:000:000:U><ENDIF><IFVAR2:1:01:7:TV><TMVAR2:21:01:01:000:000:V><ENDIF><IFVAR2:1:01:7:TW><TMVAR2:21:01:01:000:000:W><ENDIF><IFVAR2:1:01:7:TX><TMVAR2:21:01:01:000:000:X><ENDIF><IFVAR2:1:01:7:TY><TMVAR2:21:01:01:000:000:Y><ENDIF><IFVAR2:1:01:7:TZ><TMVAR2:21:01:01:000:000:Z><ENDIF><REM2:><REM2:vvvvv----- Repeat here><REM2:><TMVAR2:07:33:00:000:000:%T91%><TMVAR2:07:33:00:000:000:%CRLF%><REM2:><REM2:><IVAR2:05:12:1><REM2:><IVAR2:33:02:FHow many times would you like %T91% to increment? (ie: 1000)FTCenter:Center><NMVAR:02:33:1:0000033:2:0000001><REP3:05:000001:000001:0033:0:01:><REM2:><TMVAR2:05:01:01:000:000:><REM2:><NMVAR:08:01:0:0000001:0:0000000><REM2:><NMVAR:05:01:0:0000001:0:0000000><IVAR2:06:12:1><NMVAR:02:02:1:0000005:1:0000006><REM2:><TMVAR2:07:10:00:000:000:%T21%><REP3:05:000001:000001:0002:1:03:><TMVAR2:07:10:00:000:000:0><ENDREP><TMVAR2:07:10:00:000:000:%T1%><TMVAR2:07:10:00:000:000:%T22%><REM2:><TMVAR2:07:33:00:000:000:%T10%><TMVAR2:07:33:00:000:000:%CRLF%><REM2:><TMVAR2:05:10:01:000:000:><TVAR2:10:01:><REM2:><ENDREP><REM2:^^^^^----- Repeat here><REM2:><TMVAR2:16:33:00:000:000:><REM2:><TBOX4:T:1:CenterCenter000278000200:000:Output copied to clipboard%T91% was incremented %N33% times.

 

This information has been saved to your clipboard.

 

To paste it into Excel, select the first cell, and then use windows paste to paste the results downward.><REM2:>

Share this post


Link to post
Share on other sites

I really like this Macro Express program. It is the answer to my problem. I have one person sit down at the computer and type for a couple hours a day for 2 or 3 days a month. Needless to say this program will cut down on my computer time. The only problem is, I know so little about the program, how to write it and how it works, that the questions I ask and my explanation of what I need, is translated by the expert programmer (YOU) to something I didn’t foresee.

 

I copy/paste the info of your latest revision into Macro Express and the program does exactly what you said it would. I pick a first letter, I pick a second letter, I input a starting number, I choose how many times I want the number to repeat and presto, excel is full of numbers. Excellent job on the program. It works perfectly, it works just as you said it would and you are to be commended on your Macro skills (I have a sneaking suspicion there is voodoo involved but can’t prove it). The program works great BUT…

 

Bare with me here. I will try to explain exactly what I need. Keep in mind that any fumbling and confusion is my fault. I know so little about this Macro program that I don’t know how to explain what I need and make it clear to someone that is very good with the program. Ever take a test in school and come to a question that you don’t understand? Well that’s where I am. Not only do I not know the answer but the question itself makes me confused! OK, here is what I need.

 

I need to choose the first letter. (You have that)

I need to choose the second letter. (You have that)

I need to type in the first set of 8 numbers. (You have that)

 

THEN:

When I hit the macro key, I need that letter/number combination to print to the screen. Do nothing else, just print to the screen.

 

Then I want to manually hit return which will cause the curser drop to the next cell down. (Excel will auto do this movement when enter is pressed)

 

Then I want to hit the macro key again and have it print the next number/letter combination in line (without having to repeat choosing the letters and number I want) and have it print that to the cell and wait for me to hit enter so it will move to the next line.

 

I need the program to do this as many times as I need (it will vary and you need not ask me how many letter number combos I need) until I have enough numbers then I can hit disable and shut the program off when I reach the number of consecutive numbered cells I need.

 

As the program is written now, it asks me for, and prints any number of consecutive serial numbers I want but its prints them all at once when I paste. I don’t want to have to use paste; it slows everything down a whole bunch. I need it to stop with one number/letter combination until I hit return then when I hit the hot key again, print the next number/letter in the sequence and wait for me to press return again. Also I would like to choose the first letter and second letter and the starting serial number only once for each session regardless of how long that session (how ever many consecutive numbers I need) lasts.

 

Here is where my lack of program knowledge comes into play….. I don’t know how to ask for exactly what I want. Hmmmmmm…..

 

 

Say I want to print 11 numbers to the excel cells. I choose the first letter call it A, I choose the second letter call it B, I choose the starting number lets call it 00000001.

 

When I press the hot key I would like it to print A00000001B in the first cell and then have the program stop and wait. I will then manually press enter and this will shift the curser down to the next cell.

 

Then I would like to press the hot key again (without having to go thru the first letter, second letter, number selection routine over again or go thru the paste routine) and have it print the next combo in line which would be A00000002B.

 

Again I manually hit enter, the curser drops down to the next cell and when I press the hot key again the program will print A00000003B and wait. I will then press enter to move the curser down in excel.

 

When I come to the end of my secession which in this case would be cell number 11 containing serial number A00000012B, I would just then choose disable Macro Express from the menu and end the program.

 

To recap, this is a stand alone program, used to generate consecutive serial numbers of my choosing, (regardless of how many I need), each hot key press will print the next in line number/letter combo and will stop. After I press enter I will press the hot key again which will print the next in line letter/number combo. I will repeat the hotkey/manual enter routine until I come to the end and then manually shut off the program. You do not need to add a subroutine to end the program or any other routine to make what you think would be improvements. I get confused by improvements! A stripped down, bare bones working program with minimum fuss is better than a highly refined polished production. Who knows, some day if the sun rises in the WEST I just might understand this thing.

 

I apologize for being receptive in my statements and maybe sounding like I am giving instructions to a child. Matter of fact I really am talking to a child but the child is ME. I feel I must write this way to get everything straight in my mind so I have at least a 1% chance of explaining to you what I need.

 

Thanks for your time.

Share this post


Link to post
Share on other sites
THEN:

When I hit the macro key, I need that letter/number combination to print to the screen. Do nothing else, just print to the screen.

 

Then I want to manually hit return which will cause the curser drop to the next cell down. (Excel will auto do this movement when enter is pressed)

 

Then I want to hit the macro key again and have it print the next number/letter combination in line (without having to repeat choosing the letters and number I want) and have it print that to the cell and wait for me to hit enter so it will move to the next line.

 

I need the program to do this as many times as I need (it will vary and you need not ask me how many letter number combos I need) until I have enough numbers then I can hit disable and shut the program off when I reach the number of consecutive numbered cells I need.

 

I wish I had more 'spare time' to offer to work on this. While i'm not sure exactly why you want to create 1000 serial numbers and have the macro pause after it types each one in individually, I am certain that the windows clipboard copy/paste is much faster at entering the data into excel than having the macro enter them in seperately one at a time waiting for a key to be pressed.

 

If I had the time to continue helping you with this macro, I would have tried something along the lines where the macro creates the 1000 serial numbers and stores them to a text file. Then have the macro loop through that text file, line by line, and do what you are now asking. However, one limitation of Macro Express is that you cannot run a 2nd macro when the first macro is running/in use.

 

It sounds like you have a very very specific function that you want to implement. This will most likely require more time and detail to getting the macro to work 100% to your expectations. I apologize for not having the 'spare time' to do this for you.

 

I know the help files that came with macro express are pretty detailed. I learned to use Macro Express almost exclusively from trial and error and reading the help documents. I understand there is also a decent book available called "Macro Express Explained". Everyone who talks about it on these forums speaks highly of it. I also understand you can purchase it as a download file if you prefer. Learning how to use Macro Express really comes easy. I find myself learning new things about Macro Express every day (and i've been using Macro Express for about 8 years, and Keyboard express for 2 years prior to that).

 

While I dont have the 'spare time' right now to continue, i'm sure there must be someone who reads these forums that knows how to accomplish your request.

 

Good luck!

Share this post


Link to post
Share on other sites
While I dont have the 'spare time' right now to continue, i'm sure there must be someone who reads these forums that knows how to accomplish your request.

 

Good luck!

 

Anyone else care to take a crack at this?

Share this post


Link to post
Share on other sites
Anyone else care to take a crack at this?
OK. But I'm not going to read all the posts so forgive me if I missed something in there. It's just that there's a lot there that's hard to follow especially with that word wrap problem.

 

I would have two macros, one to set the start letter, end letter, and serial number and one to actually paste the values. The first would be launched by CRTL+Num2 and would store the values in the registry. Also it would seed from the last time you ran it so you only have to type the changes. The next one CRTL+Num1 would read those reg values in each time you ran it, pad out the serial part, and paste. Then increment the serial and store in the registry. Simple. Like I said I didn't read the posts so tell me what you think of this and how it doesn't fit your needs.

Serial.mex

Share this post


Link to post
Share on other sites
OK. But I'm not going to read all the posts so forgive me if I missed something in there. It's just that there's a lot there that's hard to follow especially with that word wrap problem.

 

I would have two macros, one to set the start letter, end letter, and serial number and one to actually paste the values. The first would be launched by CRTL+Num2 and would store the values in the registry. Also it would seed from the last time you ran it so you only have to type the changes. The next one CRTL+Num1 would read those reg values in each time you ran it, pad out the serial part, and paste. Then increment the serial and store in the registry. Simple. Like I said I didn't read the posts so tell me what you think of this and how it doesn't fit your needs.

 

******** Since Posting as below I have played with the macro and worked it out **********

 

Again Cory THANKS it works great

 

Eno

 

******************************************************************************

Cory, I was looking for something like this, So Thanks.

What I would like and don't know how to do it is have the choice of setting the number that it outputs with as many or as few zeros as I need

ie: 001 or 00000000001

 

Like GRichard I also need it as simple as possible, or as you kindly did before and posted a link for a download of your macro.

 

Thanks Eno

Share this post


Link to post
Share on other sites
******** Since Posting as below I have played with the macro and worked it out **********

 

Again Cory THANKS it works great

 

Eno

 

******************************************************************************

Cory, I was looking for something like this, So Thanks.

What I would like and don't know how to do it is have the choice of setting the number that it outputs with as many or as few zeros as I need

ie: 001 or 00000000001

 

Like GRichard I also need it as simple as possible, or as you kindly did before and posted a link for a download of your macro.

 

Thanks Eno

Hi Eno,

 

I don't believe Cory monitors this particular forum anymore (he's now primarily found on the ME Pro forum), however, what you

want to do is fairly easy. I don't have a great deal of time to go over everything in this particular post, but I can show you how

to set a macro to add as many or few 0's to the beginning of a number as you desire.

 

This exact code probably won't be what you need for your macro, but it will help you understand the logic necessary to do what

you need, so you can build it using the technique shown.

 

Scripting Editor:

Variable Set String %T1% "1"
Variable Set String %T1% from Prompt
Variable Set Integer %N2% from Length of Variable %T1%
Variable Set Integer %N1% to 10
Variable Set Integer %N1% from Prompt
Variable Modify Integer: %N3% = %N1% - %N2%
Variable Set String %T2% ""
Repeat with Variable using %N3%
 Variable Modify String: Append "0" to %T2%
Repeat End
Variable Modify String: Append "%T1%" to %T2%
Text Box Display: Final Result

Direct Editor

<TVAR2:01:01:1><TVAR2:01:02:FWhat number would you like to prefix 0s to?FFCenter:Center><IVAR2:02:12:1><IVAR2:01:01:10><IVAR2:01:02:FHow many digits should your number be once the 0s have been added?FFCenter:Center><NMVAR:02:03:1:0000001:1:0000002><TVAR2:02:01:><REP3:05:000001:000001:0003:0:01:><TMVAR2:07:02:00:000:000:0><ENDREP><TMVAR2:07:02:00:000:000:%T1%><TBOX4:T:1:CenterCenter000278000200:000:Final Result%T2%>

Share this post


Link to post
Share on other sites

Steve's code is good but it can be simplified:

Variable Set String %T1% "1"
Variable Set String %T1% from Prompt
Variable Set Integer %N1% to 10
Variable Set Integer %N1% from Prompt

Variable Modify String: Pad Left %T1%  // pad left with spaces to make the length equal to %N1%
Replace " " with "0" in %T1% // change spaces to 0's
Text Box Display: Final Result

 

<TVAR2:01:01:1><TVAR2:01:02:FWhat number would you like to prefix 0s to?FFCenter:Center><IVAR2:01:01:10><IVAR2:01:02:FHow many digits should your number be once the 0s have been added?FFCenter:Center><REM2:><TMVAR2:14:01:00:%N1%:000:><TMVAR2:21:01:01:000:000: 0><TBOX4:T:1:CenterCenter000278000200:000:Final Result%T1%>

Share this post


Link to post
Share on other sites
Steve's code is good but it can be simplified:
Variable Set String %T1% "1"
Variable Set String %T1% from Prompt
Variable Set Integer %N1% to 10
Variable Set Integer %N1% from Prompt

Variable Modify String: Pad Left %T1%  // pad left with spaces to make the length equal to %N1%
Replace " " with "0" in %T1% // change spaces to 0's
Text Box Display: Final Result

 

<TVAR2:01:01:1><TVAR2:01:02:FWhat number would you like to prefix 0s to?FFCenter:Center><IVAR2:01:01:10><IVAR2:01:02:FHow many digits should your number be once the 0s have been added?FFCenter:Center><REM2:><TMVAR2:14:01:00:%N1%:000:><TMVAR2:21:01:01:000:000: 0><TBOX4:T:1:CenterCenter000278000200:000:Final Result%T1%>

D'OH! That's brilliant! Why didn't I think of that!

 

Now I have to go in and simplify all the macros using that function.

 

Hmm... nah, they work just fine. But in the future, I'll know a better way!

 

Thanks, Kevin!

Share this post


Link to post
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...