Jump to content
Macro Express Forums

Using random names and numbers...


fjslan
 Share

Recommended Posts

I am attempting to creating a macro that fills out a form.

 

The first step of the macro is to put a first name, (ANY RANDOM NAME).

Tab to a new line and fill in a number, (ANY RANDOM NUMBER 1 to 99999).

tab to a new line and fill in an e-mail address, this could be sticky...I would like the e-mail addres to be what the NAME was @ one of 5 domain addresses.

 

For example, if the random name chosen is BOB then the e-mail address would be "BOB@" and I would like the domain name following the "BOB@" to be chosen from one of the following domains one.com, two.com, three.com, four.com, five.com

 

I want the NAME, NUMBER, and ending of the E-MAIL to all be RANDOM.

 

??? would it be best to set up a list of names...ie. bob, sally, john, tom, dick, harry, and then have the names stored in a notpad file or is there a way to put the names, 100-200 names, it the macro itself???

 

???the number... I need the number to be 5 digits long with "0"'s instead of blank spaces in the left. I believe that this is a "pad left" comand.

 

my exp with macro exp. has been limited and "RANDOM" - "VARIABLES" - etc are very new to me. any help is great!!!

 

ps. I looked for som example or "sample" macros that show any of my requested commands and could not find any. if you can point me to the right direction I would appreciate it...

Link to comment
Share on other sites

First, please reassure us! I do hope you're not a potential mass email spammer?

 

--

Terry, East Grinstead, UK

 

Definately not a negative mass e-mail. There will be a number of e-mails sent, but, they are going to be sent to me. I own the the domains that I am using (five individual domains - see my first post.) I believe that a specifice so-called-legitimate web site is not so "legitimate" I believe that they are just a mass marketing site that just sells the e-mail addresses. By using my macro and setting up a CATCH-ALL e-mail at my 5 domains, i can enter my info 50-60 times with "random" information and the end result is that I will be getting the e-mails back to myself. I will have test my theory at least twice (one time in one week / month and the second another week / month). The macro will will just make this a bit easier.

 

As I mentioned before I have used Macro Express in a limited capacity and the more I use it and read / learn about it the more I believe that this little program, "macro express", could have exponetial possibilites with EVERYDAY applications. my biggest problem is trying learn ALL of the functions that ME does and how to apply them. I tried to actually do this using an excel file saved as a tab delimited file and did not have much luck with the programming. So, here i am asking for help with the "RANDOM" function.

 

F

Link to comment
Share on other sites

Definately not a negative mass e-mail. There will be a number of e-mails sent, but, they are going to be sent to me.

 

OK Frank, here you go:

 

I first put an arbitrary 18 names into a file called NameList1.txt, and your 5 domain name into DomainList.txt

 

Here's the macro:

 

// Randomising email addresses (for frank1968)

// Ask how many entries are needed

Variable Set Integer %N9% from Prompt

Repeat with Variable using %N9%

// Get a random number between 1 and 18 to decide the Name T1

Variable Set Integer %N1% with a Random Number

// Get a random number between 1 and 99999 to decide the Number N2

Variable Set Integer %N2% with a Random Number

// Convert the integer to a string (so that it can be padded)

Variable Modify Integer: Convert %N2% to text string %T2%

// Pad it with leading blanks

Variable Modify String: Pad Left %T2%

Replace " " with "0" in %T2%

// Get a random number between 1 and 5 to decide the Domain T3

Variable Set Integer %N3% with a Random Number

Text File Begin Process: "NameList1.txt"

Text File End Process

Text File Begin Process: "DomainList.txt"

Text File End Process

// Activate the form (in this case a Notepad document)

Activate Window: "RandomEmailForFrank.txt - Notepad"

// Enter the first two line (Name & Number)

Text Type: %T1%<ENTER>

Text Type: %T2%<ENTER>

// Create the email adress and enter it as the third line

Variable Set String %T4% ""

Variable Modify String: Append "%T1%@%T3%" to %T4%

Text Type: %T4%<ENTER><ENTER>

// Repeat the loop again, until all the required entries have been made

Repeat End

Macro Return

 

Here's the direct code:

 

<REM2:Randomising email addresses (for frank1968)><REM2:Ask how many entries are needed><IVAR2:09:02:FHow many random entries do you want?FFCenter:Center><REP3:05:000001:000001:0009:0:01:><REM2:Get a random number between 1 and 18 to decide the Name T1><IVAR2:01:06:18><REM2:Get a random number between 1 and 99999 to decide the Number N2><IVAR2:02:06:99999><REM2:Convert the integer to a string (so that it can be padded)><NMVAR:05:02:0:0000002:0:0000000><REM2:Pad it with leading blanks><TMVAR2:14:02:00:005:000:><TMVAR2:21:02:01:000:000: 0><REM2:Get a random number between 1 and 5 to decide the Domain T3><IVAR2:03:06:5><BTFBEG:001:N00001:000001:C:\Docs\SUNDRY\Macro Express\NameList1.txt><BTFEND><BTFBEG:003:N00003:000001:C:\Docs\SUNDRY\Macro Express\DomainList.txt><BTFEND><REM2:Activate the form (in this case a Notepad document)><ACTIVATE2:RandomEmailForFrank.txt - Notepad><REM2:Enter the first two line (Name & Number)><TEXTTYPE:%T1%<ENTER>><TEXTTYPE:%T2%<ENTER>><REM2:Create the email adress and enter it as the third line><TVAR2:04:01:><TMVAR2:07:04:00:000:000:%T1%@%T3%><TEXTTYPE:%T4%<ENTER><ENTER>><REM2:Repeat the loop again, until all the required entries have been made><ENDREP><MRETURN>

 

And this is what the result looks like when I specified 10:

 

Peggy

92014

Peggy@three.com

 

Mary

46249

Mary@three.com

 

Elvis

82790

Elvis@two.com

 

David

60355

David@four.com

 

Buddy

02297

Buddy@three.com

 

Buddy

64823

Buddy@one.com

 

Jim

31594

Jim@one.com

 

Luke

85162

Luke@one.com

 

Peggy

55350

Peggy@three.com

 

David

38314

David@four.com

 

(Had to edit my first attempt as I'd padded with blanks instead of zeros. Looks OK now...)

 

I've been generous with Remarks, so you should be able to see what's happening and tailor it as you wish. Come back if you need any further help.

 

--

Terry, East Grinstead, UK

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