Jump to content
Macro Express Forums


  • Content count

  • Joined

  • Last visited

  • Days Won


acantor last won the day on May 28 2016

acantor had the most liked content!

Community Reputation

3 Neutral

About acantor

  • Rank

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Location

Recent Profile Visitors

246 profile views
  1. That's exactly how it works. I'm not sure how long I will be able to use this technique, as I've noticed that drop-down lists in Windows 10 are less likely to support incremental searches. Which is really unfortunate. It's a very speedy way to manually navigate to a target on a long list. It works when typing, and especially, it works when automating via macros. There is no way that I would have been able to make it work for the items that are 32 characters long if I had to type them manually. (The way that Microsoft implemented the incremental search, you cannot pause while typing. A pause of a fraction of a second resets the search.) The macro now executes more slowly. I had to add an IF statement within the repeat loop to check for one special case. There is an issue with one item on the list that causes the incremental search to fail. The extra test noticeably slows down the macro. However, that's the trade-off I needed to make so the macro run reliably from start to finish. Nevertheless, the development time for this macro, plus the extra five or ten minutes it takes to run it, still represents a tiny proportion of the mental and physical effort I would have expended to perform the task manually.
  2. Well, I actually considered your approach! It think it's workable, although it would be a pain to code. I might try it one day just to see if I can. But I found an alternative way to solve the problem that reduced the number of simulated keystrokes by a significant amount, maybe by a factor of 50 or 100. Instead of pressing down arrow keys, I now do incremental searches on the drop down list to navigate to the item I want. So to navigate to the 1000th item on the list, instead of pressing down arrow 1000 times, the macro types its name exactly how it appears. The length of the item names vary between three and 32 characters. So to reach the 1000th item, I only need to send as many characters are in its name.
  3. It's not really a problem, except, perhaps, of aesthetics! <Down %x%> is neater than a repeat loop. But I will get used to it! The macro extracts every item from a 1300-item long drop-down list. To navigate to all of list items, the macro needs to press the down arrow key over 800,000 times: 1 + 2 + 3 ... + 1300. It runs in about 15 minutes. I can't imagine how long the task would have taken had I done it manually, but I know I only spent 60 or 90 minutes scripting and debugging the MEX macro. Thank you, Insight Software Solutions, you saved me days (possibly weeks) of mind-numbing boring effort, as well as significant upper body wear-and-tear!
  4. I am scripting a macro that presses the down arrow key %x% times, where x is between 1 and 1300. In some scripting languages I can repeat a key press %x% times: <DOWN %x%> Is there a way to do this in Macro Express? Or should I make peace with repeating %x% times? Repeat with Variable: Repeat %x% times Text Type (Simulate Keystrokes): <ARROW DOWN> End Repeat Thanks!
  5. Glad to be able to help. If you can script something as complex as nested IF-THEN-ELSE statements, you can probably wrap your mind around SWITCH / CASE statements. The Macro Express Help on the topic is excellent. There may be times when SWITCH / CASE statements make for the cleanest code, but much depends on the number of cases. Sometimes I opt for IF-THEN-ELSE when there are not too many. Judiciously adding white spaces between blocks of code (i.e., blank Comment statements) can help add clarity to what would otherwise be convoluted code!
  6. Try something like this. The script tests whether the integer variable contains 01 and 99: Variable Set Integer %Value%: Prompt If Variable %Value% Contains "01" AND If Variable %Value% Contains "99" Text Box Display: Yes, %Value% contains "01" and "99" Else Text Box Display: No, %Value% does NOT contain "01" and "99" End If
  7. Saving to Excel in background

    A VBA macro might be the ticket. Try recording the procedure using Excel's macro recorder, and then modify the code to create a more general solution. The folks on various Excel VBA help forums might be able to provide assistance.
  8. This approach solved a dropped character problem when I was creating ME macros for an Java application: In the Control Panel, go to Keyboard Properties, and reduce the repeat rate. Setting the value to 25% or 30% was enough to prevent characters from dropping when I sent input via Text Type.
  9. Fill multiple choice menu with macro

    It sounds do-able with Macro Express, but it would be helpful if you would provide more details.
  10. Rename Folder Error

    Try adding a delay between the two rename commands. Start with three or five seconds. If that proves to be the source of the problem, then incrementally reduce the time until it fails again. Then bump up the delay slightly.
  11. If you created the macro by capturing your actions, the resulting script is likely extremely long. If it's sufficiently lengthy, the script will take time to execute. And while it's executing, you will be effectively prevented from doing anything else with your computer. There are many advantages of keyboard input over mouse input when automating repetitive tasks via macros: First, the number of keystrokes is significantly fewer than the number of mouse movements. Dozens, hundreds, or thousands of mouse movements can sometimes be replaced with one or two keypresses. For example, if you record yourself selecting an entire webpage by scrolling to the top, clicking in front of the first word, and dragging down to the end of the page, the capture can conceivably be a thousand lines long. But the same action can be accomplished by pressing a single keystroke: Ctrl + A. Second, a script consisting of keystrokes is more likely to work reliably. A recorded macro consisting of mouse actions may not work as expected if you change the zoom level in your browser or resize the window. Nor is your macro guaranteed to work if the web developers change a page's styles (e.g., typefaces, font sizes) or add or subtract content from the page. On the other hand, the hotkey for selecting an entire webpage will always work – at least, as long as a form element does not have keyboard input focus. Ultimately, if the macro is taking so long to execute that you are unable to do anything else, it's worthwhile rewriting the macro so that the task is performed via keyboard. If your computer is locked for a long time while your mouse-intensive macro is running, know that simulating the keystrokes won't prevent the macro from locking up your computer, but it will probably only do so for a fraction of a second.
  12. Could you describe in detail what are you trying to accomplish? If you are using Macro Express's capture feature, be aware that playing back a script may not give you the results you are looking for. A captured macro may not play back correctly when run in a different window. As a general macro scripting rule, I suggest avoiding mouse actions unless there are no alternatives. In browsers, there are ways to navigate, select, copy, and paste without the mouse. The ease of performing these actions sans mouse, however, depends on the browser and your browser settings. When dealing with web content, I find Firefox easier to work with than Internet Explorer or Chrome.
  13. Excel: macro fails consistently

    Hi Terry, I recently completed a project of automating aspects of Excel using a different scripting tool (i.e., not Macro Express). For the first part of the project, the client's PC was running Windows 7. For the second part, the PC was a Windows 10 machine. A handful of scripts that worked beautifully under Windows 7 failed under Windows 10. So it would appear Microsoft has thrown curveballs to those of us who use third-party scripting tools. In every case I found workarounds; but the workarounds were not always elegant. In your situation, the next thing to try is alternative ways to copy the field. For example, instead of sending Ctrl + C, try copying the text via the context menu. Or cut the email address, pause for half a second, and paste (which will allow you to see whether the clipboard operation was successful.) Or just cut it, and forget about pasting it back. Or substitute Macro Express's clipboard commands when copying and pasting instead of Ctrl + C and Ctrl + X; or vice versa. If none of these approaches are successful, I would delete the macro and re-create it from scratch. On second thought, I would do this next! And if you are still not successful, report the problem to the good people at Insight Software. This may be a Windows 10 compatibility issue.
  14. Excel: macro fails consistently

    I am using Windows 7, not 10, and Excel 2007, and not something newer. So things may be a little different on my computer. A few thoughts: 1. Try <Ctrl>k to open the hypertext link instead of opening it via the context menu. 2. I need to select the email address from the Edit Hypertext dialog box: <Ctrl>a should work, but so should <Home><Shift><End>. 3. Instead of opening the hypertext link, try editing the cell, something like this... <F2> <Home><Shift><End> <Ctrl>c 4. How about copying the cell directly, without editing it? <ARROW UP><ARROW RIGHT> // navigate to a cell <Ctrl>c
  15. I think the Windows desktop is overrated. It's visually busy, hard to keep organized, and challenging to navigate around sans mouse. At various times I have preferred instead to open the desktop as a folder in Windows Explorer: I find it easier to deal with files and folders when they are listed alphabetically, which is easy to do when viewing the desktop as a regular Windows folder: