Jump to content
Macro Express Forums

All Activity

This stream auto-updates

  1. Earlier
  2. Hope Jeff won't mind me hijacking his thread, but it is kind of relevant ..what programming language is Macro Express under the hood? Is that a daft question. I wouldn't be surprised...!!
  3. I have a macro that I've been using for years which downloads a file from an FTP site. Recently it stopped working, and upon debugging I discovered that when it performs an FTP GET, the result string is "Can't check for file existence". However, it can connect to the site and list the files. Here are the relevant steps in the macro: FTP Connect FTP List Directory Check variable from 'List' to make sure it contains expected filename FTP Get File If Not File Exists (downloaded file) generate error & abort macro In step 4 the return string is
  4. 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
  5. I spoke too soon. I tried a bi-directional search for a thin vertical line. The approach doesn't seem to work efficiently when the position of the vertical line along the x-axis is not known. Maybe someone will come up with a better implementation than mine! However, I now have a bi-directional search that locates the border between two regions, rather than a one-pixel wide line. It seems to work OK when the regions are reasonably large. Imagine a window with two colours. The left half is entirely black and the right half is entirely white. We want to move the mouse cur
  6. 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.
  7. I see, I tried your method hitting Enter instead of Double Clicking or right click: Modify Command and they all do the same thing. I can see why you don't use the Direct Editor much. I agree the Scripting Editor is much easier in instances like these, whereas in ME 3.0 the Direct Editor did almost the same thing as the Modify Command. It had some minor code in it at the beginning and the end of the text. So this has been a good tutorial for me - thanks.
  8. That's not the way I use Macro Express, but what you are doing sounds like it might work. For example, I rarely use the Direct Editor; the Script Editor works fine for me. To revise a command, I select it via the keyboard and press Enter. I've never tried double clicking a command, but I've seen people who right-click on an instruction and choose "Modify Command" from the context menu. I'm not sure there is a maximum number of characters that can be outputted via the "Text Type" instruction. But in Help, I see this: Another option is to split a long Text
  9. Wondering if this is a bug, I simply copied the text from the Direct Editor and created a new ME 5 macro and pasted the text in it's Direct Editor. Upon looking at the Scripting Editor I saw the same behavior, but on closer look I see that the Scripting Editor simply does not show the complete list. It stops after a certain number of lines. There are 70 lines in my text macro. I have a feeling this is not a bug but the way it was intended. Maybe I'm wrong. So to me the bottom line is when I want to make adjustments to this macro, I'll go to the Scripting Editor and double clic
  10. This script never displays the middle Text Box: Text Box Display: Start Goto:Blablabla Text Box Display: Middle :Blablabla Text Box Display: End
  11. I have a macro that has issues when certain programs are not running that causes failures. Main purpose is to change the locations of 4 application windows. I have told the macro to ignore the error to keep running if certain programs are not running. But this causes unwanted results. The active apps get the wrong location and window size applied to them if the other apps are not running. So need to skip over parts of the macro for the apps that are not running. Wanted to know how to use that goto command? Never tried to use it before. Read the instructions but not sure how to con
  12. I'm aware that Insight is working on issues related to the display of lines in the Script Editor. I reported a problem that I noticed and reported it to Insight, and they acknowledged it. Perhaps there are related display problems in the Direct Editor. I suggest filing a bug report with Insight.
  13. Good point Terry, sometimes the pixel colour changes when hovering the pointer over an area of the screen. Macro Express scripts run noticeably faster when checking colours via their coordinates rather than via the position of the mouse pointer. These scripts involve more math, but that's an advantage. Computers excel at doing mathematics, and are less good at constantly moving the mouse pointer!
  14. Pixel hunting under Windows 10 is molasses-slow. Earlier this year I reported the issue to the folks at Insight. They responded that it's due to a change in Windows, and there is little or nothing they can do about it. The best workaround I have come up: Instead of checking every pixel along a path, I now check in 50 or 100 pixel intervals. I've managed to make this work, although I had to completely rewrite several macros. There are times when the target is small, maybe one or two pixels wide. I haven't tried to repair these yet. I'm not sure what I will do
  15. I’m unable to clearly visualise what you are seeing but I’d definitely agree with @rberq’s suggestion to abandon that approach. The text file method is probably the best. But one alternative you might consider is to place a Variable Set String with a Prompt at the start. Use that variable to type the text. On my iPad at the moment so haven’t tested it. EDIT: Back on my PC I tested that idea and it works as expected. Here's an example macro. It uses two variable commands to make changing the text easy. Variable Set String %tText% to "I'd suggest you first redu
  16. That's intriguing! But I don't seem able to reproduce it. I'm running from debug mode (F9) if that matters. Choose the browser title and hit Enter. Then quickly click anywhere else. Not only does the macro not immediately complete, but it doesn't complete at all and has to be terminated.
  17. 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.
  18. I'm using ME 5. I created a text macro in 3.0 and it's hard to modify it in 5.0. The text macro types several paragraphs by hitting a hot-key. In 3.0 I could use the direct editor and the text was displayed pretty much exactly like the paragraphs and it was easy to add a new paragraph. In 5.0 the Direct Editor displays 2 long lines with my text embedded with lots of code, I can't simply just paste my new paragraph without lots of modification. If I go to the Scripting Editor, I see my text not as 1 block like 3.0, but 2 blocks. One marked 1 and below it 2. I
  19. 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
  20. 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
  21. Arising out of the current posts by@sdspieg I see that on my Win 10 Pro PC (i7, 4.0 GHz) pixel-hunting macros are now even slower than I last recall. What performance do others get please? For example, try the following macro (modified to suit). Here it takes about 15 seconds to get from y=0 to 842, that's less than 60 pixels/sec! COMMANDS Variable Set Integer %nMouseY% to 0 Repeat Until %nPixCol% Equals "12870323" Get Pixel Color at (187, %nMouseY%) Relative to Current Window into %nPixCol% Variable Modify Integer %nMouseY%: Increment End Repeat Text Bo
  22. Hi, Take care when defining the target position's pixel colour. Sometimes it changes by the very act of placing the mouse cursor over it. Possibly why your macro did not work. Instead of the built in Mouse Locator, use a simple macro that does not require the mouse, with the command Get Pixel Color at (%x%, %y%) Relative to Screen into %PixCol% Terry
  23. Agreed. Lose the infinite loop. Another debugging aid: move the mouse pointer into position before checking the pixel colour beneath it.
  1. Load more activity
  • Create New...