Jump to content
Macro Express Forums


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by rberq

  1. For a black/white split area, where left and right margins are known and black is on the left, this script will find the dividing line within two or three pixels. It only retrieves 13 pixels. 13 may be one or two more than necessary -- I haven't done the exact math. For an area bigger than 1900 you might have to increase the Repeat count to 14 or 15. To get the exact dividing line a little more code would have to be added, to step through the last two or three pixels one at a time. I moved the mouse, and inserted a half-second delay during each Repeat, so I could watch it run. Get ri
  2. Binary search, of sorts. This would work extremely well to find the dividing line between two colors. Even a full-screen search 1920 pixels wide would only require retrieving about a dozen pixels. But for more than two colors it gets sketchy.
  3. If the macro is working, you must not have corrupted it enough to worry about. Here's a suggestion, somewhat related to your question: If you have to change the text with any frequency, you could maintain it in a Notepad document, where it is easy to edit. Your macro could open the Notepad text file, copy all to the clipboard, put clipboard contents into a variable, and type the variable. You would "never" have to touch the macro again.
  4. P.S. Getting pixel relative to window, I wanted to use the Windows clock as a timer. So I started the macro, then within a second or so I clicked down in the lower right of the screen to open up the calendar and clock display. As soon as I clicked and took focus away from the original window, the macro would complete almost instantly. I displayed the Repeat counter in a text box at the end of the repeats, so I know it was completing "normally". I would guess that when the window loses focus, ME bypasses whatever system interaction that otherwise would take all the time. If getting pixel
  5. Yes, your macro runs painfully slowly on my PC, also. About 12 to 15 seconds. Doesn't matter whether I get colors relative to screen or relative to window. Windows 10 Pro, ME Pro
  6. I use that technique a lot. It looks like your code should work. If the macro isn't ending, are you sure the pixel is really changing to the color you want? Since you are checking for location relative to the screen (not the window), a slightly different window position or a different screen resolution (different computer?) could cause this. Also, sometimes certain shades on my screen will be made up of alternating pixel colors -- for example, getting a gray color by intermixing black and white pixels -- so if you are only one pixel off in location the test won't be reliable.
  7. An integer variable may be set to the position of a substring within the text. So if you find it at position 1, then "replace". There's an option within "replace" to do it once only, or for all occurrences.
  8. Some consolation! I suspect Microsoft rewards their employee-of-the-month by saying, "Here's a popular product, go ahead and have some fun by making whatever random design change strikes your fancy." I just spent 30 minutes trying to turn off an "error" option in Excel. I could turn it off for a particular spreadsheet but it would turn itself back on almost immediately. Finally read an online hint to click File and Options, and that way I could turn it off universally and it would stay off. The oddest thing is, this is a monthly spreadsheet and the "errors" just started showin
  9. I use a variant of this technique for saving e-mails to existing folders, though not for creating new folders since I do that only rarely. Some email sources have a consistent window title, others can be reliably identified by phrases in their content or simply by the "to" or "from" fields. To dispose of an email that's on the screen, I start a macro that analyzes these items, sends it to the appropriate folder, or deletes it if it doesn't qualify for saving. I admit the macro clicks on screen icons to do its work, so when GMail changes its layout the macro has to be adjusted. But that doe
  10. I ran ME 3 for many months on Win 10. I don't remember whether it asked that on the very first startup, but it was OK otherwise. Are you saying it asks every time it starts?
  11. You could look into the instruction "Wait for Key Press" which has many wait options other than "key." You might be able to do something with that. You can start a macro (or multiple macros) that just sit on the Wait instruction, then when the key-press occurs the waiting macro can run some other macro. Unfortunately the wait appears to deal only with three mouse keys, not four or five, but you could potentially set up a combination of mouse keys or letters. It might be tricky and involve multiple macros. Good luck!
  12. So don't keep me in suspense! I'm apparently doing my activations incorrectly, also. Please tell! 😬
  13. For what it's worth -- Here are some hints from another forum that I follow. No warranty expressed or implied. Always remember: "Microsoft is arrogant and will *tell you* what you want" and "Google wants to know and control everything about you, all the time" To that end, here are some easy tips to speed up Win 10. 1. Ctrl-Shift-Esc for task manager, go to Startup tab. Disable Onedrive. 2. Hit windows key, search for 'background apps' Turn them all off 3. Open Chrome. Settings, Advanced. a. Preload pages- off b. Continue running background apps - of
  14. Being south of the border, I had to send a check rather than a cheque. But my other question: What is ME 5? Is it just ME 4 under a different name? And still more questions: I tried to convert to from ME 3 to ME Pro back around 2009, for a pretty complex application running on 350 PCs, as I recall. Nothing much worked during testing, so I stayed with ME 3. I just recently converted my home PC from ME 3 to ME Pro, and I'm still seeing ME Pro crash about once a day. So to finally get to my questions: Did you experience any significant pain going to ME 6, or was it ne
  15. That's called the bleeding edge. Must be a version 6 thing. Mine tells me it is, but no additional message. What is ME 5? Just updates to ME 4 under a different name so they can start charging for it? I got used to "free". I don't remember, but I think I paid about $15 for ME, and used the pre-Pro versions for about twenty years. That's 75 cents a year for a tool I said added 50% to my productivity. I always felt guilty when I installed updates, and worried that Insight would go out of business for lack of revenue.
  16. Yes, please. I immediately looked for an update beyond, but found none. Updating version 6, maybe?
  17. Now here's a cute idea. I started a macro that runs indefinitely -- entire macro is below. So whenever I press the ESC key the macro types your suggested sequence to close the active application window. Then the macro just waits until I'm ready to close another one. Works great with Windows 7, but again ME does not see the ESC key in many Windows 10 operating system screens, so still no dice. The other problem with this, even in Windows 7, is the limited number of keys that can be waited for. I'd rather use a key that is "never" used any other time. Repeat Unti
  18. You have given me hope. I have a Windows 10 system on order, and I'll have a lot more time to experiment once I get everything else converted to it.
  19. Little things like that save a lot of time and aggravation when you are coding.
  20. Every bit as good as my method of finding the upper right corner and clicking on the "X". Except my macro closes just one tab at a time (Ctrl-w) if Firefox is the active application. But my problem is getting the macro to run at all, so that it can simulate the keystrokes you outlined. As Cory explained, in the UWP applications in Windows 10, ME never even sees the hotkey to trigger the macro. The beauty of the keypad-minus key is, many applications give you the option to save/no save your work when you exit, so I can just hit the minus key with my middle finger and roll my thu
  21. Yes! It does! So now if I can figure out the name of that little window, I'll see if it can trigger a macro that types the "c". You say it's called the Windows System menu?
  22. For example, the Windows Setup screen and the various screens that can be accessed from there.
  23. "Doesn't work with them", in this case, seems to mean that while the application is running, MEP doesn't see key strokes and therefore can't start macros. I have seen the same ME problem under Windows 7, with the Adobe PDF Reader. Adobe says the reader runs in Protected Mode as a security feature. With Adobe the Protected Mode can be turned off, and then ME is happy.
  24. Since my hands are most often on the keyboard, I prefer using keys to using the mouse. One of my most-used macros closes the current application. If Firefox is active, it types Ctrl-w to close the active tab. Otherwise, it clicks in the upper right corner of the active application’s window. The macro is activated by the keypad minus key, and it’s generally quicker to press the key than to manually maneuver the mouse or to press that awkward Alt-F4 combination. Here’s the problem: In many Windows 10 system screens, the key is ignored so the macro doesn’t run. Other hotkey combinatio
  • Create New...