Jump to content
Macro Express Forums

rberq

Members
  • Posts

    1,200
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by rberq

  1. Must be an ergonomically inadequate screen. The first time I needed to use it I missed what I needed also and had to write to support for help.
  2. Another way, if you know what the text will be when you write the macro, is to put it in the Program Parameters part of Launch Program. For example: Program path/name c:\windows\system32\command.com Program parameters /C copy xxx yyy
  3. Macro Properties / Activation / Set Schedule allows you to have it run every x minutes / seconds, between the dates and times you specify on the schedule screen. So don't have a Repeat loop in the macro itself, just schedule it to run repeatedly within the desired time frame.
  4. Along the same lines, let's say that Macro A's properties say to activate it when Window A appears. If Macro B is already running when Window A appears, Macro A will run as soon a B ends (with caching). It would be handy if hot keys were likewise cached, so if I enter the hot key combination for Macro C while B is already running, then C would run as soon as B ends.
  5. Variable Set String T1 [from topmost window title] Variable Modify String T1 append " " (to assure that there is at least one blank at the end of the string variable T1) Variable Set String T2 = "" (null) Variable Set String T3 = "" (null) Repeat Start 999 times [with counter beginning at 1 placed into variable N1] Variable Modify String T1 copy 1 byte of text from T1 to T2 starting at position N1 If T2=" " Repeat Exit End If Variable Modify String append T2 to T3 Repeat End The above repeat-loop will break when the first blank space is found in variable T1, and the word found up to that point will be in T3.
  6. Is it a DOS-style command window that is scrolling? Where is the scrolling text coming from? What response do you have to make when it pauses?
  7. Get Mouse Position Screen %N1% %N2% Move Mouse Window 291, 388 Mouse Left Button Click Mouse Move Screen %N1% %N2%
  8. You must be a masochist. Probably one of those guys who thinks C++ is too much a high-level language, and writes machine code instead.
  9. Another idea: Put a temporary multiple choice menu (Dialog) at the beginning of the macro, and use the result to set a variable like N1=1 or 2 or 3 or ... etc. Or just set the N1 value with a statement at the beginning of the macro, which you change manually as your testing progresses. Then break up your macro into convenient chunks that are only executed based on the value of N1: If N1 >= 1 do first chunk End If If N1 >= 2 do second chunk End If If N1 >= 3 do third chunk End If If N1 >= 4 do fourth chunk End If etc.
  10. Mouse Move to beginning of text Mouse Left Button Down Mouse Move to end of text Mouse Left Button Up works fine to highlight text in the posting above this one in this forum. No delays needed. So I'm guessing there is something unusual about the window you are trying to select from. I think you said this works some of the time, just doesn't work reliably. I have noticed, when manually highlighting text with a mouse, especially on a web page, that the mouse has to be in exactly the right place when I press down the left button and start to drag the mouse. Perhaps the positioning is just right on the few times that it does work, and not the other times? For example, I said the above four-line macro worked on postings in this forum. But a slight shift in the screen, scrolling down just a single line, changes the highlighting so I no longer pick up the first character of the first line. Windows doesn't render the screen in exactly the same way from one time to the next.
  11. Have you tried highlighting the text by doing a mouse left button click at the beginning of the text, then SHIFT DOWN and ARROW DOWN(S) and ARROW RIGHT(S) followed by SHIFT UP? Try it manually, and if it works then you can turn it into a macro. When I do the mouse click (in this forum, for example) there is no indication on-screen that the cursor has been placed there, but the subsequent highlighting keystrokes start from that position.
  12. Another place to introduce a delay is after your Activate Window. And / or put a Wait for Window Title after the Activate. Mouse may be doing its thing before the window is really "there".
  13. It looks like you are trying to grab the top bar of a window, and slide the window to a different location on the screen??? Instead of your first command being "Mouse Move Window 40, 705" I would expect to see something like "Mouse Move Window 40, 5". A y-coordinate of 705 would put the mouse way down toward the bottom of most windows. Maybe you are getting mixed up between mouse position relative to the SCREEN, and relative to the WINDOW. Be sure to click the correct radio button when scripting the mouse move commands. Another way to move a window is with the Window Reposition command.
  14. Variable Set String to Topmost Window Title (while the email is on top) Let's say you store it in variable T99 Then after running your other program,to switch back to the email use Activate Window, specifying %T99% as the window name.
  15. Thank you, Steve, that's just what I needed to know. You must be a mind reader, because you anticipated exactly what I want to do -- write several variables per line, separated by commas, with cr/lf for each line. P.S. Now I don't need to know how big a string variable can be, because I can write them out to disk as I build them. I was afraid I would have to accumulate thousands if short strings by appending them to a string variable, then "type" the whole thing into a Notepad file.
  16. Two questions: 1) Is there a way to write directly to a text file with ME? I'm looking for the opposite of ASCII File Begin Process or Text File Begin Process. I can't seem to find any such command, but hoping I am just overlooking it.... 2) How big can a string variable be?
  17. If you are storing these on a network server, you should be able to get your network gurus to set permissions on the folder or the share so that "everyone" can read the files, but only you can modify or delete them.
  18. Misbehaving, or "working as intended", as a practical matter it doesn't seem to be an issue except when running software like ME that "sees" the window that a human would never notice. I don't know if it is Citrix-related or Windows-related. I'm testing macros now with a somewhat similar web-based application, so I expect I will find out! Thanks for the feedback!
  19. "... but when I changed the window to any other window, the Activation Window (Macro Express Forums) pulled itself back to the front and the macro ran again" SCASPER, I have a Citrix application that opens and closes (or doesn't close) half a dozen different windows, and each window has its own macro tied to the window title. What I have seen is, when the application switches from one window to another, one of the other windows may become "on top" for a brief instant and its macro will run again. It's an intermittent problem, it may work perfectly ten times in a row and fail the eleventh. I had to set variables indicating which window should REALLY be active; and the first thing each macro does is check whether it is really supposed to be running or not, and simply stop if it isn't. I don't know whether you are seeing a similar phenomenon, and I'm not sure how to account for it happening only once. One theory for the "once only" is that it is a caching issue -- that is, the first time you switch to another window, the related programs and data may have been paged out of memory, and during the page-in time the original (macro-activating) window briefly gains focus again. The next time you switch perhaps everything is in core and the switch happens cleanly. I would be interested to know whether your extra macro runs are 100 percent consistent, or intermittent.
  20. Set Variable T99 = ' ' (blank) Repeat Until T99 = 'x' Do stuff If Window xxx is Not Running Set Variable T99 = 'x' End If Repeat End
  21. WHY CAN"T it KEEP ON FIRING WHEN THE SPECIFIC PROGRAM WINDOW IS ACTIVE? You want it to run over and over again, as long as the window title is active? Put a REPEAT at the beginning and REPEAT END at the end. And somewhere in the logic, check for whether the window is (still) active and on top, and REPEAT EXiT if it is not. Otherwise it will never stop.
  22. 1. Choose a network location for your master. Just needs to be a folder on a server where you store the .mex file, and "everyone" should have read permissions to the folder. 2. From your PC, open the network .mex file and import individual macros from your personal .mex. Repeat whenever you want to update the master. 3. Put a .bat file on each user's PC, in "Documents and Settings\All Users\Start Menu\Programs\Startup". The .bat file just consists of a copy command, copying the .mex from the network location and overlaying that on the user's PC. The .bat command will run when the PC is booted. You may need permission from whoever manages the office PCs, to add the .bat command file to users' startup. Alternatively, just give users the .bat file and a desktop icon to run it. It might be necessary to restart ME after the copy (CTRL-ALT-0). The above has an obvious drawback, in that any macros the users themselves develop will have to be in the master .mex, or they will be overlaid by the next copy. It will require central management and coordination to make this work. I don't have that problem because my users will not be developing their own macros.
  23. I like the way you think: "It works, but it's boring, so let's make it elegant." A name one B name two C misc D uncheck box E check box How about this: You're dealing with 5 fields, the variation being their order on the form. Associate a letter with with each field, as above. In a text file or via a ME input inquiry, enter the sequence of the fields as they are today. "ABCDE" or "BCEAD" or "DCAEB" or whatever. Then code a repeat loop to pick up one character at a time, do the action associated with that field, tab to the next field, repeat until all 5 fields have been completed. It's kind of the same thing you described with your multiple-choice menu, only more compact than making a menu to cover all the possibilities. If the form only changes daily, then I like the text file idea (or an environment variable) to store the field sequence, because then you can enter it once and use it all day long, rather than re-enter it each time.
  24. Click in the title line. You can sort ascending or descending by name, activation, scope, modified date....
  25. Sorry, I'm out of ideas. I have seen the manual Alt-Tab sequence and the Tab stop working, once, after running some macros. I never did get to the bottom of it, and was not able to reproduce it, but now I'm wondering if it could have been a persistent CTRLD where for some reason the CTRLU didn't happen. FWIW, I always use separate CTRLD and CTRLU entries, same for SHIFTD and SHIFTU, and ALTD and ALTU. I'm not sure whether that is always necessary, but at least you know what you are going to get -- some combinations like CTRL-a (to highlight all) seem to work, but others like Alt-Tab-Tab (to tab among windows) give significantly different results compared to ALTD-Tab-Tab-ALTU.
×
×
  • Create New...