Jump to content
Macro Express Forums

stevecasper

Members
  • Posts

    570
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by stevecasper

  1. I currently have the running man icon in my task bar, but no macro is being executed. It's a minor glitch. I ran a macro, had to cancel it before it was finished running and was able to, but the running man didn't go away. I have since run other macros and the running man has changed his "mouse-over" text, but he is still there. It's not affecting the performance of anything, but it is a little odd. And I'm concerned that it won't work to cancel a macro-in-process... but I'm not terribly worried.
  2. Though I don't personally use the built-in debugger very often (my macros are generally simple enough that I can debug efficiently with text-boxes and breakpoints or pauses), I certainly see the advantage to having, at the very least, the option to turn the built-in variables off for new macros for those people who are building powerful macros and need the debugger to be clean and efficient. Count my signature given.
  3. Not to beat a dead horse, but since I've already got the club drawn... I just had this crash when disabling an If command. So it's apparently not limited to Repeat loops, but potentially any set of commands that have a start and end to them (I have not attempted it with a Text File Process, but it looks like this may also cause a crash. I'll test it and post an Edit. EDIT Confirmed: The crash occurs with both Text File Process and ASCII File Process commands.
  4. I think it would be great if there were a way to find the coordinates of text on a screen, but as far as I know, there is no way to do that with Macro Express (3 or Pro). If there is a third party software that could do that (or if ME can do it somehow), then ME would merely need to move mouse to that location and click. It's a matter of figuring out how to locate the coordinate of specific text.
  5. Macro Express 3 does not have an "If Keypress =" command (or any decent workaround for it). I don't believe Macro Express Pro does either (if it does, it isn't under the Logic category); however, ME Pro does allow for single key macro launches, so you could use J to launch a macro as well as K (or any other key). Keep in mind, however, that depending on what the macro does, you may cripple the user's ability to type meaningfully as long as Macro Express is active on the computer.
  6. If you have to hold down shift, why not just change your hotkey to Shift+F1? I don't believe it is possible to do what you are suggesting, but there are likely other alternatives that could work for you.
  7. Great, thanks Cory. Just a heads-up to everybody else who might read this: The crash happens when disabling the "Repeat Start" line of a Repeat Loop, but seems to only happen when the Start is on Line 1. I'm putting that into the bug report as well.
  8. That may actually be best. ME Pro has a grander Date/Time functionality, and even it is tragically lacking in this department. However, Cory (regular poster and serious macro genius) knows a lot about Date/Time calculations in ME, and he has some work-around information he could get you... but it would be for use with ME Pro rather than ME 3.
  9. The way I understand Macro Express to work, is that it mostly just uses built-in windows functions to perform a lot of the work a person would normally do manually. So in order to copy from a location, ME has to use the Windows clipboard function. Now with that said, it might be handy to be able to have an all-in-one macro command that uses the Clipboard-copy function and add it directly to a variable all in one stop. I don't think that's currently possible, but you might want to submit a feature request to ISS. It sounds useful. Assuming, of course, that it's not already available (if it is, I'm sure we'll hear from somebody else soon enough).
  10. You will need to write some logic into your macro so that it can locate the end of the website addresses. Probably the easiest thing to do will be to have the macro locate a blank space. The blank space will have to be located outside the website address. Here's an idea how to do this: // Here I've established T1 containing a line of text containing a web-address and an image name (I'm assuming this is how your .txt file displays them). Variable Set String %T1% "http://www.macros.com image123.jpg" Variable Set Integer %N1% from Position of Text in Variable %T1% Variable Modify String: Copy Part of %T1% to %T2% Variable Modify String: Delete Part of %T1% Variable Modify String: Trim %T1% Variable Modify String: Trim %T2% // In the end T1 contains the image file, and T2 contains the web-address Direct Editor Script <REM2:Here I've established T1 containing a line of text containing a web-address and an image name (I'm assuming this is how your .txt file displays them).><TVAR2:01:01:http://www.macros.com image123.jpg><IVAR2:01:13:1: ><TMVAR2:10:02:01:001:N01:><TMVAR2:11:01:00:001:N01:><TMVAR2:01:01:00:000:000:><TMVAR2:01:02:00:000:000:><REM2:In the end T1 contains the image file, and T2 contains the web-address>
  11. Use integer variables (%N1% for example) for the prompts where you only want numbers. In the prompt you can remind the user how many chracters are permitted, and that if their input exceeds that number, then the response will be truncated to fit. Then write some code that looks like this: Variable Set Integer %N1% from Length of Variable %T1% If Variable %N1% > 80 Variable Modify String: Copy Part of %T1% to %T1% End If In this code the Macro checks the length of the User's input. If the input is longer than 80 characters, the macro automatically removes all the extra characters in that resposne. This will be similar to the last one. Prompt the user for the 4 digit year, and if the user doesn't enter it correctly, then you make them do it over (this code assumes you are using the Integer variable to force the user to use numbers only): Repeat Until %N2% = 4 Variable Set Integer %N1% from Prompt Variable Modify Integer: Convert %N1% to text string %T1% Variable Set Integer %N2% from Length of Variable %T1% Variable Set String %T2% "Your input was only %N2% digits. We require a 4-digit year." Repeat End The Direct Editor Text for my example looks like this: <REP3:08:000001:000002:0002:0:01:4><IVAR2:01:02:FPlease provide the 4-digit year. %T2%FFCenter:Center><NMVAR:05:01:0:0000001:0:0000000><IVAR2:02:12:1><TVAR2:02:01:Your input was only %N2% digits. We require a 4-digit year.><ENDREP> This is easy enough to do. Assuming you just want to make sure the input is at least 5 characters wide, you simply use the Modify String "Pad Right" command. Set the padding to the total width you require (if you need it 5 characters wide, set the padding to 5, regardless of how many characters the User inputs). If, on the other hand, you're trying to add spaces between each character, that will require a bit more logic and the macro will be more complicated, but it is still doable.
  12. Keep in mind that Windows Controls are not present in every application, web-page, etc. I use them whenever I can, but that's only a very small fraction of how often I wish I could use them. And as far as I know, the only way to know if an application uses them is through trial and error. If there is a better way, I'd love to know about it.
  13. I do have problems when using ME to close multiple IE windows. I don't know that it's ME related, though. The problem seems to be specific to a particular internal web site I access through IE, through which - in turn - I access several other pages (each opening a separate window). When I'm done I use ME to close all the child windows, leaving the parent IE open. 90% of the time this works fine. But the rest of the time my system runs into a cold-molasses quicksand. The only fix I've been able to get is to shut down all IE windows. This can take several grueling minutes, but once the last one is closed, everything goes back to normal and I just relaunch my windows as necessary. Again, I don't know that the problem is related to ME, but since nobody else who works with this same IE window-set experiences the slow down, and since I'm the only person using ME to close the windows, I can only presume that the problem is somehow related to ME. I have this problem whether I use ME 3.x or MEP to close down the IE windows.
  14. Hey Cory, I've ahd the same experience (just once, and thought it had something to do with the particular command). If you get me the bug report number, I'll submit my example referencing it.
  15. I'm with you Paul. I love hotkeys... that's why I use Macro Express.
  16. Hey Tom, It does not require them both to run at the same time. The primary macro only runs every 5 minutes. The secondary macro only runs when "This App" comes to the top. If you're using a repeat loop within the primary macro in order to establish the every-5-minutes prompt, then the secondary macro won't be able to run (ever); however with the primary macro set on a schedule to run every 5 minutes, then you won't need a repeat loop inside it at all to perform this function. Thus you should only ever see one of 2 situations with this set-up: Situation 1: No macro is running for 5 minutes, then the primary macro runs, does it's thing, then stops running and the 5 minute timer starts over. Situation 2: No macro is running for 3 minutes, then the User brings This App to the top in order to use it. At this point the secondary macro runs very quickly disabling, then re-enabling the primary macro - effectively resetting the 5 minute timer.
  17. I had never noticed the built-in time-out on this command. Awesome! Personally, what I would do in this case (admittedly I don't know the full spectrum of what it is you do, so feel free to completely ignore me) would be to make the macro as unobtrusive as possible. <Begin Boring Personal Example>: I work with a Citrix application that times itself out ever 4-8 minutes (it is completely inconsistent). This was a problem when it would time out and then I'd run a macro that needed to call the app, which had timed out in the mean-time, requiring a sign in. Rather than building a series of commands to determine if the app had gone to a log-in page or to the page I actually wanted, I built a simple macro that would refresh the application automatically every 4 minutes. Unfortunately, that got to be a headache when I was using the app regularly or when it would refresh immediately after I reached the information I was looking for (the refresh takes the app back to the first page of a hundreds-of-pages-long document). I made some modifications so now any time the application is refreshed manually or via another macro accessing the application, the timer starts over. This way, if I don't use the app for 4 minutes, and neither do any of my other macros, I get a text box that pops up alerting the user that the app is refreshing and to be patient for a few seconds. Once the refresh is completed, the app is minimized, the text box goes away, and the user can get back to work. I can go hours without seeing the text box, or I can go an hour and see it 15 times, depending on whether or not and how often I'm using the app. <End Boring Personal Example> I guess my point is that you could probably build something around your macro, so that when the application in question does get used, the timer on the macro starts over, and only prompts the user if the application has definitely not been looked at. The code is pretty basic (and relies on a second, separate macro): The primary macro would look like this (I named the application "This App"): Launches on a schedule: Every 5 minutes If Window Title "This App" is running If Message: "Don't Forget to Close This App" Else Text Box Display: Closing Window Close: "This App" Text Box Close: No Response End If End If If This App is not running, nothing happens. If it is running, the If Message appears every 5 minutes as long as This App is running. --------------------------------------------------------- The secondary code, which blocks the If Message when it's clear that the User is actually using the application, looks like this: Launches whenever window title "This App" comes on top. Macro Disable: test 1 for tpiper Macro Enable: test 1 for tpiper This way, if This App comes to the top, the 5 minute timer for the primary macro gets reset to zero. If the User is clearly using the app, then they won't be bugged by a constant barrage of "Are you using this?" requests. Anyway, I hope this helps!
  18. Frankly, I'd choose to use Cory's over mine any day of the week, regardless of the macro. The dude's a macro god (no blasphemy intended, just making a point )
  19. Another thought is to save the "string" to a variable and use that variable as the Prompt, with instructions informing the user what part of the "string" is going to be replaced. // Establish a Text Variable containing the "string" to be modified. Variable Set String %T2% "Orange County, California, has seen a population increase of more than XX% over the past two decades." // Establish a value for the Text Variable you're planning to use: Variable Set String %T1% "Your Input" // Prompt the user for the information (will replace "Your Input"): Variable Set String %T1% from Prompt // Now you use Variable Modify to replace the text in T2 with the Text the User Provided. Replace "XX" with "%T1%" in %T2% // Now you use the Text Variable wherein the user's input has been stored wherever necessary. Text Box Display: End Result <REM2:Establish a Text Variable containing the "string" to be modified.><TVAR2:02:01:Orange County, California, has seen a population increase of more than XX% over the past two decades.><REM2:Establish a value for the Text Variable you're planning to use:><TVAR2:01:01:Your Input><REM2:Prompt the user for the information (will replace "Your Input"):><TVAR2:01:02:F%T2% (User: please replace XX with the figures your research has uncovered).FFCenter:Center><REM2:Now you use Variable Modify to replace the text in T2 with the Text the User Provided.><TMVAR2:21:02:00:000:000:XX%T1%><REM2:Now you use the Text Variable wherein the user's input has been stored wherever necessary.><TBOX4:T:1:CenterCenter000278000200:000:End Result%T2%> You can use Text File Process commands to retrieve data for inputting into the Text String to be modified, as well as save the Text Variable information right into a .txt file (or other format). Without knowing exactly what it is you're trying to do, I can only offer limited advice.
  20. Hi Meg, Maybe I'm reading this too simplistically, but it sounds like you would want to use a simple "Set Text Variable from Prompt" command. // Establish a value for the Text Variable you're planning to use: Variable Set String %T1% "Enter Your Input Here" // Prompt the user for the information (will replace "Enter Your Input Here"): Variable Set String %T1% from Prompt // Now you use the Text Variable wherein the user's input has been stored wherever necessary. Text Box Display: Madlib <REM2:Establish a value for the Text Variable you're planning to use:><TVAR2:01:01:Enter Your Input Here><REM2:Prompt the user for the information (will replace "Enter Your Input Here"):><TVAR2:01:02:FPlease provide a noun in the space provided.FFCenter:Center><REM2:Now you use the Text Variable wherein the user's input has been stored wherever necessary.><TBOX4:T:1:CenterCenter000278000200:000:MadlibI can't believe you're going to eat that whole %T1% all by yourself!!! You must be a raging %T1%-aholic!> If you want other macros to be able to access the information provided by the user, then you will need to use the Variable Save command (at the end of this macro) and the Variable Restore command (at the beginning of any macro you want to be able to access this information). Keep in mind that if you use T1 in this macro for this particular input, and then use T1 in another macro where the information is not the same as it was in this macro, the Variable Restore command will restore whichever T1 was saved last. In other words: Macro A: T1 = Chocolate bunny rabbits. <Variable Save> Macro B: T1 = Pensacola, Florida <Variable Save> Macro C: <Variable Restore> T1= Pensacola, Florida However: Macro A: T1 = Chocolate bunny rabbits. <Variable Save> Macro B: T1 = Pensacola, Florida <NO Variable Save> Macro C: <Variable Restore> T1= Chocolate bunny rabbits Of course there is the possibility that I completely misunderstood what you are trying to do, in which case I would simply ask for a bit of clarification.
  21. I've gotten either that, or a similar, error when the macro being called existed, but there was an error of some sort within that macro. But if you've been able to work-around using the exact same code then I don't suppose this is the problem at all. Very strange.
  22. Set the macro to run on a schedule. Have the schedule set to run Daily at 7:00AM On the Range tab set the macro to run between 7:00AM and 6:00PM. Enclose the macro itself within a Repeat Loop. At the end of each loop attach a 10 minute delay (or less if the macro takes very long to finish). This will cause your macro to run each day, every ten minutes between 0700 and 1800. There are probably smoother ways to do it, but this one is simple enough and should work. Good luck!
  23. In the Debug menu of the Editor you can select to step through the macro. You can select "Use test window" which will open a window that will accept any of the TextType information during the test. Something else you can select is the "Variable Values" option under the "Debug Windows" selection of the Debug menu. This will open a window providing you with real-time information of what information is contained within each variable. A useful tool when debugging is the "Breakpoint" tool which allows you to set "pauses" in the macro without actually inserting a pause. This way, if you are debugging your macro, the macro will run till it hits a breakpoint and then stop... if you haven't seen any problems at this point, you can make the macro continue on to the next breakpoint. This is very useful for locating a problem-spot of code. Despite how useful these techniques are, I personally have always used much less-convenient work-arounds (having only learned of these useful tools after years of using ME). My personal favorite is to insert a Text Box or two (or three) scattered throughout which display the key variables I'm interested in. Hopefully this information is what you were looking for! Good luck!
  24. Samj's code is correct... but since all the information isn't available to you in the format he gave, I doubt you'll be able to duplicate his results without first learning enough about Macro Express to figure out how to build this extremely simple macro on your own. And since you don't seem inclined to look into it right now, I'll do you a solid and provide you with the actual code. However, please keep in mind that this forum is for people who want to help or who need help because they missed something along the way or they just can't seem to puzzle out how to do something even after going through the Help files and Tutorial. With that said, even if you just need somebody to help you build a macro, a little less abruptness and a little more courtesy go a long way. <REP3:01:000001:000001:02000:0:01:><LCLK><IVAR2:01:06:2><NMVAR:01:01:1:0000001:2:0000007><DELAY:%N1%><ENDREP> Good luck.
×
×
  • Create New...