Jump to content
Macro Express Forums

acantor

Members
  • Posts

    1,532
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by acantor

  1. This forum has always been a good place to learn about other members' interesting and curious fixes!
  2. Hi Steve, Consider my workaround, and variations of it, as a last-ditch effort. It can fail in many ways, as you have already noted. Re-learning to press a two-key sequence is probably the most elegant solution. But don't overlook the possibility of filing a feature request with ISS. I have found them very responsive to input from Macro Express users.
  3. I don't think there's a built-in way to revert to the older way. However, here's a kludge. Create a second macro with activation of window title gaining focus. The window title you're looking for is "Enter String Value" (exact match). Here's the script for the second macro. It's active while the "Enter String Value" window is open. The second macro waits for you to press "Enter". Then it sends Tab Enter. Wait for Key Press: ENTER Text Type (Simulate Keystrokes): <TAB><ENTER>
  4. I agree with Cory. When writing macros, with few exceptions, manipulating the mouse pointer is asking for trouble -- even when it's possible. Although not a method most people are comfortable with, figuring out how to perform a task via keyboard will get you further. Parsing the HTML, as Cory suggested, is a fantastic method, but you need to possess, or be willing to learn, elementary computer programming skills.
  5. It's really hard to make a macro like this work by simulating mouse actions. If the table you want to copy is always the same size (e.g., 3 columns and 5 rows), there's a chance to you can make it work by sending keystrokes instead of mouse clicks. For example, on this page, there's a 3 x 6 table: https://www.w3schools.com/html/html_tables.asp If you click into the left side of the first cell, this sequence of keys will select the first three rows: Shift + Down Shift + Down Shift + Down This translates nicely into Macro Express instructions. I like Cory's idea of parsing the HTML. That might make for a good challenge...
  6. It sounds like Excel can't handle the input as fast as Macro Express sends keystrokes. One option, as rberq suggested, is to experiment with different keystroke speeds: Keystroke Speed: 100 milliseconds Another option is to insert pauses between steps: Text Type (Simulate Keystrokes): %x%<TAB>%y%<TAB>%z%<TAB> Delay: 100 milliseconds Text Type (Simulate Keystrokes): %a%<TAB>%b%<TAB>%c%<TAB> Delay: 100 milliseconds A third option is to reduce the quantity of information each text type command sends: Text Type (Simulate Keystrokes): %x%<TAB> Text Type (Simulate Keystrokes): %y%<TAB> Text Type (Simulate Keystrokes): %z%<TAB> Fourth, combine all of the above: Keystroke Speed: 100 milliseconds Text Type (Simulate Keystrokes): %x% Delay: 100 milliseconds Text Type (Simulate Keystrokes):<TAB> Delay: 100 milliseconds Text Type (Simulate Keystrokes): %y% Delay: 100 milliseconds Text Type (Simulate Keystrokes):<TAB> Delay: 100 milliseconds Text Type (Simulate Keystrokes): %z% Delay: 100 milliseconds Text Type (Simulate Keystrokes):<TAB> Delay: 100 milliseconds The last example might be overkill. But it might be a good place to start. If it works, winnow out the steps that don't make a difference.
  7. I've used multiple choice menus and the variable set string from list features. Both work nicely. A multiple choice menu gives you an interesting option: the ability to choose a menu item by pressing an key on the keyboard, rather than clicking on it. For example, if this is your Menu List: Choose a &Folder... Save in "&Alan" Save in "&CCCC" Save in "&Stories" Save as &Word file Export as &PDF Save as &Text The ampersands produce accelerator keys in the resulting menu: To choose "Export as PDF," press P then Enter. To choose "Save As Text," press T then Enter.
  8. When you set the scope, choose "Partial Match" for the window. The partial match would likely be "Google Chrome" or "Chrome" or something similar.
  9. Hello Yann, I've not used FTP commands in Macro Express, so I might be on the wrong track. I checked the Macro Express Help screen on FTP, and I think it says the file contains information you want to transfer. So my guess is that the macro does not modify the file. To view the response from the host, you will need to do something like this: <MESSAGEBOX Caption="Transfer status" Message="%FTP_transfer%" Icon="0"/>
  10. I think a book about Macro Express was published about twenty years ago, but I don't recall the title or author. A 20-year-old book about Macro Express would probably be 90% or 95% relevant. There have been significant improvements to the program, e.g., variable naming, but the old method still works. You may not need a book. The Help system in Macro Express is exemplary. When I haven't been able to work out how to accomplish something, the help I've received in this forum has been fantastic.
  11. I'm not sure where the four values are coming from, but assume they're random numbers between 100 and 999: // Generate random values for %CB[1]% ... %CB[4]% Repeat Start (Repeat 4 times) Variable Set Integer %CB[%x%]% to a random value between 100 and 999 End Repeat // Output the four random values Repeat Start (Repeat 4 times) Text Type (Simulate Keystrokes): CB[%x%] = %CB[%x%]%<ENTER> End Repeat <COMMENT Value="Generate random values for %CB[1]% ... %CB[4]%"/> <REPEAT START Start="1" Step="1" Count="4" Save="TRUE" Variable="%x%"/> <VARIABLE SET INTEGER Option="\x05" Destination="%CB[%x%]%" Minimum="100" Maximum="999"/> <END REPEAT/> <COMMENT/> <COMMENT Value="Output the four random values"/> <REPEAT START Start="1" Step="1" Count="4" Save="TRUE" Variable="%x%"/> <TEXT TYPE Action="0" Text="CB[%x%] = %CB[%x%]%<ENTER>"/> <END REPEAT/> Sample output: CB[1] = 548 CB[2] = 611 CB[3] = 114 CB[4] = 595
  12. I use Dragon and Macro Express. The two coexist nicely. I sometimes use Dragon to trigger Macro Express scripts. But don't be hasty to convert Dragon scripts to Macro Express scripts. There definitely are tasks that Macro Express does as well, or better, or easier, than Dragon scripting. But the opposite is also true. For example, you can't use Macro Express to replicate voice commands that contain lists.
  13. The built-in Help appears to contain everything, or almost everything, that appears in the manual. You can access context-sensitive help for all or most Macro Express screens by pressing F1 when a screen is active.
  14. I've struggled when trying to close Text Box automatically after a certain number of seconds. This approach does seem to work:
  15. Hi Terry, I haven't messed with scheduling macros too much, but a quick look at the Macro Express user interface persuades me that you'll need two separate macros to pull this off. When I first started using Macro Express, I experimented with scheduling macros, but my recollection is that the scripts sometimes failed to trigger at the appointed times. But Macro Express has come a long way since then. And I was probably using Windows 95 or 98, both of which had a lot of quirks. Hopefully scheduling scripts have become more reliable with the passage of two or more decades.
  16. I want to make sure I understand... 1. You have written a script that includes an instruction to set a text variable %MacroName% to the value of "Test". 2. Another instruction appears later in the script... or perhaps this, which I think would do the same thing... 3. You have written another macro called "Test" that includes this line: 4. "Test" works when run by itself, but fails when it's called by the first macro?
  17. I wonder whether there are any organizations that include a job title of "macro developer" on their organizational charts! I know a few organizations that recognize the need for someone to be able to muck around with Macro Express (or similar tools). In general, these organizations don't implement scripts to automate repetitive tasks for many, but to provide accommodations for employees with disabilities. I'm often brought in as a consultant to do this kind of scripting, but there are organizations that have an employee who handles macro development as part of a larger job, usually a programmer. Developing macros as individual workplace accommodations works out nicely, provided the macros are maintained. However, I have worked with a small number of organizations that have implemented Macro Express scripts as productivity boosters for everybody. Results are mixed. If the number of employees is small, and they get good support when things go wrong, Macro Express has become indispensable. But like rberq, I've seen organizations reject automation tools even when the scripts obviously increase throughput and reduce error, but "only" work 99.9% of the time.
  18. If you hang around this forum long enough, you will start to notice two factions: those who insist that this is the best way: Text Type (Simulate Keystrokes): <CTRLD>s<CTRLU> And those who say this approach is fine: Text Type (Simulate Keystrokes): <CONTROL>s The truth (as I see it, anyways!) is that both approaches have a place. The former is probably more reliable than the latter. However, when the latter works, it seems to be equally reliable. Personally, I favour the second technique because I find the code a little easier to read. But if the macro fails with that line of code, I switch to the first technique. For the kinds of macros that I build, the second approach works for me 95% of the time. But people who use Macro Express for different purposes than I do might be right that the first approach is superior.
  19. I don't think the text box keeps focus after you deliberately give focus to something else. The two check boxes help ensure the text box is focused when the macro calls up the text box. I'm not sure it would be a good idea for Macro Express to force a window to permanently have focus.
  20. You can test Caps Lock state in Version 6. For example: Get Key State "CAPS Lock" into %CapsLockState% If Variable %CapsLockState% Equals "True" Text Box Display: Caps Lock is ON Else Text Box Display: Caps Lock is OFF End If <GET KEY STATE Key="CAPS Lock" Dest="%CapsLockState%"/> <IF VARIABLE Variable="%CapsLockState%" Condition="\x00" Value="True" IgnoreCase="FALSE"/> <TEXT BOX DISPLAY Title="Caps Lock is ON" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs14 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <ELSE/> <TEXT BOX DISPLAY Title="Caps Lock is OFF" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs14 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <END IF/> When writing MEP scripts that involve the Caps Lock key, there are two checkboxes on the "Miscellaneous" tab that you may need to uncheck:
  21. No problem typing in the path, but there are actually three ways to specify the program to run. Activating the button with three dots at the bottom of the screen makes it easy to navigate to the executable.
  22. Next thing to try: 1. Delete your macro. (You could instead just delete the one line within the macro. But if you're using variables in the script, other things can get messed up. So my preference is to delete the entire macro.) 2. Recreate the macro from scratch. Don't type in the path. Use the ... button next to the field, and choose the executable by navigating to it via the file manager that appears. 3. Test!
  23. The most likely culprit is the parameter you specified. For testing purposes, leave the "Program Parameters" field blank.
  24. I remember the a-ha! moment shortly after I received a trial version of Macro Express. After about 30 minutes of messing around with the program, I realized Macro Express was going to save me at least an hour that day. Maybe two. I immediately placed an order. My recollection is that I printed out a form, filled it in by hand, and sent it, with payment, via snail mail. This was a very long time ago!
×
×
  • Create New...