Jump to content
Macro Express Forums

rberq

Members
  • Posts

    1,203
  • Joined

  • Last visited

  • Days Won

    61

Posts posted by rberq

  1. 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.

  2. 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?

  3. 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]

  4. John, I'm glad to hear you confirmed the same problem. Since no one else had mentioned it (or I missed the mention), I was afraid my testing method was to blame rather than MEP.

     

    I have quite a number of window-title-activated macros that rely on single-threading, because they use variables stored in previous macros. We have been buying ME PRO licenses in anticipation of converting from ME3 to MEP, but I think the next batch will be ME3 licenses. I'm beginning to doubt that MEP will ever be ready to use; or by the time it is, our main applications will be nearing the end of their life-cycles so why bother. We came into this major project at the end of ME3, when it was a "mature" product, and 99.9 percent of everything worked as advertised. MEP has been nothing but frustration.

  5. There is an option to add them automatically when converting an ME3 macro file to MEP, or when importing macro(s) from ME3 to MEP. I don't think they get inserted automatically when creating a new macro in MEP.

     

    In my testing, lock and unlock did not work properly with window-title-activated macros; the lock and unlock might as well not be there, for all the effect they have. I reported that to Insight as a bug and was told it was fixed in the next MEP release; but that was weeks ago and the next release has yet to appear. I don't know whether lock/unlock work with activation methods other than window-title; apparently they do, if they fixed your problem.

  6. Can the applications be started with commands entered in the Start | Run box? If so, put the individual commands in a .bat file, and run the file. For example, the first command below will start Internet Explorer and open the web page for this forum topic. The second command will start another copy of IE and open the Google search page. The third command will start Notepad.

     

    start iexplore "http://pgmacros.invisionzone.com/index.php?showtopic=4371"

    start iexplore "www.google.com"

    start notepad

     

    When you have put all the individual startup commands in a .bat file, then make a desktop shortcut to run the batch file, or double-click the batch file name in a folder, or enter it in the Start | Run box. You don't need Macro Express to do it, but you could write a macro command like "Program Launch xxx.bat" to run the list of commands.

  7. Does your script command look like this? For example, for Control-c (copy to clipboard):

    Text Type: <CTRLD>c<CTRLU>

     

    Where do you put the delay? If you think the macro is feeding the keystrokes faster than the application can accept them, then try preceding your Text Type command with something like:

    Keystroke Speed: 30 Milliseconds

  8. I always do the (SHIFT / ALT / CNTRL) DOWN separate from the UP. I have the perception, rightly or wrongly, that separate commands are more reliable across a variety of PCs.

     

    For what it's worth, I recently had to change a macro from using MOUSE LEFT CLICK, to using MOUSE LEFT BUTTON DOWN followed by MOUSE LEFT BUTTON UP, with keystroke delay of 30ms. For some reason, with the particular application the macro interacts with, the separate operations were much more reliable.

  9. A DOS batch file can set a return code, for example

    EXIT 5

    which can be tested within DOS like so:

    IF ERRORLEVEL ....

     

    If I launch a DOS batch file from ME, can I get the return code directly into a variable? For example something like this, which I have tried and it doesn't seem to work:

    Variable Set String from Environment Variable [ERRORLEVEL]

     

    How about the return code from a Windows program?

  10. That's an clever approach, John. It will be interesting to see whether the AutoIT script runs fast enough to be practical.

     

    One thing you might think about: I have noticed that some Web page renderings, even though they are "identical" from one day to the next, seem to be off by a pixel here and there, at the boundaries between two colors. If true, this makes your absolute reliance on the corner pixels a weak point. I wonder how it would work if you chose random pixels to match, rather than specific (corner) ones. The random sample could be chosen either when developing the original map, or at search time. Probably it's more efficient to choose the sample only once, when developing the original map.

     

    Then when searching you would not require 100 percent matches between map and screen -- to allow for the "expected" tiny differences from day to day in screen formatting. Probably matching 90 to 98 percent of the pixels would be enough to make the identification.

  11. Isn't the pixel mapping that has been mentioned numerous times in the forum the same thing?

    No, it is related, but not the same at all. With a pixel map, you can look at a spot (or many spots) and see whether what is there is what you expected to be there. That's kind of the opposite of knowing that what you want is (or may be) somewhere on the screen, but you don't know where.

     

    Granted, you could write a macro that prompts you to select two opposite corners of a rectangular area, then saves a pixel map of the rectangle at whatever resolution you choose. That is easy. Then, in theory at least, another macro could scan a screen matching the original pixel map against every same-sized rectangle to see if the map matches a section of the screen. But my PC is not a Cray-15 or an IBM Sequoia. As a practical matter, the matching has to be done by a fast, pre-compiled program. A run-time-interpreted script like Macro Express is orders of magnitude too slow to do the task in a reasonable time.

  12. ME does with the keyboard and mouse pretty much all that I can do with them. What ME does not do well, is what I can do with my eyes. For example, there are many forum questions about how to locate a control on a screen, when the control is not of the type where “GET CONTROL” or “CAPTURE CONTROL” will work. This is especially a problem with web forms, where the browser may format the screen somewhat unpredictably.

     

    I’d love to see a Macro Express scanning feature to simulate what we easily do by sight. This would consist of a “Capture Image Fragment” command, where you would mouse-outline a piece of the screen, and ME would save the bitmap or pixel map of the outlined area. Then at run time, there would be an equivalent “Find Image Fragment” to scan the screen and return the x- and y-coordinates of the fragment. Then you would simply move your mouse to the coordinates, click to get the text cursor there for typing, double-click if appropriate, and so on.

     

    When I searched the Internet, I found “Macro Scheduler”, sold by mjtnet. It has an Image Recognition feature that does this pretty well. Macro Scheduler can create executables that will run on any PC without the base product being installed. I am tempted to buy a copy for image recognition alone. It could be used from ME by running the executables with the Launch Program command. But it would be a lot easier to have an integrated ME feature.

     

    Does anyone know of a similar independent product that could be used with ME?

  13. Ditto everything Cory said. Microsoft has spent millions developing .NET, including powerful and pretty-simple forms development, and it's easy to integrate the forms with ME. It's going to be very hard for you to make anything nearly that powerful. And when you do, because it is oriented to ME, you will sell the software by the dozens or hundreds at best. Sophisticated PC software can be sold for 50 or 100 bucks a copy because it is sold by the tens or hundreds of thousands of copies. ME-based forms development might be a good hobby, but you probably won't retire on the profits.

  14. One approach is to have a separate "learning" macro, where you prompt the user to navigate manually through the screens. At each point where the screen is to be clicked, have the user put the mouse in the right place (without clicking) and press the ENTER key or some other key. The macro does a WAIT FOR KEY PRESS and when the user presses the key, you get the mouse coordinates and save them to a file. The user only has to go through this process once, and when he is done you have saved coordinates unique to his screen resolution, his version of IE, and so on.

     

    You can get as fancy as you want with this. For example, the learning macro could store pixel colors for key locations, and check them each time the "real" macro runs. That way you can detect whether the user has changed his IE settings, screen resolution, etc. and force him back to the learning macro if something has changed. It's also a good idea to force the IE window to some predetermined size (WINDOW RESIZE) in case the user shrinks it down or goes from smaller to full-screen or whatever.

  15. Thanks for the responses.

     

    Part of the problem turns out that the switches were mis-programmed, so the right-side Shift key, operated by the user, triggered the change from one PC to the other. Still no answer on why the <TAB> and <BACKSPACE> act strangely ... I suspect something else caused by the KDM (KVM?) switch, since I have replaced the offending <TAB> with a mouse click, and removed the <BACKSPACE> entirely, but IE still sometimes goes back to the prior web page.

     

    So ME is likely an innocent bystander here, not involved in any of the problems. But of course it gets blamed by the users because it's there....

×
×
  • Create New...