Jump to content
Macro Express Forums

rberq

Members
  • Posts

    1,200
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by rberq

  1. Paul, I believe you are the person who recommended this whole loop-until-it's-done technique in the first place. It has been a life-saver for me. Thanks.
  2. I've had similar scary experiences, like the other day when a macro ran away and highlighted all the dozens of icons on my desktop and kept moving the mouse so I couldn't get to the running man and I was trying to remember whether that macro had a <DELETE> coded in it .... I am wondering if I could set my programmable keyboard to do Start | Run | taskkill macexp.exe. Then I could label the key with a big red sticker like the panic button on machinery.
  3. Very clever outside-the-box thinking! I will have to remember that one. That technique could be helpful to manage an FTP session as well.
  4. terrypin: Yes, I do empty the clipboard before each copy. Good point! Rand: Yes, that's pretty much the right approach, but the Repeat should be AFTER the Clipboard Empty and Copy so the Copy only happens once. I include a 20 ms delay inside the Repeat loop, more so that I can time bringing the loop to an end than for any other reason. Remember that, if the data being copied is null, your Repeat loop above will never end on its own.... Also, you can test the clipboard itself for null value, rather than take the extra time to move its value to T1. Finally, this whole approach relies on the fact that the Clipboard Empty command itself does not rely on a delay time, it just works, period!
  5. If the copy works via manual keystrokes, and you are duplicating those keystrokes in your macro, then I would suspect a timing issue. Are you familiar with Options | Preferences | Delays | Delay After Clipboard Commands? That option is there because Windows apparently does not complete clipboard functions in a reliable time-frame. Setting a delay allows "most" clipboard functions to complete properly. The problem is, completing "most" clipboard actions properly is not adequate for a production application. Setting a high-enough delay makes it almost fail-safe, but can make the application unpleasantly slow for users. Because of that problem, and based on suggestions in this forum, I never do a simple Clipboard Copy. Rather, I set the ME delay to zero, and call a simple macro that issues the Clipboard Copy, then loops every 20 milliseconds checking for non-nulls in the clipboard. If after 50 loops (about a second) the clipboard is still null, the macro exits making the assumption that the actual data to be copied was null. The excessive delay experienced by users then occurs only for null fields. So far this technique seems to be 99.99999 percent successful -- that is, I have seen no failures, but never say never ....
  6. Convert both times to minutes, for example using N91 for current time, N91 = (N31 X 60) + N32 if T33 = PM N91 = N91 + 720 [720 is number of minutes in 12 hours] end if Then you can directly compare the minutes variables to see whether timer has been passed or not. Subtract current minutes from timer minutes to see how long until the timer "goes off". To convert it to hours and minutes, just divide by 60 to get hours, and the remainder is minutes. For example, if N99 is minutes remaining, then hours remaining N98 is N98 = N99 / 60 and minutes over the hours N97 is N97 = N99 - (N98 * 60)
  7. Did you maybe misplace an END IF in your new logic, so you are bypassing the return Activate? Put a (temporary) text box display right before the Activate for debugging purposes, so you can see if your macro is actually getting there.
  8. Sometimes when using the mouse locator, I have accidentally given focus to the mouse locator window rather than to the window I want to work with. That generally causes weird x- and y-coordinates as opposed to what you are seeing. But it's something for you to check....
  9. Yes, but.... If the macro is sitting on a delay, it is still running, so no other macros can run -- you have effectively blocked ME from doing anything else. I'm talking about ME Release 3 here -- I believe ME Pro has the ability to run more than one macro at a time, so the blocking might not be relevant on ME Pro.
  10. Try, if possible, clicking somewhere prior to the first box, so that a TAB will then jump you to the first box. For example, I have a form where there is a label to the left of the first box, like so: LAST NAME: [box to enter last name] I have found that clicking on the label, then typing a TAB, positions me reliably to the first box. Also try putting some WAIT FOR TEXT commands after typing fields; and/or some WAIT FOR WEB PAGE commands. These seem to be especially helpful in cases where there is a drop-down box and Internet Explorer needs time to react when you enter data into a field. It may be wishful thinking or my imagination, but these WAITs seem to make my web forms work better -- slower, but far more reliable.
  11. Terry and Steve - I have used the <CTRL>a technique with Internet Explorer, never with Firefox. On some IE screens I found it is necessary to click once with the mouse, somewhere inside the window, before doing the <CTRL>a. Without the click, nothing gets highlighted and therefore nothing is copied to the clipboard. Depending how the browser screen was built, it might be necessary to click in different areas, say near the top as opposed to the middle, etc.
  12. When you do the FIND, does it highlight the found word? If so, then this may work: copy the highlighted word into the clipboard and check clipboard contents like this: CLIPBOARD EMPTY command (sets clipboard content to null) FIND word CLIPBOARD COPY command IF CLIPBOARD TEXT = "searched-for word" DO WHATEVER END IF IF CLIPBOARD = "" (nulls) DO WHATEVER (word not found, so copy-to-clipboard does not put anything into the clipboard) ENDIF
  13. Yes, I have quite a number of macros initiated in that way from my mck-142 programmable keyboard. Why anyone would NOT demand a programmable keyboard is beyond me. I told my boss, last time he had to buy me one, that it's worth half a person. So he thought it was a good deal. Whether he thought he was bringing me up to 1.0 or to 1.5 I'm not sure.
  14. Sorry, no more ideas. But I must say your English is better than my German.
  15. Nope. Didn't try it myself. I was just guessing that it might work, though really it's more of a Windows network format. Why does your computer speak to you in German?
  16. You can use Variable Set Integer [Get Position of Text in a Text Variable] to locate the ">" sign within the string variable. Then increment the integer by 1, and use the integer in Variable Modify String [Copy Part of Text] to copy however many characters you want.
  17. Let's say the name of your computer is MYCOMP. Instead of "c:\Program Files\Macro Express3\MeProc.exe" /AName of Macro, try using "\\MYCOMP\c$\Program Files\Macro Express3\MeProc.exe" /AName of Macro It might work....
  18. Not sure of the answer to your question. You could test it out by appending the current value to a text file in each macro, then look at the text file and see if it is changing. To be sure of keeping the value from macro to macro, do Save All Variables at the end of each macro, and Restore All Variables at the beginning of each macro.
  19. Try a mouse click somewhere in the body of the page, and see if x number of tab keys will then take you to the button. You can test it out manually, then write the macro if the process works.
  20. Just another guess here: In the macro script editor, click the Scope tab and make sure it is a Global macro, and not limited to one particular window title or program name. The fact that it has worked OK until recently says that there can't be too much that is wrong. I believe most ME installations come with a system macro (CTRL_ALT_0) that will shut down and restart ME. That's worth a try.
  21. Again, I don't know just what you are doing, but I am guessing the delays are to give the screen time to change. Another trick you can use, to find out when the screen has changed, is to use a repeat loop to check pixel color at a location that you know will change when the screen changes. That way the macro will automatically adapt to how fast your system is running on a particular day. The loop should have a delay coded inside it to give the system a realistic amount of time to change the screen. For example: // wait up to 10 seconds for screen change get pixel color at x-coord, y-coord into N1 set N99=0 repeat 99999 add 1 to N99 if N99 > 100 display error text box "didn't change within 10 seconds" macro end end if get pixel color at x-coord, y-coord into N2 if N2 <> N1 repeat exit (screen has changed) else delay 1/10 second end if repeat end
  22. N11 is overwritten each time. I see that you are checking N11 for zero. The value will be zero if the pixel is black.
  23. Window Activate command should do it. If not, add command Set Window Order / Remove topmost status and put on top.
  24. You can't. ME does keystrokes via Windows, I believe, and Windows limits them to the "on top" screen.
×
×
  • Create New...