Jump to content
Macro Express Forums

acantor

Members
  • Content count

    679
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by acantor

  1. 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.
  2. 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.
  3. 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.
  4. acantor

    some macros work but some don't???

    Complex macros, especially written using a scripting tool like Macro Express, can be "fragile" -- they are easily thrown "off" by all sorts of circumstances. With time and effort, it's usually possible to refine scripts to be almost 100% reliable. It sounds like you, in conversation with the indexers, are the best person to track down the reasons the macros are sometimes failing. The repair might be very simple, e.g., adding a delay between critical steps. Or the repair may necessitate ditching the macro and trying an entirely different approach to automating the task. There are no rules about what might cause a macro to be unreliable; figuring it out usually takes trial and error experimentation.
  5. acantor

    Summing a converging series

    Hmmm... I may have found a bug in MEP. In the above code, MEP seems to automatically create %Result% as an Integer. So the only result I seem to get, no matter how I change the value, is zero. Can anyone replicate? PS. Problem solved. The script worked fine after I manually created %Result% as a decimal variable.
  6. acantor

    Summing a converging series

    Would something like this work in MEP? Extended Math %Result%=arctan(0.5)
  7. acantor

    macro with a list

    The ability to use lists to hold data is built-into some macro languages, but not others. Macro Express doesn't have it, while Dragon Professional (formerly NaturallySpeaking Professional) does. I use lists a lot when developing voice commands, and I rely on them to save time and trouble, and simplify maintenance. It's probably possible to create a list-like capability in MEP, and that would be a very good thing. Or at least to find an easier way to edit a script. One approach might be to copy the script from the Direct Editor and paste it into a text editor, modify the script there, and then paste the script back into the Direct Editor. Despite MEP not having lists, there are likely many ways to get this done.
  8. acantor

    Macro to launch Macro Express Explorer

    Sure there is a way -- although this script does not work as cleanly as the built-in hotkey: Activate or Launch: Window "Macro Express Pro - Explorer", Program "MACEDIT.EXE", Parameters "" <ACTIVATE OR LAUNCH Title="Macro Express Pro - Explorer" Exact_Match="TRUE" Wildcards="FALSE" Path="MACEDIT.EXE" Mode="\x00" Default_Path="TRUE" Wait="1" Wait_For_Program="12"/>
  9. acantor

    Macro to launch Macro Express Explorer

    I have always activated the Macro Express Explorer via hotkey, although I did change the default: when I I started using Macro Express about 20 years ago, I was already using Ctrl + Alt + Shift + W to launch Microsoft Word. (Macro software isn't needed. You can define hotkeys to activate any shortcut on your desktop through its properties.)
  10. acantor

    Copy macro and its activation

    Hi Terry, I developed a script that cloned a template macro, opened the clone, modified it, and then created folders in Windows Explorer and Outlook. The project began when I noticed that I was spending an inordinate amount of time copying a template macro, manually adjusting it, and then setting up folders. I was motivated to automate the process, as the process took four or five minutes manually, and was boring and error-prone. The script turned into a major undertaking. It was exceedingly complex: the script mostly manipulated the Macro Express user interface to copy a macro, rename it, open it, and modify it. I spent weeks tweaking before the script became reliable enough to be useful. To keep it humming, I needed to stick to strict naming conventions in Macro Express, Windows Explorer, and Microsoft Outlook. The macro executed in about 30 seconds, so eight or ten times faster than performing the steps manually. So there were significant time and energy savings. Back to your question... it's probably do-able by creating a MEP script to manipulate the MEP user interface. But it may take persistence to get the script to work reliably.
  11. acantor

    MEP toolbar problem

    You might want to report the issue to Insight. I discovered some inconsistencies with the toolbars and menus in the latest release of MEP, which I reported. Insight worked with me on the problem, confirmed there was something amiss, and provided me with a workaround, which has worked ever since.
  12. acantor

    Using <Ctrl>G in Excel to Goto Label

    I'm with Cory. I rarely find wrap key presses with up and down modifiers, and my MEP scripts generally work as expected. The only time I have noticed that up and down modifiers make a difference is when I uncheck "Wait for the hotkey to be released before activating." But I find MEP scripts that are activated upon hotkey press are flaky and unreliable. So I rarely use this feature.
  13. acantor

    Macros deploying twice

  14. acantor

    win key not working

    Congratulations on finding a bug. Will you file a bug report? Here is a workaround, which works for me: Instead of Text Type <WIN>, substitute Text Type <CONTROL><ESC>. Ctrl+Esc has been the non-Windows key way to invoke the Start menu since Windows 95. It works in Windows 7, I think I have tried it in Windows 10, but I am not sure about Windows 8.
  15. acantor

    Macros deploying twice

    Idea 1: Perhaps you also created an AutoCorrect entry "we-" in an Office application: Word, Outlook, Excel and so on. Try running your macro in Notepad, which lacks AutoCorrect. If your MEP script works as expected in Notepad, but outputs twice in Word or Outlook, you may be dealing with an errant AutoCorrect entry. Idea 2: Are you using any other macro scripting tools, such as AutoCorrect, AutoIT, etc.?
  16. acantor

    Using <Ctrl>G in Excel to Goto Label

    My guess is that Excel does not have focus when you activate the Popup menu item. If that's the case, Excel is not receiving the key combination.
  17. acantor

    win key not working

    I am also noticing something unusual about assigning the Win key in ME Pro: Text Type (Simulate Keystrokes): <WIN> After running the command that includes this statement, nothing seems to happen. But then I press a key that includes <WIN> as a modifier. For example, when I press "D" or "P" the computer responds as though I had pressed <WIN>d (minimize all windows and show the desktop) or <WIN>p (display options). It would be interested to find out what happens with <WIN DOWN> and <WIN UP> At any rate, this behaviour is not as expected. You may have discovered a bug, so submit a report to the good folks at Insight Software!
  18. acantor

    Simple one-off alarm fails

    Could be a Windows 10 issue. There are no shortage of those! I'm using Windows 7 Pro.
  19. acantor

    "or" clause in color search

    I don't think so. But that may be a blessing in disguise. I avoid "REPEAT UNTIL" because I've had too many experiences of freezes when the condition, for whatever reason, cannot be met. But you can test for two or more conditions using IF statements. My approach is to use a "failsafe" to exit the loop if the condition is not met within a reasonable number of iterations. For example, if I am checking pixel colours along a horizontal line, the failsafe value might be the width of the screen as measured in pixels. In pseudocode: // Check each pixel along (x, 100) for Colour = 11111 or Colour = 22222 Failsafe = 1200 x = 0 y = 100 Repeat Failsafe Times Colour = Pixel Color at (x, y) If Colour = 11111 OR If Colour = 22222 // Pixel has been found! ... Macro Stop Else x = x + 1 Repeat End // Pixel not found!
  20. acantor

    Simple one-off alarm fails

    I tried it using Beeps instead of sound files, and it worked, although the macro did not trigger until five or ten seconds after the run time.
  21. acantor

    Scripts not recognized in Word 2016

    Running Macro Express as an Administrator worked!
  22. I am developing Macro Express Pro scripts to run in Microsoft Word on a Windows 10 machine. Although the scope of my scripts are set to Global, my hotkey and shortkey macros are not activating while I am in Word. The scripts are activating fine in every other program. Changing the scope to Word doesn't help. Any thoughts on what might be blocking scripts from activating while I am in Word?
  23. acantor

    Scripts not recognized in Word 2016

    Update 1: I thought this might be a Microsoft Office issue, but the macros work fine in PowerPoint. Update 2: When the Macro Express hotkey is the same as a Word hotkey, the Word hotkey works. Usually the opposite is true: Windows "sees" Macro Express hotkeys first. Samrae, I will try your suggestion.
  24. acantor

    Tips for beginners

    I have taught many hands-on Macro Express courses, but none are currently scheduled. Most courses were hosted by my professional association, RESNA, and took place at its annual conference. So your best option to learn Macro Express is to apply the dual strategy used by many on this forum: 1. Learn Macro Express through trial-and-error experimentation. 2. Don't hesitate to ask questions on this forum! There are no shortcuts to learning a program like Macro Express. It's a sophisticated tool – it takes time and effort to get a handle on its complexities. Fortunately, the Help screens in Macro Express are actually helpful… perhaps the best of all of the scripting tools.
  25. You can do it with Macro Express Pro (or Macro Express 3) if you are content with a non-programmatic solution. Text Type (Simulate Keystrokes): <ALT>d // Go to address bar. Normally, it's selected by default Clipboard Copy Variable Set String %Address% from the clipboard contents
×