Jump to content
Macro Express Forums

acantor

Members
  • Posts

    1,532
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by acantor

  1. Depending on the webpage, this series of steps could be very simple to automate via Macro Express, or extremely complex. There are likely several ways to accomplish the task. But the method, or methods, will depend a lot on the coding of the webpage, and on the browser you are using. One quick question. What type of element is "Next >>>"? Is it a hypertext link, an image, a push button?
  2. How many words in each name? Or does the number of words vary? If it's a fixed number of words, then selecting the names and copying them may be straightforward. Part of your script might look like this, assuming each name is two words long. (This is in pseudocode, but it's similar to Macro Express code Type "<CONTROL>f" // Find Type "@<ENTER>" // Search for @ and initiate the search Type "<ESC> // Cancel the search Type "<CONTROL><SHIFT><RIGHT> // Select the 1st word Type "<CONTROL><SHIFT><RIGHT> // Select the 2nd word Type "<CONTROL>c" // Copy to the clipboard In many text editors, pressing F3 repeats the previous search. In Microsoft Word, the hotkey is Shift + F5. Knowing these factoids might help simplify the project.
  3. There are at least two other ways to navigate from tab to tab in a dialog box. Ctrl + Page Up/Page Down do not always work. Try: Ctrl + Tab Shift + Ctrl + Tab Text Type (Simulate Keystrokes): <CONTROL><TAB> Text Type (Simulate Keystrokes): <CONTROL><SHIFT><TAB> If you can landmark on an actual tab, left and right arrow keys usually work as well. Text Type (Simulate Keystrokes): <ARROW LEFT> Text Type (Simulate Keystrokes): <ARROW RIGHT>
  4. <PRTSCR> is available (as "Print Screen") on the drop-down list labeled "Misc Keys" in the "Text Type" window.
  5. I just tested this (in MEP), and it took a "picture" of the active window and placed it on the clipboard: Text Type (Simulate Keystrokes): <ALT><PRTSCR>
  6. Request this as a feature. I have a workaround: I defined hotkey macros to automate changing colours. For example, here is the code for switching the background colour to yellow. Text Type (Simulate Keystrokes): <ALT>e // Activate &Edit menu Text Type (Simulate Keystrokes): <ARROW UP><ARROW DOWN> // Unfurl menu... Text Type (Simulate Keystrokes): <END> // Go to last item on menu Repeat Start (Repeat 6 times) // Select "Background Color" Text Type (Simulate Keystrokes): <ARROW UP> End Repeat Text Type (Simulate Keystrokes): <ENTER> Wait for Window Title: Color Text Type (Simulate Keystrokes): <HOME> // Go to top left corner... Text Type (Simulate Keystrokes): <ARROW RIGHT> // Navigate to Yellow Text Type (Simulate Keystrokes): <SPACE> // Select Yellow Text Type (Simulate Keystrokes): <ENTER> // Done! <TEXT TYPE Action="0" Text="<ALT>e" _COMMENT="Activate &Edit menu"/> <TEXT TYPE Action="0" Text="<ARROW UP><ARROW DOWN>" _COMMENT="Unfurl menu..."/> <TEXT TYPE Action="0" Text="<END>" _COMMENT="Go to last item on menu"/> <REPEAT START Start="1" Step="1" Count="6" Save="FALSE" _COMMENT="Select \"Background Color\""/> <TEXT TYPE Action="0" Text="<ARROW UP>"/> <END REPEAT/> <TEXT TYPE Action="0" Text="<ENTER>"/> <WAIT FOR WINDOW TITLE Title="Color" Partial="FALSE" Wildcards="FALSE" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="2"/> <TEXT TYPE Action="0" Text="<HOME>" _COMMENT="Go to top left corner..."/> <TEXT TYPE Action="0" Text="<ARROW RIGHT>" _COMMENT="Navigate to Yellow"/> <TEXT TYPE Action="0" Text="<SPACE>" _COMMENT="Select Yellow"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="Done!"/> With the macro, the task of restoring background colours is not too onerous. But I agree it would be best if MEP remembered the colours when copying, pasting, and duplicating.
  7. I find that key "down" and key "up" commands are mostly unnecessary. I avoid them because modifier keys sometimes get "stuck" in the wrong position, which sounds like the problem you are having. Instead of this... <CTRLD>x<CTRLU> ...use this: <CONTROL>x
  8. I can't think of a native way to do this in MEP. But perhaps knows of, or can think of, a hack. Perhaps every running macro writes information to a file, or to the registry, when it exits; and every macro, when it's launched, checks the file or registry and writes data to it.
  9. 1. Check that the "Don't Process the Embedded Variable" checkbox is unchecked. 2. Confirm the URL is actually in %T15% by outputting the value somewhere, e.g., Text Box Display or Text Type. 3. Then ensure the URL is correctly formatted: Macro Express does not like spaces before or after the URL when you are using the Web Site command.
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. Would something like this work in MEP? Extended Math %Result%=arctan(0.5)
  16. 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.
  17. 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"/>
  18. 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.)
  19. 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.
  20. 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.
  21. 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.
  22. 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.
  23. 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.?
×
×
  • Create New...