Jump to content
Macro Express Forums

All Activity

This stream auto-updates     

  1. Last week
  2. Cory

    Check Window Title for String

    You might benefit from using the macro command search feature. If you typed "Repeat" or "Window": you probably would have found "Repeat with Windows". Also the help file.
  3. rberq

    Check Window Title for String

    Have a look at these commands: Repeat with Windows: Place title in %T1% Variable Set String %T1% from Window Title If Window Title "Yahoo - login - Mozilla Firefox" is on top If Window Title "Yahoo - login - Mozilla Firefox" is running Many ME features dealing with window titles can check for partial strings or for exact matches.
  4. Is there a way to check a window title for a particular string? example: Repeat Until --> Find a particular string in a window title. Thanks! Nicholas Kormanik
  5. nkormanik

    Scheduled Macro, Watch The Countdown

    You guys are super. Thanks! I'll try and work with it.
  6. Cory

    Scheduled Macro, Watch The Countdown

    I had a separate multipurpose macro for this I would use as a subroutine. A simple loop with 1 second delay. Update text. I'd pass the parameters like number of seconds, message and so forth. It's slightly more than one second because of the run time of the macro but in testing I found it negligible. I had many cool features of the display as well as the ability to cancel. When the macro is done, your main macro continues. I used it in many macros.
  7. Samrae

    Scheduled Macro, Watch The Countdown

    If you choose the 'Floating box until "Close Box" or end of macro' option in Text Box Display you can use the 'Update Textbox' comand later in your macro. To see how this works check out the "Show Macro Progress" macro in the samples.mex macro file.
  8. rberq

    Scheduled Macro, Watch The Countdown

    You can use Text Box Display, with the remaining time displayed as a variable. Something like this: // Variable Set String %T1% "4:58" Text Box Display: %T1% Delay 700 Milliseconds Text Box Close: %T1% // You may have trouble getting it display as often as once per second, simply due to the timing within ME. As far as I know, you can't change the value within an already-displayed text box, so it has to be closed and a new box displayed for each time change.
  9. Suppose we have a scheduled macro. Scheduled to end in 5 minutes. Is there a way to put the countdown into a text box? i.e., 5:00 4:59 4:58 ... 0:01 Gotta be. Thanks! Nicholas Kormanik
  10. rberq

    Repeat Loop For 30 Seconds

    😮 I have been using ME for years and I still stumble onto hidden stuff like that.
  11. nkormanik

    Repeat Loop For 30 Seconds

    Plain sneaky. What's it doing hiding there??
  12. rberq

    Repeat Loop For 30 Seconds

    Variable Set Integer has options to load current hour or minute or second into variables. Also experiment with the Date and Date/Time commands.
  13. nkormanik

    Repeat Loop For 30 Seconds

    Good code. Thanks! But the desperately needed info is how to get TIME PASSED into a variable. 30 seconds. Or time counts up to 30 seconds. In a variable. So far, can't find it. Seems Macro Express Pro left it out. Go figure.
  14. rberq

    Repeat Loop For 30 Seconds

    This logic waits for up to approximately 20 seconds (200 tenths). As soon as screen colors match the expected values, it exits from the REPEAT loop. If colors do not match within 200 iterations, it also falls through the REPEAT END to whatever instructions follow. // wait 20 seconds for switch to password screen (monitor for change from blue to white, and for Submit button (gray)) Repeat Start (Repeat 200 times) Get Pixel: Screen Coords: 600,565 into %N1% Get Pixel: Screen Coords: 268,466 into %N2% If Variable %N1% = 16777215 AND If Variable %N2% = 13160660 Repeat Exit Else Delay 100 Milliseconds End If Repeat End
  15. nkormanik

    Repeat Loop For 30 Seconds

    Some actual code, please. Sounds basic, until one tries to do it.
  16. rberq

    Repeat Loop For 30 Seconds

    Great idea! Too easy! I tend to use acantor's technique, but of course that only approximates the duration. In any case I think it's a good idea to have a delay inside the loop, even if a very short one, on the theory that the delay releases control to Windows so the computer can do something else during the REPEAT loop rather than just a CPU-bound loop. Of course I don't know if that's how ME interacts with Windows, but I contend it's a good theory in any case. 🙂 For most "wait" loops I use 100ms as the delay, since 1/10 second is almost imperceptible to the user. Additionally, a timed delay is independent of processor speed, so the macro will appear to run more-or-less the same on older vs. newer PCs.
  17. Cory

    Repeat Loop For 30 Seconds

    Sure there is. It's called Repeat Until. Set a time variable value to 30 seconds in the future before the loop begins. Set the time in a second variable in the loop. Then use the "greater than" comparator.
  18. acantor

    Repeat Loop For 30 Seconds

    I think the best you will be able to do is repeat an action x times, with a delay within the loop. You would have to experiment with the number of repeats and delays to take 30 seconds. A loop repeated 30 times with a one second delay would be a good place to start.
  19. Earlier
  20. nkormanik

    Repeat Loop For 30 Seconds

    I see lots of options for repeating a loop within a macro. But not a way to do it for a specific amount of time. Suppose we want to repeat a loop for 30 seconds. Then stop that loop, and continue onto the next part of the macro. Can we do this? How? Thanks much! Nicholas Kormanik
  21. acantor

    Dynamic Menus

    It may be worthwhile to automate, or semi-automate, the process of adding items to a menu. Much depends on how often you need to do this. Many years ago, I decided to build a MEP script that (mostly) automated the task of adding items to a Macro Express menu. It was a tough slog. Over the years, I spent more hours than I would like to admit honing the script. I eventually got it to work reliably, but it's debatable whether it saved me any time. However, there is no doubt that refining my scripting skills was far more enjoyable than it would have been to laboriously add menu items, 10 or 20 times a week, 48 weeks per year, for years and years.
  22. Cory

    Dynamic Menus

    Your welcome
  23. MCH

    Dynamic Menus

    I was afraid that might be the case. Good to have the definitive answer though, thanks Cory.
  24. Cory

    Dynamic Menus

    Not easily. There might be a way to create a macro that exports macro information periodically and processes that string data to determine which are scoped to Excel and then manually create the macro text and have it load the text as macro. But I think you would still need to restart the macro. If it could be done it would be very cumbersome and difficult. It would be far less work to simply add the new macro to the popup menu when things change.
  25. MCH

    Dynamic Menus

    For, for example, Excel, is it possible to create a ME floating or popup menu which would automatically and dynamically contain only those ME macros which have a scope (or name) including Excel? If so that would enable me to invoke that ME "Excel Menu" to see which Excel-relevant ME macros were available to me. I know that I could manually create an "Excel Menu" whose scope includes "Excel". What I am asking is whether that menu could be automatically populated by Scope (or Keyword?) , so that if I add a new Excel-scope macro to ME, it would automatically appear on the Excel Menu. Doable?
  26. nkormanik

    Dynamically Control Macro Playback Speed

    Related question (maybe I should start another thread?): I want the entire process, whatever it's doing, to terminate after 5 minutes. What's the best way to accomplish this? Thanks!
  27. acantor

    Can ME3 find an exact cell in excel ?

    There is another way to navigate to a particular cell in Excel, but it doesn't involve Macro Express. The method executes a little quicker, and is not as "flashy" because it doesn't involve the "Go To" dialog box. 1. Expose the "Developer" ribbon in Excel. 2. Click "Developer," and choose "Record." 3. You will be prompted to assign a "Shortcut key" to your macro, Ctrl + something. Choose a combo like Ctrl + forward slash... on any key that that you are unlikely to press by accident. 4. Choose to save the macro in either "This Workbook" (so that the shortcut key will only be available in this workbook); or "Personal Macro Workbook" (so it will be available in other workbooks.) 5. Then use Samrae's method to navigate to the cell: press Ctrl + G, type the cell number, and then press Enter. 6. Click on the "Developer" ribbon, and stop the recording. 7. Then press your shortcut key to activate the Excel macro.
  1. Load more activity
×