Jump to content
Macro Express Forums

ecoast

Members
  • Posts

    10
  • Joined

  • Last visited

ecoast's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. After a search I couldnt find anything on this. Can a Macro be multi-threaded? Say for data entry, launching a web page, to process a csv file and enter data into fields of web page. This has been very time saving for repetitive tasks of course, but to have multiple instances would be wonderful Thanks in advance!
  2. I have a macro to perform repetitive data entry on the web. The Macro feeds from a CSV file via a user-prompted, incremented loop. All data to be entered for each incremented round, comes from a single line in the CSV file, then moves to the next line... The only problem I see to be having now is, while data is being entered on the web, sometimes the web pages time out, and in this case a Refesh is not the solution. What I need to happen is for the Macro to close the current IE window, and return to the top of the loop and start over. I am having some trouble with some of th repeat commands, so i felt comfortable asking someone who may already have this in use Help is appreciated! Thanks!
  3. Hello, Joe I just ordered Macros Explained so I eagerly await the reference I have a fairly large MACRO and this a portion has me stumped. what happens is that the macro will run and never return a result, when i know that a one of the words from my list IS in every one of the 3 titles. I have left for over an hour to return, to no result, even though the macro isn't frozen, as I can stop is instantly. I have adjusted speeds and added delays also to no avail. ***The scanning if one-liner's in txt file is derived from Joe's simple method here Read Random Line From Text File in this portion of the macro I am wanting to 1. choose a title randomly from 3 titles of the same line in my example.csv file. (have used for a while w/out any hitches) 2. scan my "title_words_to_modify.txt" file randomly, (which contains one word on each line) --Until a word matches up with a word contained in my randomly chosen title from above. **Now it is a possibility that the randomly chosen title will NOT contain ANY of my words in my "title_words_to_modify.txt" in this is a small chance, but still possible... in this case I would like the macro to leave the title "as is" and move on.** 3. In the common case that a matching word is found, I would like to add a character(s) from my "characters_to_append.txt" file which contains the character(s) on each line -- to either the beginning or end of the word i.e. *WORD or WORD* 4. Then, I would like this modified word inserted back into the title replacing the original word. *********************** The above would be within one days work. The next day I would like to be able to do the same, but to not have the exact same title as end result. each repeat loop created a different titles (originally chosen from one of the 3 per line in the CSV file -- maybe stick titles created from one day into a file and compare them the next dady so the following would be classified as OK Monday = TITLEWORD *SAMETITLEWORD TITLEWORD Tuesday = TITLEWORD SAMETITLEWORD* TITLEWORD That would be all.. as you can see after thinking that couldn't simply modify the current variable, (using the same variable for some repetitive randomizing functions) I started clearing the variable out after each portion. Help would be greatly appreciated, or if I have missed a similar post on this, a reference would be just as appreciated. I have attached the sample files Thank you in Advance! Clear All Variables: All // ASK FOR LINE NUMBER FROM CSV FILE TO START FROM Variable Set Integer %N1% from Prompt Variable Modify Integer: %N1% = %N1% - 1 Repeat Prompt Start (Prompt for repeat count at macro play time) Variable Modify Integer: %N1% = %N1% + 1 Wait Time Delay 0.5 Seconds // LOAD "T" VARIABLES USED IN CSV FILE ASCII File Begin Process: "example.csv" (Comma Delimited Text ) ASCII File End Process Wait Time Delay 0.5 Seconds Keystroke Speed: 4 Milliseconds // RANDOM TITLE IS CHOSEN BY THE "IF" STATEMENTS // AFTER TITLE IS CHOSEN FROM T43, T44, 0R T45 IN CSV FILE // AFTER TITLE IS CHOSEN THEN, IT IS PUT INTO A VARIABLE (T46) Variable Set Integer %N90% with a Random Number <-- MAX VALUE 2 If Variable %N90% = 0 Variable Set String %T46% "%T43%" End If If Variable %N90% = 1 Variable Set String %T46% "%T44%" End If If Variable %N90% = 2 Variable Set String %T46% "%T45%" End If Delay 0.5 Seconds // SEARCHES COMMON WORDS UNTIL ONE IS FOUND THAT IS IN CURRENT TITLE Repeat Until %T46% Contains %T67% Delay 0.5 Seconds Clear Integer Variables: From 11 To 11 Delay 0.5 Seconds Clear Integer Variables: From 2 To 2 Delay 0.5 Seconds Clear Text Variables: From 67 To 67 Delay 0.5 Seconds Clear Text Variables: From 70 To 70 Delay 0.5 Seconds Variable Set Integer %N11% to 0 Text File Begin Process: "title_words_to_modify.txt" Variable Modify Integer: Inc (%N11%) Text File End Process Variable Set Integer %N2% with a Random Number Text File Begin Process: "title_words_to_modify.txt" Text File End Process Wait Time Delay 0.5 Seconds Repeat End Wait Time Delay 0.5 Seconds Clear Integer Variables: From 11 To 11 Wait Time Delay 0.5 Seconds Clear Text Variables: From 70 To 70 Wait Time Delay 0.5 Seconds // CHOOSES RANDOM CHARACTER TO ADD TO COMMON WORD Variable Set Integer %N11% to 0 Text File Begin Process: "characters_to_append.txt" Variable Modify Integer: Inc (%N11%) Text File End Process Variable Set Integer %N2% with a Random Number Text File Begin Process: "characters_to_append.txt" Text File End Process Wait Time Delay 0.5 Seconds Clear Integer Variables: From 11 To 11 Wait Time Delay 0.5 Seconds Clear Text Variables: From 70 To 70 Wait Time Delay 0.5 Seconds // APPENDS CHARACTER(s) TO COMMON WORD FOUND ABOVE Clear Text Variables: From 69 To 69 Wait Time Delay 0.5 Seconds Variable Set String %T69% "%T67%" // SETS UP STRUCTURE OF COMMON WORD AND APPENDED CHARACTER (CHARACTER ADDED BEFORE OR AFTER COMMON WORD) // TO EITHER "COMMON WORD""ADDED CHARACTER" // -OR- // OR "ADDED CHARACTER""COMMON WORD" Clear Text Variables: From 71 To 71 Variable Set Integer %N90% with a Random Number If Variable %N90% = 0 Variable Set String %T71% "%T67%%T68%" End If If Variable %N90% = 1 Variable Set String %T71% "%T68%%T67%" End If // REPLACES COMMON WORD IN TITLE W/ MODIFIED WORD IN FROM ABOVE Replace "%T69%" with "%T71%" in %T46% Wait Time Delay 0.5 Seconds Repeat End sample_files.zip
  4. Your the man. exactly what I needed. Thank you very much! Chris
  5. ?? I'm not looking for a number as a variable.. this a example is purely for example sake. i have an online form with many fields that I am filling our online. the information that will go into the forms are contained in a comma separated text file, which happens to be an Excel csv file. for example, lets say I have 5 fields. the 1st field is for a Name the 2nd field is for some thing age, the 3rd is for something else the ... so on and so on.. the csv file loads every time the form filling starts at field 1 (Name Field).. and every time the form filling starts it loads the variables again but moves to the next row in the csv.. row A of the csv is T1 row 2 of the csv is T2 so on and so on each field in the form is assigned a variable and the variable is derived from the csv file.. I want T1 T2 and T3 to be names in the csv, (the names are already filled in csv) and currently the form takes the name from the T1 variable in the csv and puts it in the Name field of the form I want to assign the Name field a random value of T1 T2 or T3 how do i do it HERE IS HOW THE FILE IS NOW, and work great! THIS IS THE FILE FORMAT I WANT TO USE The Macro will RANDOMLY choose one of the names from each line in -- other words it will randomly choose T1, T2, or T3 and assign it to the Name Filed in the form.. I tried to be as illustrative as possible.. here is the current command text Variable Set Integer %N1% from Prompt Variable Modify Integer: %N1% = %N1% - 1 Repeat Prompt Start (Prompt for repeat count at macro play time) Variable Modify Integer: %N1% = %N1% + 1 // HERE IS WHERE WE LOAD "T" VARIABLES ASCII File Begin Process: "form_file.csv" (Comma Delimited Text ) ASCII File End Process Web Site: www.whatever.com [internet Explorer - Wait to load] Window Maximize: Current Window Wait For Window Title: "form page" Delay 1 Seconds // TYPE OUT NAME Text Type: %T1%<TAB> Delay 1 Seconds // TYPE OUT AGE Text Type: %T2%<TAB> Delay 1 Seconds // TYPE JOB TITLE Text Type: %T3%<TAB> /////////////////////////////////////////////// THIS IS WHAT I WANT Variable Set Integer %N1% from Prompt Variable Modify Integer: %N1% = %N1% - 1 Repeat Prompt Start (Prompt for repeat count at macro play time) Variable Modify Integer: %N1% = %N1% + 1 // HERE IS WHERE WE LOAD "T" VARIABLES ASCII File Begin Process: "form_file.csv" (Comma Delimited Text ) ASCII File End Process Web Site: www.whatever.com [internet Explorer - Wait to load] Window Maximize: Current Window Wait For Window Title: "form page" Delay 1 Seconds // TYPE OUT NAME Text Type: %T1% OR %T2% OR %T3% (<<-- **RANDOMLY CHOOSE**) <TAB> Delay 1 Seconds // TYPE OUT AGE Text Type: %T4%<TAB> Delay 1 Seconds // TYPE JOB TITLE Text Type: %T5%<TAB> T1 is already my variable I use for my names as you can see... I want to modify and make T2 and T3 variable for names too i know i would have to bump the current T2 and T3 variables up a number but that is besides the point.. Once I fill the T2 and T3 fields with names.. i want the Macro to randomly choose T1 or T2 or T3 to be used to fill in the name field of my form.. \\\\\\\\\\\\\\\\\\\ ok thats as descriptive as i can be.. keep in mind this form filling scenario with names and age job description i just made up for a example.. THANK YOU Chris
  6. No, as of now my T1 variable goes into a particular form field, repetitvely. -- we'll just call this field "Name" My T1 variable is the name I have to added T2 and T3 variables into my csv making T1, T2, and T3 at this point.. all 3 of these variables contain a Name in my csv instead of using only T1 as the Name variable to be input into the Name Field on the form, I want the Macro to select either T1, T2 or T3 at random to be input into the Name field. Example: 1. Name Field = %T2% 2. Name Field = %T1% 3. Name Field = %T1% 4. Name Field = %T3% 5. Name Field = %T2% i think i am over explaining it, its really a simple concept. i have a repeating data entry process, in which the data entered into the repeated form is loaded from a .csv file and instead of using the same variable each time for that one particular form field, i want to add 2 more variables (T2 & T3) and have the macro randomly choose only 1 of the 3 selected variables to be input into the particular form field. make since now? I have read up, and seen ways to use a random number to choose random lines from a text file to input, but i want to keep everything on the same csv file and choose randomly from there. Thanks much for your time Chris
  7. Hello: I have a ASCII file that I am processing (csv) in which the variables are input into fields (data entry work) and of course i have variables assigned to the fields in which they are copied from the .csv and pasted as into the form fields. Lets say variable T1 is a name goes into the NAME FIELD on the form. But I want to assign T1, T2, and T3 as the name variables rather than just T1 and for the Macro to input any one of these into the NAME FIELD on the form at random. Any ideas? Thanks once again for your time! Chris
  8. thanks much! ok in the case that i can differentiate between the windows, i would like to for Macro to stop and continue to the next line in the .csv and take it from the top. at this point i will be fully automated... the problem is having to interact and interfere. this is a repetitve macro.. that repeats the same process 200+ times with the only difference being the data loaded and entered via the .csv file thank you for your time. Chris
  9. Ok, wow to solve this would be excellent! I have repetitive Data Entry work daily, and i have the input information loaded from a .csv file. (Excel) The data is input on by browsing web pages, then moving to the next and inputting the next bit of info. The thing is, that the we page titles are exactly the same. And if i use the wait for Window title, the current window has the same as the next that I am waiting, so that function is obsolete. And also when waiting for a web page to load, every once in a while the browser gets choked up or timed out and, I recieve a "page cannot be displayed" what i would like to do is 2 things: 1. be able to differentiate between the window titles, giving them a there own individuality, so that the macro WILL NOT resume until that particular page appears. 2. In the case i get timed out and page cannot be displayed etc... i would like to have the Macro move to the next line in the csv and start the process again from that line. If i could do this, then i would not have to stand by and correct the situation. I could simply leave let the Macro run its course Currently I have the progress of data entry being sent to an RSS feed and i have to check it, to see if the Macro has been choked up, and then i have to remotely correct the problem... it's a pain Thanks for taking the time in reading over my problem, I do greatly appreciate it. Thanks, Chris
×
×
  • Create New...