Jump to content
Macro Express Forums

rberq

Members
  • Posts

    1,200
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by rberq

  1. See if you can (manually) copy the screen contents by clicking on the screen, highlighting all with Ctrl-a, then copying to the clipboard. Paste the result into Notepad, then post an example of the Notepad text here on the forum, pointing out what fields you need to capture. Once we can see the text data, we can advise you how to parse it and remove what is unwanted.
  2. Yes, they should work. Open a ME3 macro file with ME4, or import from a ME3 file into a ME4 file, and the macros will be converted. Make sure you install the latest ME4 version first, as there are conversion bugs in earlier releases, and operational bugs as well.
  3. Oops. I should have been more direct. Sub-macros should end with Macro Return, not with Macro Stop. At least that's the way it works for me. If I do Macro Run several times, and the sub-macro has a Macro Stop, then the whole process stops after the first execution of the sub-macro -- which matches your original symptoms.
  4. Does macro "Web" end with a Macro Stop command? It should end with Macro Return if it is called from another macro.
  5. Look at the REPEAT WITH FOLDER command. If you get the folder path via a dialog, you can load the path into a text variable, T1 for example. Then in the REPEAT WITH FOLDER command, use %T1% as the folder.
  6. If I understand you correctly, all that you describe can be done with ME. If you create the initial macro by recording and saving your manual process, try to fill in the check boxes and dropdowns via keyboard rather than mouse action -- easier to edit later, and less susceptible to changes in the screen resolution or variations from one PC to another. After recording and saving, you will wind up with a macro that will need some (lots of?) editing with the script editor, and you will also need the script editor to add the folder processing. Once you have worked with the editor a bit you will rarely, if ever, create a macro by recording your keystrokes -- it's just easier in the long run to build it from scratch with the editor.
  7. First, after getting the pixel color into N1, you are checking T1 for the desired color value. Easy mistake to make -- but change it to say If Variable %N1% = 7143674 Also, the incrementing of D1 Variable Modify Decimal: %D1% = %D1% + 1 is controlled by the IF statement, so the value is bumped up ONLY if you have detected a pixel of color 7143674. If you want to exit the REPEAT loop after checking 100 pixels, then move the D1 increment down one line, so it falls after the END IF. Last, the macro will work perfectly well with your technique of moving the mouse and checking the color under the mouse each time through the REPEAT loop. However, it will work faster if you simply get pixel color at specific coordinates, without moving the mouse there at all. It's more fun to watch the mouse move, and it's also good for debugging because you can see, visually, where you are checking. But it does slow things down. I usually code the mouse movement during testing, then disable that line of code after the macro is working. P.S. The REPEAT EXIT is out of place and serves no function. It only has effect if it falls between the REPEAT and REPEAT END statements. I would have expected to see it right after the incrementing of N12, so you would jump to the REPEAT END as soon as a single pixel is found with color 7143674. But it looks like you are using N12 to indicate the desired color has been found (or not) within 100 cycles, so the REPEAT EXIT can be skipped, or moved to after the N12 increment.
  8. Instead of putting your color values into N1 through N30, put them one after another into a single text variable: VARIABLE SET STRING T1 = 12345678 23456789 34567890 45678901 and so on. The blank spaces between values are for your benefit, to make it readable. Then each time you want to retrieve a value, move 8 characters to a second text variable, load the integer from the second text variable, and remove the nine characters from the first text variable: VARIABLE MODIFY STRING T1: COPY CHARACTERS 1-8 FROM T1 TO T2 VARIABLE MODIFY STRING T1: DELETE CHARACTERS 1-9 VARIABLE MODIFY STRING T2: CONVERT TO INTEGER IN N31
  9. Alan's approach is well worth a try. Another method I have used successfully with some web forms, is to click once just to the left of the target field, then Text Type <TAB> into the field.
  10. Thank you everyone for the replies. I had done the negative of suggestion 5 -- that is, if the window was no longer in focus I was abandoning the typing on the theory that the user had intentionally canceled out of the window. I will try (5) or (6) and see if it flies. It will be vulnerable mainly during the duration of each individual Text Type command -- and I know there will be users who complain about that! It's amazing how 5 per cent of users account for 95 per cent of problems!
  11. We have several macros that retrieve data from one form and type it into another. While typing is taking place, Microsoft Outlook and Avaya Message Manager, among others, may pop up message boxes telling the user he has a new email or message. The pop-up gets focus and the macro keeps right on typing, but the text gets typed into the pop-up box or goes off to the Windows bit bucket. Can anyone suggest a way to keep pop-up messages from stealing focus? (We can turn off the notification option in some applications, but some people would rather not.)
  12. All very logical, Kevin, but I like "dead zone" better.
  13. There are many forms where controls don't work, or don't work the way you need them to. Straight typing with a macro should work. If you can type by hand, the macro should be able to type. On some forms, you might have to position for typing by clicking the mouse in the first field to be typed, or by clicking somewhere on the form and then tabbing into the first field. Take note of exactly how you do it by hand, then simulate that with the macro.
  14. If you have ME copy to clipboard, from a Word document, then Alt-Tab to another Word document and type from the clipboard, the italics are kept. Once you move the text from the clipboard to a ME text variable, the italics are gone even if you then move the text back to the clipboard again. Even with the Word-to-Word copy, I suspect MS-Office is using its own clipboard stack to carry the text, rather than the Windows clipboard.
  15. The only way I know to move it is to specific x- and y-coordinates. If you need to adjust for multiple users who format their menus and tool bars differently, then maybe you can find some attribute on the screen that give you an adjustment factor. For example, I have macros for a web-based application used by dozens of PCs, and the initial window has a blue band across the top about 80 pixels from top to bottom. So I scan downward from the top of the screen looking for that color, make sure the next 80 pixels downward are the same color, and record the y-coordinate where the first blue pixel was found. After that, all mouse movements are window-relative plus or minus the band factor.
  16. If Folder Exists "N:\Dag_Backup_Folder" Program Launch: Acronis.exe End If
  17. Terry, I'm kind of thinking out loud here, so don't hold me accountable if I say something really dumb. You want to deal with a panic situation, where there is a macro out of control. How about Ctrl-Alt-Shift-v to terminate ME? You kill off all running macros, but that is acceptable if you kill the offender along with all the others. Of course, as Kevin says, if Windows won't pass the keystrokes to ME, then that's no good. Or if Windows lets you get to Task Manager, have a macro consisting of the single command "Terminate process: macexp.exe". Have that macro triggered by the Task Manager window title. Of course then you would have to enable the macro when you want the safety valve to be active, and disable the macro when you want to use Task Manager normally. Ideally there would be a way OUTSIDE of ME to kill ME, other than through Task Manager, which takes too long. For example, a .cmd file that runs the Windows "kill" or "pskill" command. But how to make that .cmd file run when you want it to, especially if keyboard and mouse are locked out??? I don't know.
  18. There is no displayable character for the Carriage Return byte, nor for the Line Feed byte. So Clipmate may just be showing them to you as spaces to indicate that there is SOMETHING in those character positions. To keep the character positions in your text typeout, you need to do the same thing: change them to spaces. You can do that with the Replace Substring option of Variable Modify String. Variable Set T98 to ASCII 13 (Carriage Return code) Variable Set T99 to ASCII 10 (Line Feed code) Variable Modify String append T99 to T98 (CR/LF is now in T98) Variable Set String T1 from Clipboard (put your text into a variable where you can manipulate it) Variable Modify String T1 Replace Substring %T98% with ' ' (two blanks) [all instances] Type the T1 string rather than the clipboard
  19. The question was, to find out what the current settings are, not to have an impact on (i.e., change) the current settings. When I have used those two commands, the numbers returned always match what is shown by Properties | Settings | Screen Resolution. Maybe I'm missing something and I've just been lucky that it works in my situation?????
  20. This is a little off topic, but there are some smart people here so I'm going to ask anyway. I have an ancient but wonderful MCK-142 programmable keyboard. It has 24 programmable keys, call them PK1 through PK24. No special drivers or software are used with the keyboard -- all the programming is done on the keyboard itself and stored internally. I used the keyboard with Macro Express by programming keys to activate macros. For example, PK1 might be programmed to send sequence Ctrl-Alt-Shift-F1. Ctrl-Alt-Shift-F1 would run a macro. It was just easier to do a single keystroke than a four-key combination. Anyhow, the keyboard has an AT connector plug, then an AT-to-PS/2 converter cable, and it always worked fine with my old computer's PS/2 keyboard socket. My new PC has no PS/2 socket, so I daisy-chained a PS/2-to-USB converter onto the cable. So now it is AT-to-PS/2-to USB. It works fine for anything I physically type. However, when I activate one of the programmed keys, garbage data goes to the PC and indicator lights on the keyboard go off. I have a feeling that maybe USB can't handle the AT scan codes sent by the keyboard. But then why would manually-typed character work? I have no clue where else to look to fix it. Suggestions gratefully accepted.
  21. I think I have solved it. Through a macro (or otherwise????) the Win key apparently was "pressed" but not released. Once that was cleared up, all is right with the world once again. My old antique programmable keyboard didn't even have a Win key, so I never had to cope with it before.... Edit: I had a macro typing <WIND> l <WINU> to lock Windows. That's what was leaving the Win key depressed. I changed it to <WIN> l and it is OK now.
  22. I have a new PC running Win XP pro. It has a USB keyboard as opposed to PS/2 on my old PC. Windows and all applications are essentially identical to the old PC. The new PC is a different brand (Lenovo), and faster than the old. Intermittently, macros triggered via hot key do not run. For example, Keypad-asterisk key runs a macro that simply types Win+M to minimize all windows. It will work once, then won't work for five minutes or so, then it will work once again, and so on. Same thing with another macro triggered by Ctrl-Alt-m -- it might work once, then not again for several minutes. Also I pressed Ctrl-F1 to set the hot key for a new macro, and it showed up in Macro Express as if I had pressed Ctrl-Win-F1. Ideas, anyone? Are scan codes sent from a USB keyboard different from a PS/2 keyboard? Is there some Windows setting I need to change?
  23. I don't think you have to use a decimal variable as such. Use the new date/time variable format, like this: Date/Time command to create a date/time variable, give it a name like datx, and set it to current date/time (this is all done in one command). Variable Modify Date/Time: Convert %datx% to Text String (use the "ddd" option which puts Mon, Tue, Wed, etc. in the text variable T[1]) Series of IF commands to add to datx, based on what is in T[1] -- for example IF %T[1]% = SUN Variable Modify Date/Time: %datx% = %datx% + 1 day END IF IF %T[1]% = SAT Variable Modify Date/Time: %datx% = %datx% + 2 days END IF Variable Modify Date/Time: Convert to Text String (use the "m/d/yyyy" option, or whatever format you want, to put 4/26/2010 in the text variable T[1]) Text type T[1] or Text Box Display T[1]
×
×
  • Create New...