Jump to content
Macro Express Forums


Popular Content

Showing content with the highest reputation since 07/08/2019 in all areas

  1. 1 point
    Simpler than mine. Hardest part of making the macro is looking up the Excel keyboard shortcuts.
  2. 1 point
    Great idea for a cartoon. I wish I could draw. First panel shows a man carrying the head end a long snake. Another man behind him carrying more of the snake. Second panel two more men carrying more and more of the snake. Third panel two more men with more snake, but one of the men is carrying a sign that says, "The End is Near." Last panel a man carrying the tail end. OK, I'll keep my day job. Besides, somebody's probably done it already.
  3. 1 point
    Indeed - that's primarily why I've left it to you and Bob!
  4. 1 point
    We can cut your nine lines down to eight, if we eliminate Variable Set String %b% to "%a%" and then do all operations on %a%. That should help us finish before the universe either collapses or squirts through a black hole into somebody else's universe. I tried all day to figure out how to use Terry's CRLF idea, just because I wanted so badly to use the Strip feature. Couldn't come up with a reasonable way to deal with even-length space strings. I did find that my version runs considerably faster if I precede my Repeat loop with the following series -- but only if it's a VERY large string and contains VERY long strings of contiguous blanks. I realize this takes me out of contention for the fewest-statements prize, but you've now got me worried about the cosmic deadline so I feel it's a worthwhile addition. // Initial removal of long space strings Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1% Replace " " with " " in %T1%
  5. 1 point
    I'm thinking Terry has us both beat. Should be a two-line macro: Replace all spaces with CRLF. Variable Modify String [Strip CR/LF]. Bedtime now, but I'll try it tomorrow. EDIT: Well, so much for my midnight enthusiasm. In the light of day, I can't see how it would work. The following would ALMOST work: 1) Replace any existing CRLF by x'01' 2) Replace all spaces by CRLF 3) Strip all CRLF 4) Restore original existing CRLF by replacing x'01' by CRLF But that would remove ALL spaces, and not leave one space where each string of spaces originally existed. No prize yet, Terry, unless you can see your way out of this. 🙄 EDIT AGAIN: Actually the above ALMOST works, if (step 2) all DOUBLE spaces are replaced by CRLF. But some strings of spaces have an even number of spaces, and some have an odd number of spaces. The above logic leaves odd-number strings with a single space, as desired. But it completely removes even-number strings. Have to find a way around that -- still thinking.... It runs pretty fast, though. Have to go work in the garden. I'll probably plant the flowers upside down if my mind is on this problem.
  6. 1 point
    Can you not just put the Username and Password in here? This is from the File menu. Alan
  7. 1 point
    You could also restore syntax checking by running the MacDef.exe program in the c:\Program Files (x86)\Macro Express 4 folder. But, if you do that, all of your preferences will be reset to their default values.
  8. 1 point
    OK, pleased to see you appear to have now got the hang of it 😉 BTW, I never had an answer my question about the macro I exported? That would have avoided your difficulty with understanding what to paste. (Although it would admittedly have required learning how to import!)
  9. 1 point
    That’s easy enough: copy the code section (not the command text), open a new empty macro, and paste it in. Or you can just import the finished macro I exported and attached for you, and run that directly.
  10. 1 point
    Hover over each and read what they do: Rectangular, Window, Freeform, and Full Screen. Just the same as using the Mode button in the old Snipping Tool. I assume you are saying you definitely want to remain with the old, unsupported tool called Snipping Tool, so that you can immediately save to a chosen location as before? If so then the following macro works for me: // Open the Start/Search box Text Type (Simulate Keystrokes): <WIND> Delay: 0.1 seconds Text Type (Simulate Keystrokes): <WINU> Delay: 0.1 seconds Text Type (Simulate Keystrokes): Snipping Tool Delay: 0.5 seconds Text Type (Simulate Keystrokes): <ENTER> // This opens the highlighted entry from your Search, which should by default be 'Snipping Tool'. Wait for Window Title: Snipping Tool Text Type (Simulate Keystrokes): <ALT>n // Select 'New' Delay: 0.1 seconds // Now proceed manually as advised, i.e. select and then save your target. <COMMENT Value="Open the Start/Search box"/> <TEXT TYPE Action="0" Text="<WIND>"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<WINU>"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="Snipping Tool"/> <DELAY Flags="\x01" Time="0.5"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="This opens the highlighted entry from your Search, which should by default be 'Snipping Tool'."/> <WAIT FOR WINDOW TITLE Title="Snipping Tool" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT TYPE Action="0" Text="<ALT>n" _COMMENT="Select 'New'"/> <DELAY Flags="\x01" Time="0.1"/> <COMMENT Value="Now proceed manually as advised, i.e. select and then save your target."/> Snipping Tool - New File.mex
  11. 1 point
    The emails appear to come from noreply@invisioncloudcommunity.com
  12. 1 point
    ... For responses, I have had good luck by clicking "Follow" at top-right, and selecting the option to get an email whenever there is activity. Strangely enough, just because you originated a topic, doesn't mean you are automatically enrolled to "follow" it.
  13. 1 point
    @mikecox The easiest way to open Snip & Sketch is to use the keyboard shortcut combination Shift+Win+S. You can then use its four capture tools by clicking the appropriate icon. If you still need help to write a macro then please specify exactly what it should do once Snip & Sketch is open. P.S: After posting a query, in my experience you cannot rely on receiving a 'notification'. Just check back regularly.
  14. 1 point
    ... If the older version does what you want, and is simpler to use, then it's perfectly OK to stick with it. After all, I still use the old Macro Express Version 3, and so far it does everything I want. If you have an experienced carpenter with an old hammer, why push him to buy a new one? 😉
  15. 1 point
    Try using the keyboard sequence to start it. The following works in Windows 7: // Text Type: <WIND><WINU> Text Type: snippingtool<ENTER> // I don't know why your macro doesn't work the way you wrote it. There's something weird about the way Windows indexes to some programs. Even though Windows Explorer shows it as a normal .exe in the System32 library, you can't open it by double-clicking the name. I read the explanation once upon a time but I'm not sure I understood it even then.
  16. 1 point
    You should use ASCII Text File Process. Loop though it until you find the row you want then grab the other element of the text array. Sorry, I can't elaborate now, I need to leave shortly.
  17. 1 point
    There is nothing inherently risky about saving data in the registry as long as you know and remember which registry area (key) you use. Using the registry may be somewhat faster than reading from a file. However, depending on what your macro is doing, you may not notice the difference. There is a potential side effect of using values in the area of the registry (registry key) that Macro Express uses such as this: HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express 6\My Values When you export the Macro Express settings (Tools, Export Program Configuration) and then import them either later (Tools, Import Program Configuration) Macro Express will display a warning about the registry keys and values that it does not recognize. It is pretty safe to use other areas of the registry such as HKEY_CURRENT_USER\Terry Work Area You could also use something like this: HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express Data
  18. 1 point
    Yes, me too. I chose a similar location, with separate keys for Integer and Text, and made it a 'Favorite' for fast access.
  19. 1 point
  20. 1 point
    // Ask the user for starting coordinates... Variable Set Integer %x%: Prompt Variable Set Integer %y%: Prompt // Move the mouse pointer to these coordinates... Mouse Move: %x%, %y% Relative to Screen
  21. 1 point
    I'm not sure what you're trying to do but you can look at all the activation methods in the help file. If someone types a series of letters or numbers you can make that activate a macro. You can use a VBA macro to launch the MEP macro. Again look in the help file under Command Line Parameters. You can use the MeProc.exe with parameters that will launch a macro.
  22. 1 point
    Trigger the counting macro when the entry screen appears. Then: // Variable Set Integer %N1% to 0 Repeat Until %N1% >= 6 Wait for Key Press: Any Key Variable Modify Integer: Inc (%N1%) Repeat End Text Box Display: xxxxxxxxxx (done, so start whatever other macro you want to run) //
  23. 1 point
    Generally, in Windows, this appears as CRLF, not LFCR. Try this: Variable Modify String: Replace "-A%CR%%LF%" in %Temp% with ""
  24. 1 point
    This might work: Step 1: Replace all CR/LF with "!@#$%^&" or some other such visible (or non-printable) string that will never occur naturally. Step 2: Instead of replacing "-A" with a blank, replace "-A!@#$%^&" with a blank. In this way, only [what used to be] CR/LF attached to unwanted text will be eliminated, along with the unwanted text. Step 3: Replace all remaining "!@#$%^&" with CR/LF.
  25. 1 point
    2D 41 0D 0A 2D 42 0D 0A 2D 43 0D 0A 2D 44 0D 0A 2D 45 THis is how your text actually looks like to the computer internally. Each of those pairs is a hexadecimal representation of the binary. Each represents a byte, 8 bits, of data. By applying the ASCII encoding, you will get the letters and such that you are used to seeing. Click here to see a table of the value, E.G. 2D is a hyphen, 41 is "A". I think it helps people if they can see what it's happening behind the scenes. And in binary. How it actually is in memory or on disk. Cut those into chunks of 8 and you can manually decode them yourself. If you're really bored 🙂 0010110101000001000010100010110101000010000010100010110101000011000010100010110101000100000010100010110101000101
  26. 1 point
    When you do the replace, include a newline set. A newline in Window is two non-printing characters carriage return and line feed. 0x0d and 0x0a. That's what gives you the line break. Click here for my instruction on how to create them in MEP. You will want to add them to the end of the string you want to replace.
  27. 1 point
    @rberg: For Firefox and its derivatives like Waterfox there's Add URL to Window Title (Advanced KeePass Usage) https://addons.mozilla.org/en-US/firefox/addon/add-url-to-window-title/ @Service Center: There's also the direct option of triggering the entire activity by running a macro instead of a bookmark. It would open the page and then do your work on it. A pop-up menu containing all such 'web work' macros would be a convenient access method. Or, if there are only a few, memorable hotkeys. Alan: Me too; many nerdy hours of pixel and text forensics!
  28. 1 point
    Neat solution. I wonder if other browsers have such an extension available. You could also try this -- I do it with a number of web sites. Might be handy for a browser that DOESN'T have a similar extension. 1) Activate the macro based on window title. 2) In the macro, Alt-d to highlight the URL. 3) Copy URL to clipboard, then examine it to see if it's the one you want. 4) Fill in the screen, or exit the macro, as appropriate.
  29. 1 point
    What I just came up with is using a Google Chrome extension ("Add URL To Window Title") that adds the url to the Window Title in chrome (I also limited it to the specific webpage in the Extensions Details) and then used the Macro Express Window Title activator and that seems to be working well.
  30. 1 point
    Alan, I got same behaviour on the couple of tests I had time for (Firefox and a folder). Strange. Speculative, but may be related to the other mouse cursor issue we were discussing? -------------------- EDIT at 08:40 Scrub that speculation! It's because the macro logic is wrong! The following does the job: Variable Set Integer %x%: Set to the Current Window's Width Mouse Move: %x%, 0 Relative to Current Window Mouse Move: -10, 10 Relative to Last Position // Nudge the mouse pointer a little so that it is visible in maximized windows <VARIABLE SET INTEGER Option="\x0A" Destination="%x%"/> <MOUSE MOVE Option="\x02" X="%x%" Y="0" _PROMPT="0x000A"/> <MOUSE MOVE Option="\x03" X="-10" Y="10" _PROMPT="0x000A" _COMMENT="Nudge the mouse pointer a little so that it is visible in maximized windows"/>
  31. 1 point
    Are you sure you don't mean Alt-Enter?
  32. 1 point
    Hard to advise without seeing an example macro. For instance, are you activating it when a window is opened with that title? Or when it gains focus as @acantor assumes? And must it be an exact title or a partial one? What operations is it performing after starting? If for instance it's using a Text Box Display (TBD) to give you a message then as soon as you close that TBD it will probably regain focus and start the macro again. However, I've found that MEP sometimes does not respond reliably to window title commands. Timing or other obscure conflicts with the OS may be the cause. In which case other 'recognition' methods may be needed. Could you share a very simple macro that consistently exhibits 'activating over and over'? (Ask if you don't know how to do that.)
  33. 1 point
    Try changing the activation from "Window Gains Focus" to "Window is Opened." That change will hopefully cause the macro to activate only when the window first opens, rather than every time the window receives focus.
  34. 1 point
    I do something similar for my credit card number, so when I am online-ordering something I don't have to go get the card and look it up. I have refrained from putting the macro on my wife's computer.
  35. 1 point
    One frustration – not really the fault of ME – is the unpredictable time it takes for a copy-to-clipboard command to finish. The ME solution is to set a clipboard delay in “Preferences”, presumably allowing the command to finish. A short delay – even a long delay – always winds up being too short in rare instances; and a long delay wastes a lot of user time. My most useful macro, below, is called by other macros wherever an inline Clipboard Copy would otherwise be used. In ME “Preferences” the clipboard delay is specified as zero. The macro finishes almost instantaneously when the clipboard copy is fast; and waits patiently for over a second when the clipboard copy is slow. My concern when writing the macro was, that Windows would return a non-null but still incomplete clipboard value, so the macro would return to caller with only part of the intended data. In practice that has never happened, and I have been using it exclusively for years with never a problem. // // Set clipboard to nulls -- check to make sure it happens Clipboard Empty Repeat Start (Repeat 10000 times) If Clipboard Text Equals "" Repeat Exit Else End If Repeat End // Copy to clipboard (CTRL-c) Clipboard Copy // Loop until clipboard is non-null, that is, copy to clipboard has completed. Since the value // to be copied may in fact BE null, we limit the loop to a nominal 1 second, then quit, leaving it null. // (Due to overhead, the actual loop time will be more like 2 seconds than 1.) Repeat Start (Repeat 100 times) Delay 10 Milliseconds If Clipboard Text Equals "" Else Repeat Exit End If Repeat End // Return to caller Macro Return //
  36. 1 point
    That's a difficult one! No single macro would warrant the title of 'my best' and if I compiled a short list of 'most useful' from the couple of thousand I've written it would cover a wide spectrum. Used up to scores of times a day - Sizing and positioning windows (mainly File Explorer folder) - Opening frequently used folders - Typing frequently used text with shortkeys (file and folder paths, signatures, email addresses, my name and address, phone numbers, regular phrases like 'Best wishes', etc) - Typing date & time with shortkey '=dt' Wednesday 7 August 2019, 1402 - When saving a series of files (such as when browsing images or text etc that I need for videos), a click close to the right of 'Save As...' (or variations) saves it as xyz-05 if the previous was xyz-04 - In all my applications, middle clicking its title to display a menu of macros, sometimes via subfolders - When creating a Text Box Display command, generate 'VariableName = ' to the left of '%VariableName%' with a single click -Etc Infrequently used but invaluable - During my frequent work in Google Earth, Google Maps, Memory-Map, etc: finding/copying/moving places and tracks between them; changing properties of multiple tracks, etc - On average once or twice a week, but many more directly after a walking holiday: from the GPX file of a walk recorded on my iPhone, automatically creating an Excel spreadsheet like that I showed in the recent thread about VBA, plus a profile like this: https://www.dropbox.com/s/63dwbplk410mj80/20190709Falmouth-Portscatho-r483-m6.7-PS.jpg?raw=1 (That's one of my most complex macros, calling a dozen submacros, some of which use VBA and some use Python scripts I've written in PaintShop Pro. I'd say it's probably the one I'm most proud of.) - One of Cory's, with only minor adaptation by me: 'Search and report on macro text'. - Etc -------------------- I'd like to have used the 'Last run time' column to give a more objective reply on the first category, but (a) It doesn't include submacros (b) It gets destroyed when a new version is installed
  37. 1 point
    I have written some very complex and powerful macros. A hospital back east had banks of computers running a macro I wrote around the clock for years. But the two that I have gotten the most use out of are simple. The first one simply types a date stamp. I use it in file names, notes on task, and dozens of other places. I'm amused at how often that's useful The second is a task tracking number. I type "TTN..." and it looks up the last number, increments it, and types out something like "TTN4521". I create tasks in Outlook with this in the subject, tag emails, time logs, task folders, and many other things. Later it's easy to find all relevant correspondence, file, whatever. And I have another "TTNR" which re-types the last number. Funny that I've written so many complex and powerful macros, and yet this is what I use most. Of course when professionally developing macros, one doesn't use those oneself. On a related note, I don't write as many macros as I did. I have been programming now for years and when it comes to automating most things, a proper program is better. Like web scraping. MEP is just not suited for that kind of stuff. But what MEP is great at is things like this. The little macros that save seconds a hundred times a day. Also things that are semi-automatic. Like a macro to file a PDF file from a scan where the user has to answer some questions and the macro blasts though all the menus and dialogs. One just can't beat it for things like that.
  38. 1 point
    To run any macro posted to you in the form that I did, you you can either: 1. Type the commands into a new macro of your own, but changing anything that needs it. In this case you don’t have a folder called "c:\users\Terry\Test" so create one of your own and enter that instead. 2. Copy the code and paste it into a new macro, then make the same change.
  39. 1 point
    One thing to try: From the list of macros in the macro explorer, right-click on it and choose 'copy.' You'll have to give it a new name and trigger, but the code will all be the same.
  • Create New...