Jump to content
Macro Express Forums

acantor

Members
  • Content Count

    1,171
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by acantor

  1. 1. Double check whether the Search button can reached via standard navigation techniques, such as pressing Tab and Shift + Tab. The key sequence might be quite strange, e.g., Tab, Tab, Right arrow. 2. Check whether Macro Express can "see" the Citations window when it's open. When setting the scope to Window-specific, does the Citation window appear anywhere in this list? If the answer to both of these questions is no, then you'll need to resort to dodgy techniques that are possible yet labour-intensive to implement. For example: ensuring the window al
  2. I agree. The potential savings of a macro that creates variables on the fly needs to be balanced against the time and effort needed to make it work. I can imagine spectacular failures along the way. Although it could be a fascinating project to test one's mettle, it's not something Macro Express was designed to do. But there is another possibility. Under "Preferences," "General" tab, "Dialogs." there is this option: "Prompt the user to create a variable that is not defined." When unchecked, the variables that one creates in the Script Editor are
  3. Although I don't know a straightforward way to create Macro Express variables on-the-fly, that doesn't mean it's impossible. Many years ago, I developed a Macro Express script that generated other Macro Express scripts. I wonder whether the approach could be applied to the problem of generating variables. The script worked by sending sequences of keystrokes and mouse clicks to the Macro Express user interface. After a lot of tweaking, the script was nearly 100% reliable, although while running, the script felt brittle.
  4. Agree with rberq. Maybe complete a bug report.
  5. You will need to define every variable you plan to input into the script. You can define dozens or hundreds of variables, if you want. All of those variables shouldn't impact performance significantly. This script accepts variables "a", "b", and "chrome" only: Variable Set String %a% to "" Variable Set String %b% to "" Variable Set String %chrome% to "" Variable Set String %VariableName%: Prompt If Variable %VariableName% Equals "a" OR If Variable %VariableName% Equals "b" OR If Variable %VariableName% Equals "chrome" Variable Set String %%VariableName%% to topmost wind
  6. For at least one badly-behaved app that I've automated, I was forced to Tab (or Shift+Tab) 10, 15, 20, maybe 25 times to reach some targets. It wasn't ideal, but the macros worked reliably.
  7. I don't think that there is a way to export the contents of the "Notes" tab. Consider submitting a feature request to the folks at Insight Software. But comments that I embed in scripts are exported. I know two different ways of embedding comments in scripts: the comment appears on a line by itself, and the comment appears at the end of the instruction: // Comment Type 1 Variable Set String %Clip% from the clipboard contents // Comment Type 2 After importing scripts that I've exported this way, the comments are present. I believe there is a t
  8. I mentioned in my previous post that I typically use pixel colour searches to find and click on neutral zones. But there are times it's better to monitor changes in the shape of the mouse pointer. Mouse pointer changes have always been slower than pixel colour searches, but in Windows 10, they are especially molasses-like. Yet the technique can still be made to work by inserting delays, and by increasing the interval between mouse moves. In this example, the macro checks the mouse cursor every 50 pixels until it changes to the "Internet Navigate" cursor. // H
  9. When I export macros that include comments, the comments are exactly where they were after I import them. When I export macro information to a text file, the comments are there.
  10. An approach that I use for especially nasty web applications involves identifying a "neutral zone" that when clicked, one or several presses of the Tab key (or Shift + Tab) gives focus to a link or control that is close to where I'm trying to get. Neutral areas are sometimes quite large (although not every web app has one). The only way I know to discover neutral zones is through trial and error experimentation. It's hard to tell from looking at the page. When I'm looking for one, I click everywhere on the screen where nothing is clickable, and then press the Tab key and Shift + Ta
  11. On 25 May 2021, I’ll be teaching a three-hour long hands-on course (over Zoom) on software customization at the Guelph Accessibility Conference. The tools we will be learning about are Macro Express, AutoHotkey, and Microsoft Office customization techniques. You can register for my course without registering for the conference. The fee for my course is $135 (Canadian dollars). Introduction to Software Customization for Windows 25 May, 1 - 4 p.m. Eastern Time Taught over Zoom Overview Many applications have features that people with disabilities have dif
  12. If Variable %all% Contains "%part%" Text Box Display: Yes! Else Text Box Display: No! End If
  13. There are many ways to test for evenness / oddness, including this: Variable Set Decimal %Value%: Prompt Variable Modify Decimal: %HalfValue% = %Value% / 2 Variable Modify Decimal %HalfValue%: Remove Integer Portion (%DecimalsOnly%) If Variable %DecimalsOnly% Equals "0" Text Box Display: Even Else Text Box Display: Odd End If
  14. I've enhanced the main script. (The "Capitalize Engine" script is the same. See code in previous message.) Updates: 1. This version is less "flashy" -- text is selected and de-selected more quickly. 2. It runs a little faster. 3. This version checks for non-letters that "cling" to words, like commas, colons, open and close quotes, question marks, etc., and makes an educated guess on which word to case-rotate. 4. Although the original challenge was to case rotate an unselected word, this script acts on the first word in a selection. It
  15. The core of Terry's many excellent suggestions, I would say, is to simplify what you are trying to do. To that end, temporarily take the mouse buttons out of the equation. Instead, make sure your Macro Express script works if you activate it via hotkey. Add a line of code to the start of your script to make it easier to tell that your script is getting activated. (This is for testing purposes only. You will be able to get rid of it soon.) Text Box Display: Yes, the macro has been activated! <TEXT BOX DISPLAY Title="Yes, the macro has been activated!" Co
  16. The solution to this challenge is more challenging to achieve than I anticipated. (When I originally posted it, my solution was flawed. For example, the first and last word of a document must be handled differently than words in the middle.) The difficulties relate to the rules I set out, which I erroneously imagined would simplify matters! 1. Rotate a word through three states: lowercase ... Titlecase ... UPPERCASE ... lowercase etc. 2. The word is NOT selected. This means the macro must somehow capture a word without knowing where the word starts and
  17. At this point, my only suggestion is put your energies into forcing the macro to reliably give the window focus. Start afresh. Create a new macro, and keep messing with it until you find the steps to give focus to the window under the mouse pointer. Experiment with code excerpts such as these: Mouse Left Click Mouse Left Click Delay: 100 milliseconds Mouse Left Click Mouse Left Button Down Delay: 100 milliseconds Mouse Left Button Up Capture Control from Beneath the Mouse into %ControlUnderMouse% Delay: 100 milliseconds Mouse Click on Control %ControlUnderMouse%
  18. Then try this, which may or may not need a delay between steps: Capture Control from Beneath the Mouse into %ControlUnderMouse% Set Focus to %ControlUnderMouse% <CAPTURE CONTROL Option="\x00" Control="%ControlUnderMouse%" UseText="FALSE"/> <SET FOCUS Control="%ControlUnderMouse%"/>
  19. That's what my admittedly untested script is supposed to do. It clicks on whatever object the mouse pointer is hovering over. If the script fails because the object isn't gaining focus after it's clicked on, the first modification I would try is insert a delay between the two statements. Start with 1 second or 0.5 seconds. Through trial and error experimentation, reduce the delay until you've figured out how short it needs to be.
  20. That doesn't sound too hard to do with Macro Express. Do I understand this correctly? You click a mouse button, which causes the mouse to output Ctrl + S or Ctrl + B? If so, the macro might look like this: Mouse Left Click Text Type (Simulate Keystrokes): <CONTROL>b
  21. In many applications, there are hotkeys for switching between different windows, but the hotkeys may not be well documented. Here are a few key combinations to experiment with: F6 Alt + F6 Ctrl + F6 Ctrl + Tab Ctrl + Page Up Ctrl + Page Down I've seen applications that include window switching commands in its menus. For example, in Microsoft Word 2019, the key sequence for getting close to the window switching command is: Alt (or F10) W (View) W (Switch Window) Up and down arrow keys (to select a window) Enter
  22. When I use floating menus (Macro Express 6, Windows 10) I only see tooltips upon hover when the floating menu has focus. If the floating menu is not the active window, then no tooltips.
  23. Try variations of the text you've already inserted in the "IP Address/Hostname" field, but don't include "https://" or "ftp://" or anything similar. For example, when I ping Microsoft's web-based Outlook service, the field reads "outlook.com" but I remember, maybe a year ago, changing it from something else.
  24. This challenge is a little more challenging than the last one. It's actually kind of hard. Macro Express is probably not the ideal tool for tackling this problem, but the fact that it's do-able in Macro Express is testament to the program's versatility. In Microsoft Word, there is a built-in command called "Case Rotate" that changes text from lowercase to title case, from title case to uppercase, and from uppercase to lowercase. The default hotkey is Shift + F3. This hotkey also works in PowerPoint, and in HTML and RTF email messages in Outlook. The challenge: Use Mac
  25. Terry, your last response has led me to the conclusion that I was overthinking this! I tried three different ways to select the contents of a cell, all of which involved Edit mode. After reading your message, I realized there was a fourth way: forget about Edit mode. Simply copy! And with that realization, the only fail-safe needed is to make sure the cell is NOT in Edit mode. (In Edit mode, content must be selected before copying.) Pressing <ESC> exits Edit mode, and does nothing in Ready or End mode. // Cancel "Edit" mode (does nothing if no
×
×
  • Create New...