Jump to content
Macro Express Forums

pferris

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by pferris

  1. Greetings Rberg, et al; Has anyone had a problem opening the wrong (unintended) window with MEP? As you say, activate window uses a partial match. So, if I have a macro that massages Winamp (for example) that's called "Winamp Fixer" (or whatever - but contains "Winamp"), and I also have Winamp running, and I want to activate a Winamp (application) window, I might just as likely (it seems) activate the running macro itself! So I have give some other odd name to my macro - sans "Winamp" in the name. Has anyone else experienced this? Is there a more "absolute" way to reference the application window. Note: In the case of Winamp, the full (or even partial) name of the Window may be different - depending on the last stream (file) it played. Rephrased another way, using Rberg's example, if the name of my macro was "lotusnotes detector" (or something) and lotusnotes was running,, doing an "activate window" from the "lotusnotes detector" macro is as likely (it seems) to open the MEP macro as the actual (intended) application. Any ideas? Advance Thanks!
  2. Sorry this is probably too late to help the original poster, but... Background: Recently I've been working a bit with Winamp (my default player), MEP and Admiresoft's Super MP3 Recorder. I fairly consistantly ran into a prblem... how to "minimize" (or "maximize") Winamp (so I would have a more 'absolute' reference as to where critical mouse points were. Winamp is miserable in that it doesn't seem to offer any menu controls to min/max the application. Just the window controls (buttons) themselves. If they're offscreen, for whatever reason then you have to deal with that. PITA. My other problem was that if I named my MEP macro something like "Winamp Controller" or whatever... anything with "Winamp" in the name, and then told MEP to activate the window with "winamp" (partial match) in it, sometimes Winamp the application would come up and sometimes "Winamp Controller" (MEP) would come up. Grrrrr... I couldn't specifically activate Winamp the application since it might have a different name everytime it comes up -- Winamp puts the last track played in the window title... Grrrrrrr. But I digress... to help others: To the point: Soooo... there's a handy dandy VERY SIMPLE, VERY SMALL little app called "CLAMP" which really whips the Llama's @$$ (you'd have to be a Winamp fan for that one!). You can get Clamp here:http://membres.multimania.fr/clamp/ . Clamp is a simple EXE. No installer, etc. It executes from wherever you've parked it. Very plain vanilla, but useful! Nice. I can't tell you how easy Clamp is to use! It's rather simple. In fact the 'manual' is on on one page at the above link... I just copied it into a Word doc for my reference (wom web sites come & go and disappear when you need them most!). And, of course, Clamp can be controlled via MEP! Sweet. My only vetches with Clamp are: 1) AFAIK, there's not a slickj way to open Winamp to a specific bookmark, so I have to use a URL. 2) Clamp DOES support a MINIMIZE command but does not support a MAXIMIZE (odd, no?!).
  3. JohnS is a real godsend to this forum! I do something sort of similar - sans the Excel aspect (but as JohnS alluded to - that should be fairly trivial. You can even have MEP switch to the spreadsheet and go to the cell and "scrape" the value for you. In my case, I go to a web page where I have to enter the DAY of the month in a rather gruesome way; e.g.: If today is the 17th, I have to go to the correct drop-down and then "down arrow" 17 times. But since this is a macro that gets run every day, the constantly changes (as your Excel value may vary between 1 and 10 or whatever). This is simlar to what JohnS showed, I think. The delays are necessary because the server I'm dealing with ranges from "fast as lightning" to "slow as molasses". Depending on day of week, estrogen levels of server, phase of moon, height of tide, etc; I found these delays work well for me. Here's a sample of my code: =-=-=-=-=-=-=-=-= // Now let's do the day... Delay: 400 milliseconds Mouse Move: 430, 446 Relative to Screen //move to the dropdown trigger point Delay: 400 milliseconds Mouse Left Click Delay: 400 milliseconds Repeat Start (Repeat %Day_As_Integer% times) Text Type (Simulate Keystrokes): <ARROW DOWN> Delay: 80 milliseconds End Repeat Text Type (Simulate Keystrokes): <ENTER> =-=-=-=-=-=-=-=-= The actual "%Day_As_Integer% is set elsewhere, and not necessary for your purposes. Nevertheless, I THINK this will serve as a little example for you (or anyone else that might ever be interested!). Hope this helps. Sounds as if you're already on your way to success though. Let us know if we can help! Cheers, --Pete P.S.: To the MEP Curious, this is how I set the %Day_As_Integer%, there may be other / better ways, this is just how I do it: Date/Time: Set %Todays_Day_DD_Format% to the current date/time using "dd" as the format Variable Modify String %Todays_Day_DD_Format%: Convert to Integer (%Day_As_Integer%)
  4. A while back I had a problem with a Citrix client. I found some useful info on the Macro Express website knowledge base. Simply put in "Citrix" and go for it. I agree, Citrix does funky things at times. For example, I've seen instances where sometimes Citrix clients balk when they're fed data any quicker than what it thinks a Human Bean can (or should be able to) actually type it. I've "out-typed" Citrix interfaces (by hand) more than once. I can only imagine how a fairly streamlined script could overwhelm the interface - even on a "slow" PC. I slowed down the typing speed for all Citrix inter-actions and then went full blast with the text for any other local or non-Citrix stuff. The folks at Insight give excellent support. Cheers, --Pete
  5. Hi John! Could you drop me a note at my email address? For reasons that escape me I can not send you a PM - I'm constantly told I can't send one for (exactly 24 hours) from now... Thanks much! --Pete pfferris AT gmail DOT com
  6. Thanks Cory & John (And now I just see Paul's note here but haven't digested it yet!) Last night I spent a couple hours just reading everything I could that looked remotely relevant with the word "control" in it, within the Macro Express documentation (Help files)- I printed it out and went through it all. I haven't truly absorbed everything, but I'm thinking "Mouse Click on Control" will be my friend (perhaps)! I plan to do a little test macro later this morning. Cory, most everything you said made a good degree of sense. I shall search for your past dissertations in this forum and try to benefit from those, rather than make you reinvent the wheel just for me. I think one thing that threw me a curve was that one particular page I was trying to interact with was apparently not "control friendly". Once I read this could be the case (I thought it was my test macro), I realized the problem. Arrrgggghh. Ok,I've since made a little progress. Pretty slick so far. I did just a very simple little test last night- go to a page, click a certain button using control rather than a mouse movement (per the sample code I showed yesterday). Definitely worth me continuing my research in it. This is all part of the ME learning curve, I guess. Sure, it might take 6 hours to develop one type / facet of a macro, but if you can use it again (and again) - that time investment suddenly is much less. Kind of like making specialty IC chips (Pentium processors or whatever...) the first one may cost millions (R&D, etc.). The rest are essentially "free", but you have to average the cost to recover the investment. I digress. 1) Coordinate files: Good! Glad others have used these with good success. This confirms that my logic may have some merit! Always a comfort! 2) Control questions in general. Thanks for all the info. As I mentioned, I'm now making forward progress. 3) Regarding determining the number of lines in a text file: This would seem like a basic / simple thing to add in a future version. Easy for me to say, I don't have to code it! It seems agreed that this would be a nice feature to have. I hadn't thought of counting CR/LF's... There are some possibilities there. Still, that just seems a little more convoluted than it should be. I use EditPad Pro - the instant I open the text file it shows me the line count on a status bar in the bottom of the pane. BTW, EditPad Pro seems to behave very well with Macro Express. I believe EditPad Lite is FREE! And it will also show you the line count at the bottom of its pane. If anyone's looking for an above average, simple but extremely capable text editor, I highly recommend it. I use EditPad Pro to create, edit, massage, etc; all my text files. It understands regular expressions, etc. I think it blows away UltraEdit, etc. Since I also do some HTML and other things, I like the available color schemes / plug ins, etc. Disclaimer: I have NO pecuniary connection with JGSoft, et al. :-) Thank-you Cory, John and Paul, for your contributions here, and for your patience with my noob questions. In the past, I've crafted some rather complex macros (interacting between SharePoint & a proprietary ticket system, disaster recovery and so on) - but I have always found 'intelligent ' form completion - specifically repetitive button clicking - to be a little tedious. And of course, as fate would have it, that's where I seem to be spending more of my time (repetitive form / feedback / survey ) completions. Nice to know there's a more precise way to do it! Yes, next time, I will segregate this into different topics! Sorry 'bout that! Thanks again! Very helpful info. I appreciate your willingness to help in the future. I think I'm "loaded for bear" now!! I'm headed over to Panera's for breakfast. I'm taking the laptop and plan to script a 'test' macro to really focus on what I need to do. After your notes and after reading the documentation and a promising little code experiment, I feel very optimistic now! I'll give you a shout if I get hung up on anything. Have a great day, all! --Pete
  7. 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
×
×
  • Create New...