pferris Posted January 6, 2010 Report Share Posted January 6, 2010 Greetings All, I'm spenidng more & more time writing MEP scripts to complete web forms. Probably 90% of this is selecting radio buttons on a web page; "How would you rate the quality of the of the service you received?" - with 5 radio buttons, poor to excellent, etc. Typical feedback sort of stuff. Now I have a few questions: 1) Currently I say something like: // Enter Order #... Mouse Move: 506, 377 Relative to Screen Delay: 80 milliseconds Mouse Left Click Delay: 80 milliseconds Blah blah blah ... And I repeat this over & over, moving from one question / statement on a form to the next. Typiocal deviations are hitting the "Next" (page of form) button or entering occasional text here & there. Find the next mouse coord, click the radio button. Repeat ad nauseum, ad infinitum. Always the same (per site). Of course manually harvesting the coordinates with the Mouse Locator is painstaking / tedious. I appreciate the Mouse Locator Tool... but it would be slick if there were a tool that would just register mouse click coords (and nothing else - no time delays, etc.). The good news is that every feedback / survey (per site) is filled out exactly the same way - every time. No deviation necessary. Has anyone ever had success using a "coordinate file" for this sort of thing? How did you do it? I'm thinking if I put all the click / comment coordinates in a simple text file, and just process the text file. Take action based on the coord's purpose. Maybe a CSV file and invent a little syntax - so I can differentiate between a coord for a click on a radio button and a coordinate for a text insertion (comment). I'm thinking a "coord file" would >>greatly<< compact the overall code. But I digress... 2) Another thing I need to understand: What, exactly is "control"? What is a 'control event'? What is a 'Window control'? I see it referenced in PGM's "Macro Express Explained" - but never clearly (simply?) defined. I see references to it in commands throughtout Macro Express Pro. I'm told that "control" is the bread and butter of Macro Express, yet I can't find any sample macros that DO show examples (that even seem to be remotely relavant) of control. Would this be a more efficient / expeditious way to go rather than the repetitive mouse coord movements / clicks? 3) My final question: How can one determine how many lines there are in a text file without "pre-processing" it in advance and incrementing a counter? Is there a command to determine this? I occasionally need to extract a random line from a text file. The text file may be smaller or larger than it was the last time the macro was run. Right now, I have to manually track the length of the text file and update the variable that holds the "ceiling" of the random number generator code. For Example: (Let's assume there are currently 37 lines in the text file...But this has to constantly be verified before each run!) // =-=-=-=-=-=-=-=-=-=-=-=-=-=-= This will extract a random quote from an ASCII text file. =-=-=-=-=-=-=-=-=-=-=-=-=-=-= Variable Set Integer Number_of_Comments_In_File to 37 Variable Set Integer Which_Comment_To_Use to a random value between 1 and %Number_of_Comments_In_File% Text File Begin Process: C:\somepath\somewhere\Comments.txt Text File End Process // =-=-=-=-=-=-=-=-=-=-=-=-=-=-= End of random quote extraction. =-=-=-=-=-=-=-=-=-=-=-=-=-=-= Anyway, that's probably enough (too much?! Sorry!!) for now! I sincerely appreciate any hints, tips, etc. I have thick skin (for CONSTRUCTIVE criticism! ;-) ). Flames and rants to /devnull Thanks for all the time and consideration here, --Pete Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.