Jump to content
Macro Express Forums

stevecasper

Members
  • Posts

    570
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by stevecasper

  1. Hey Cory, Somebody on they ME3 board had asked for an easy way to run a macro that would find specific text on a web- page, and then the macro would continue differently based on whether or not the text was present on the page. I had given an example of a macro that would prompt for the text, Select All, save to variable, and then compare the prompted text against the contents of the variable. The macro worked fine in ME 3, but erred in ME Pro... but only on some web-pages. And now it looks like that error will be fixed with the new release - Thanks Stan!
  2. I've copied this post from (what should be) the end of the following thread on the ME 3.x forum: http://pgmacros.invisionzone.com/index.php...amp;#entry13351 Hi Bob, I hadn't been using Firefox for this macro (even if I had, the macro should still work, though). However, after your post, I felt it best to give other browsers a try. I have duplicated the error in IE, Google Chrome, Firefox, and Opera. I am clicking in the window before running the macro, and the Ctrl+a is highlighting the entire page. The error is occurring because the macro is not recognizing Text variable %T[1]%, which is just silly. Hi Terry, I am back after several hours and at first it ran fine, but then I realized that ME 3 was running again (I'd rebooted in the mean time). As soon as I suspended ME 3, the error returned. When your macro started working again, are you sure it wasn't ME 3? What really gets me is that the error does not occur if I run the macro within the message box. Just the regular web-page. The macro works in Notepad as well. The error seems to be HTML-related, I guess. It's late, I'm confused.
  3. Hi Bob, I hadn't been using Firefox for this macro (even if I had, the macro should still work, though). However, after your post, I felt it best to give other browsers a try. I have duplicated the error in IE, Google Chrome, Firefox, and Opera. I am clicking in the window before running the macro, and the Ctrl+a is highlighting the entire page. The error is occurring because the macro is not recognizing Text variable %T[1]% which is just silly. I'm going to copy this thread in the Macro Express Pro forum as I think it has grown beyond the scope of ME 3.x
  4. Hey Terry, I just now got a chance to look into my macro and experiment with why it isn't working in ME Pro. My first thought was that it was a timing issue; and, in fact, it was - at least initially. ME Pro is so fast that it tried to find the required text before my computer had been able to complete the Clipboard Copy. So I incorporated a pair of .5 second delays (I always start with a big delay and then work my way down). On the very first run with the delay I got an error. I will be bug-reporting it in a few minutes. The error says: Line 7 is: If Variable %T[2]% Contains "%T[1]%" Here is the macro as it stands: <VARIABLE SET STRING Option="\x01" Destination="%T[1]%" Prompt="What Word are you looking for?" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/> <TEXT TYPE Action="0" Text="<CONTROL>a"/> <DELAY Flags="\x01" Time=".5"/> <CLIPBOARD COPY/> <DELAY Flags="\x01" Time=".5"/> <VARIABLE SET STRING Option="\x02" Destination="%T[2]%"/> <IF VARIABLE Variable="%T[2]%" Condition="\x06" Value="%T[1]%" IgnoreCase="FALSE"/> <TEXT BOX DISPLAY Title="Peform \"Yes\" function" Content="This box represents what will happen if the search-for word exists." Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <ELSE/> <TEXT BOX DISPLAY Title="Peform \"No\" function" Content="This box represents what will happen if the search-for word does not exists." Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <END IF/> There is nothing different about this macro and its ME 3.x counterpart, other than the delays. This was a straight up Copy/Paste from the Editor in ME 3 to the Editor in ME Pro. I'm going to toy with the script and see if changing the variable names fixes it, but I don't see why it would make a difference. If it matters, I was searching for the word "Mouse" on this very thread. Worked fine with ME 3, erred with ME Pro.
  5. Hey Terry, I had the same problem with a different macro that I posted back a while ago. It would work fine, pulling the correct info when the 2nd macro was still just a line or two, but once the macro got complex, macro 2 forgot that the variable it was pulling was a Date/Time variable and started treating it as a Text variable. It was inconvenient, but I just went in and defined the variable as a D/T within the 2nd macro. After that it worked fine. Honestly, it should have worked without reiterating its definition in the second macro (once defined and Saved/Restored, it should stay defined), but that was a work-around that didn't really change the macro, just took an extra step in the building of it.
  6. Hi Terry, the simplest would be to look, count, know. But using ME... that's a tough one. I would probably try something like this: Variable Set String %T1% from Window Title Variable Set Integer %N1% to 1 Repeat Until %T1% <> %T1% Text Type: <CONTROL><TAB> Variable Set String %T2% from Window Title If Variable %T1% = variable %T2% Break Else Variable Modify Integer: Inc (%N1%) End If Repeat End Text Box Display: Tabs Open = %N1% <TVAR2:01:06:><IVAR2:01:01:1><REP3:08:000002:000001:0001:1:01:T1><TEXTTYPE:<CONTROL><TAB>><TVAR2:02:06:><IFVAR2:4:01:1:T2><BREAK><ELSE><NMVAR:08:01:0:0000001:0:0000000><ENDIF><ENDREP><TBOX4:T:1:CenterCenter000278000200:000:Tabs Open = %N1%There are Currently %N1% tab(s) open.> Of course, add delays as necessary. I have not tested this out at all as I don't have FF at work, but even if the code isn't right (I almost never build a macro actually works without at least a few trial runs and changes), the idea should work. Oh, and even if the code does work right (fingers crossed), it still won't work if two of the same page are open, or two pages with the same title... so good luck Now, if there is an even cleaner way to do it, that would be nice to know.
  7. That's an interesting problem. I just built a simple test macro: Text Box Display: hi Delay 50 Seconds This macro was set to run at a specific time and to run every 1 minute. I wanted to find out if the 1 minute started when the macro started or when the macro ended. My results were consistently neither. The macro, idealy, was taking 50 seconds to run. I timed it and it was pretty close to that (about 51 seconds, which is an acceptable dev- iation considering other tasks and the fact that my computer is sluggish). I then timed how long it took for the macro to run again. It should have been either 10 seconds (if the 1 minute started at the beginning of the macro) or 60 seconds (if the minute started at the end). It turns out that the macro ran again at 19.xx seconds on each trial run. Weird to say the least. A work-around you might look into, though ideally the scheduling should work, would be to incorporate a Repeat Loop that encompasses the entire macro. If you want the macro to run over and over and over for 21 hours straight and the macro takes 27 minutes to run, we calculate how many minutes are in 21hours (1260) and then divide that by 27 to get 46.666. So you would want to set your Repeat com- mand to repeat about 46 times.
  8. Forget the Find command from your browser. It's way easier than that. Variable Set String %T1% from Prompt Text Type: <CONTROL>a Clipboard Copy Variable Set String %T2% from Clipboard If Variable %T2% contains variable %T1% Text Box Display: Peform "Yes" function Else Text Box Display: Peform "No" function End If <TVAR2:01:02:FWhat Word are you looking for?FFCenter:Center><TEXTTYPE:<CONTROL>a><CLIPC><TVAR2:02:03:><IFVAR2:4:02:7:T1><TBOX4:T:1:CenterCenter000278000200:000:Peform "Yes" functionThis box represents what will happen if the search-for word exists.><ELSE><TBOX4:T:1:CenterCenter000278000200:000:Peform "No" functionThis box represents what will happen if the search-for word does not exists.><ENDIF> Admittedly, I am in a hurry, so may have missed something in the above posts, but I do similar functions all the time (assuming I understood correctly), and this is how I do them. -EDIT (1hr later) I've had a minute to look over the original question and the other replies, and I'm still confident that my example should work fine for what you are trying to do. Keep in mind that you may need to add delays between the CTRL+A function and the Clipboard Copy command. You might also want to consider adding a Mouse Move command to a position relative to the window you're going to copy and a Left Click command to ensure the CTRL+A highlights the correct area of the window (I have had trouble with Ctrl+a and tables in web-sites before), but probably won't need it.
  9. I built the following macro to test whether or not I had similar problems to those you describe. Repeat Start (Repeat 60 times) Window Activate: untitled - notepad Delay: .5 seconds Text Type (Use Clipboard and Paste Text): Text1 Text Type (Simulate Keystrokes): Text2 Window Minimize (Simulate Keystrokes): Text2 : Untitled - Notepad End Repeat <REPEAT START Start="1" Step="1" Count="60" Save="FALSE"/> <WINDOW ACTIVATE Title="untitled - notepad" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <DELAY Flags="\x01" Time=".5"/> <TEXT TYPE Action="1" Text="Text1"/> <TEXT TYPE Action="0" Text="Text2\r\n"/> <WINDOW MINIMIZE Option="\x01" Title="Untitled - Notepad" Partial="TRUE" Wildcards="FALSE" _IGNORE="0x0006"/> <END REPEAT/> My experience was a very smooth run. After running it as built above, I removed the .5 second delay and still had no problems with the macro. I'm running a pretty fast system: Vista Ultimate 32, SP 1, Intel Quad core 2.6 GHz, 4G RAM, so that may be why I can do it without the delay, but even on a slower system the macro should have no problems with a built-in delay. I don't personally understand why the same macro would work on ME 3.x but not on ME Pro, but I don't think it is a problem inherent in ME Pro.
  10. Macro Express Pro does allow you to run multiple macros at the same time. This should work even when calling a web site. However, it's important to keep in mind how macros work (many macro commands just simulate key-strokes or mouse-moves). So if you are trying to have two different macros typing or clicking on a web site, you're going to have some complications as one macro types/clicks one thing and the other tries to do something else. Maybe a more specific example of what you're trying to do with your two macros would help us to help you figure out if two separate macros would be the simplest and most efficient way to build your macro process.
  11. The intuitive thing (barring the existence of a Right-click Snippet menu with an Edit option), would simply to change the code and then "Add to Snippets" using the same name, then selecting Yes on a "Do you wish to replace the existing snippet with that name" type prompt. Unfortunately the prompt simply says "A Snippet with that name already exists." What happens when you have a bunch of snippets that you thought you would use but then never do, or don't need anymore? Your snippet list could get out-dated and unmanageable. I have not found a way to get rid of the simple one that I created to test this feature (fortunately it's a snippet that I may actually use on a regular basis).
  12. I have duplicated some of this, but first the Add window does open with Alt+A. The confusion is that the Add window and the Properties window are identical. The only difference is that the Properties window should contain the information from an already existing and selected Variable. The Add variable window is blank (you can double-check this by manually clicking the Add button to see that the window opened is a blank Properties window). On the other hand, however, I did have the same problem with Alt+P and Alt+D. I would almost suggest Alt+A as a work-around for Properties, except that it opens a blank Properties window, not the Properties of the selected variable. And I would recommend the "Delete" key on your keyboard as a work-around for the Delete function (it works). Here is a link to the bug-report form: http://www.macros.com/bugreport.htm
  13. http://macros.com/bugreport.htm Happy New Year!
  14. Wow... Cory, you are friggin' brilliant! I've been playing around for a few minutes now with a DoB averaging macro (found the average DoB between my wife and me; among my wife, myself, and our little girl; and the average between all of my brothers). Don't know when I'd ever need this, but it's fun to play with, and gives the Modify command some practical scope. Though I wasn't actually able to use the Modify D/T command to calculate the average: there is no "Divide" in the Modify D/T, so I had to convert it to decimal and back. LOL, I just barely found out about the Excel decimal-time relationship... I'm going to need to start learning how to think in decimal. I'll definitely take your advice and play with it in Excel... well, I actually don't have Excel, I use Sun's OpenOffice.org but it's pretty much the same, so it hopefully has the same decimal-time set-up. Thanks a bunch for opening my eyes a bit to the power of this new macro command. As I play with it (if I can find good, practical reasons to do so) I'll be sure to post here looking for suggestions as I'm bound to hit some brick walls.
  15. Interesting stuff, I've never used Excel for time modifications. I'm going to have to play around with that. I had this same problem (discussed at painful length in another post). Turns out you just have to make sure that you've "Added" the variable under the correct variable-type. You know, I stopped using the built-in [ codebox ] tags and started using [ code ] tags. There is a little difference, but I don't know that it affects the wrap-around.
  16. Hehe, that's funny. Easily enough to fix the background color, but I don't imagine it should be changing to black when you change the font color. Blue is the default, so I would guess that the Clear Colors option isn't so much designed to change the command to black as it is to remove any customization the user may have affected.
  17. Ok thanks guys! Samples.mex didn't install with my download (but honestly, I don't remember if there was a "cusomized" download option in which case I may have arrogantly chosen not to download the samples). I did find the ones on the Shared Macros page, but recognized them as the old ones from ME 3.x. If there aren't any specific samples for MEP, yet, then I shall forebear. Thanks again!
  18. Cory, you may just be smart/tech-educated enough to make this Date/Time thing work. Any chance you could give an example of when a person would want to know what "today at 5:45:01 PM + tomorrow at 3:42:32 AM" equals? (or any arbitrary dates). I mean, they went to a lot of trouble to create the modify D/T command, and God bless 'em for it. I am certain that they wouldn't have done so if there weren't a pretty global desire for it. A basic real- world example would probably help me figure out whether or not I would ever need it in my life. And here all I wanted to do was calculate the difference between two separate times (I know I can build a macro that does it using a relatively lot of code, but I was hoping this would do it for me and be easy).
  19. I just realized I don't have any sample Macros on my system. A C: drive search pulls up a few "sample" titles, none of which are related to Macro Express. The "Tutorial" menu refers to sample macros, but I wonder if ME Pro has any? If so, where might I find them? I am pretty sure they didn't download with my copy, in which case, where would I be able to get them on the Macro Express website (if possible)?
  20. 12/30/2008 6:52:14 PM + 12/30/2008 6:52:13 PM ----------------------------- 1/1/2118 1:44:27 PM Confusing! The best I can figure is the time adds up like time should. 13+14=27. 52+52 = 1:44. 6+6+1(carried) = 13. 13:00 = 1:00. I was confused by the fact that the result is PM, but then I though that maybe it's really calculating in 24 hr time. 6:52 PM is 18:52. So 18:52 + 18:52 = 37:44, right? Subtracting 24 hours leaves us with 13:44 (1:44 PM). Ok so that works. But we've added only 1 day. (12/30/2008)*2 somehow gives us 1/1/2118. 2008+2008 = 4016, so it's not a direct addition of the years. 12+12 = 24 (2 years) would bring 2008 to 2010, again, not a direct addition of the months. I'm at a complete loss as far as comprehending how the Modify Date/Time function works, or in what way its current fun- tionality could be of any possible use. Subtracting is also a joke. 12/30/2008 7:10:41 PM - 12/30/2008 7:10:38 PM ------------------------------ 12/30/1899 12:00:03 AM What I thought this command would do is help do calculations of the passage of time. Unfortunately, there is no way to capture the time without also capturing the date (Date/Time modifications require D/T variables, which require date and time). This way one could figure out how much time elapsed between one D/T capture and another (which would, admittedly) only require the use of the subtract function. I don't know why anybody would need to add one captured D/T to another. Interesting note: If you subtract a D/T variable from itself, the result is the creepy 1899 date with no time: 12/30/2008 7:10:41 PM - 12/30/2008 7:10:41 PM ------------------------------ 12/30/1899 After my tests, I am not convinced there is any actual bug associated with this function. I just don't think I understand what its point is. The Help files weren't very useful for understanding function, either. Can anybody illuminate me, please?
  21. Hmm, The Scope of the macros I described above are all set to Global (I rarely change that when testing unfamiliar commands). The problem, it seems, was simply that a variable (%Start%) was "understood" by Macro 1 to be a Date/Time variable, and kept it's identity as such when Macro 2 was very basic. As soon as Macro 2 became a little more complex, Macro 2 decided to default %Start% back to a Text variable. It was a nuisance, but once understood, easily remedied. Now my concern is that the Modify Date/Time doesn't seem to be working correctly (or if it is, it is very confusing and not immediately intuitive). I will review the help pages in depth, build some different test macros, and if I think necessary, I'll start a new thread or just file a bug report.
  22. Thanks Stan, I'll be visiting the Feature request form soon
  23. Yes, several other posts have addressed this issue. For some people it's a matter of minimizing or Alt+Tabbing to a window that is hiding behind ME Pro. For me, that doesn't help. I have taken to just copying the ME 3.x code and pasting it into an ME Pro edit window. It is certainly slower, especially if there are hundreds of macros you need to move over, but it at least works.
×
×
  • Create New...