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

Recent Profile Visitors

187 profile views
  1. 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.
  2. 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
  3. 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:
  4. Terry, Win+M is a legacy hotkey leftover from Windows 95 or 98. Microsoft introduced Win+D (D for desktop) years ago, and I have generally found it a little more reliable than the old hotkey. The following key sequence, which has also been around since Windows 95, minimizes all windows; but in Windows 7 and beyond, I am not sure it reliably puts focus on the desktop. But it does lend itself to scripting... Ctrl + Esc ' Activate Start/Windows button Esc ' Cancel Start button, but leave it focused Alt + M ' Minimize all A related key sequence makes it possible to interact with items on the desktop without actually minimizing any windows. So interaction with desktop items is hidden behind the open windows. For example, to navigate to and activate a desktop icon called "Terry"... Ctrl + Esc ' Activate Start/Windows button Esc ' Cancel Start button, but leave it focused Shift + Tab ' Navigate to the desktop Terry <Enter> ' Incremental search to Terry, and press Enter to activate it.
  5. To expand on Bruce's excellent explanation... There is no (easy) way to move the mouse pointer to selected text. But experiment with Chrome to find out whether it supports standard Windows hotkeys for selecting text once you have zeroed in the text using the Find command, e.g.: Shift + right arrow (select one character to the right) Shift + Ctrl + right arrow (select one word to the right) Shift + Home (select to the start of the line) Shift + End (select to the end of the line) This is a partial list of hotkeys for selection within a webpage. There are others, pretty well all of which involve holding down the Shift key. With Chrome, you may need to press F7 to enable selection via keyboard. It's a toggle (it's either ON or OFF) so you may need to turn it off once you're done selecting text, e.g., F7, Shift + Ctrl + Right, F7. Overall, I find Firefox more versatile than Chrome -- and much more versatile than Internet Explorer -- when I am scripting macros that select text on a webpage.
  6. Editing the contents of a string

    I use Variable Modify String commands a lot to revise texts. For example: Text Type (Simulate Keystrokes): <CONTROL>a // Select all Clipboard Copy Variable Set String %Clip% from the clipboard contents Variable Modify String %Clip%: Strip CR/LF // Delete all new lines Variable Modify String: Replace " " in %Clip% with " " // Replace double spaces for single spaces Variable Modify String %Clip%: Lowercase // Lowercase everything Variable Modify String: Replace "color" in %Clip% with "colour" // Change the spelling of words that contain "color" and "labor" Variable Modify String: Replace "labor" in %Clip% with "labour" Text Type (Simulate Keystrokes): %Clip% // Replace the selection with the revised text
  7. Although the code is (mostly) unintelligible to me, I did have a few concerns that might account for the inability to interact with the screen elements via keyboard: Interaction via keyboard is improved by relying on "onfocus" instead of "onclick" events. A modal dialog is a secondary window that opens in front of the main window. For example, when you close a word processing document without having saved it, the program pops up a window asking you if you want to save the document. You must interact with the dialog box before you return to main window. In Windows, standard dialog boxes are keyboard accessible by default. In web apps, dialog boxes can be keyboard accessible, but it's up to the developer to ensure keyboard interactivity. There are no accesskey attributes in the code sample. Developers can provide mechanisms for interacting via keyboard by incorporating access keys. In the above example, a user would be able to go to the home page by pressing Alt + h (in Internet Explorer and Chrome) or Shift + Alt + h (in Firefox). In Chrome, the access key is either Alt + h or Shift+ Alt + h, depending on the circumstances.
  8. Can you navigate to these "buttons" by tabbing to them? Is it clear the buttons have focus? If it's clear these non-responsive buttons have keyboard input focus, and if pressing Enter or spacebar have no effect, you may be dealing with a scripted control that does not obey standard interaction rules. If you post a sample of the source code for the control (which you can expose in Chrome by pressing Ctrl + U), there may be hints on ways to activate the control via keyboard (and therefore via keystrokes sent via Macro Express). Or it may be obvious the developers have broken keyboard interaction! If the developers have designed the page for mouse-only interaction, I would encourage you to write them and report a bug -- and an area of non conformance with WCAG 2.0, the de facto international standard for web content accessibility. https://www.w3.org/TR/UNDERSTANDING-WCAG20/keyboard-operation-keyboard-operable.html
  9. I have learned a lot of your posts over the years, so I am glad to be able to reciprocate! The technique is not 100% reliable, but considering the range of macro scripting techniques that involve interacting with the user interface, it's pretty good. Inserting short delays may make the technique less apt to fail when web traffic, downloads, and low resources slow down a system.
  10. Reg: Assertions capability

    1. Is there a capability to search for a specific text and select or click on that particular text You can search for specific text after you copy it into a variable. Selecting text within an application can be done in some applications, but that has nothing to do with Macro Express. 2. Can i grab text from application and paste it in text file Yes, as long as you can select the text in the application. There may be ways to copy text without selecting when dealing with Window controls. 3. Can i compare text file data with application data Yes.
  11. Retrieve Sheetname from Excel

    Alexis, You might be happy to know that the accelerator keys for the English versions do not always make sense. For example, in Word, to navigate to commands related to columns, press "Alt + P" (for Page Layout), and then "J" (for Columns). "J" was a strange choice as an accelerator key, as "C" was available!! And then there are commands to insert symbols, which are accessed by pressing "Alt + N" (for Insert), followed by "U"! I did a quick Google translate, and not too many languages include the the letter "U" in their word for symbol, other than Basque (ikurra) and Corsican (simbulu)...
  12. Retrieve Sheetname from Excel

    Microsoft retains some, but not all, key sequences from the pre-ribbon releases of Office. The technique worked better in some programs than in others, with the best example being Word: the commands on the following menus could be accessed by pressing the old key sequences: "Edit," "Tools," "Format," "Table," and "Insert;" but not "Window" or "Help." Some commands from the old "File" menu were still available using the Alt + F key combination. The reason they kept these key sequences was to appease power users. At least, that's what a Microsoft employee told me when I asked at a conference we both attended. It's been more than 10 years since Microsoft got rid of the menus. Some key sequences continue to work, others not; and some work in Word, but not in Outlook. (In Office 2003 and earlier, the menus in Outlook and Word were somewhat analogous. I suppose the underlying idea was that if you knew how to format a Word document, you would be able to do the same in an Outlook email message. But the user interfaces of the two programs seem to have drifted apart.)
  13. Retrieve Sheetname from Excel

    Is it possible the ribbons behave differently in different languages?
  14. Retrieve Sheetname from Excel

    For many years I have referred to combinations like Alt + H, O, R as "key sequences," as they involve pressing a specific sequence of keys. I don't think key sequences are documented, as there are thousands, maybe tens of thousands of them. But they are not the kind of the thing that people tend to memorize. Instead, they are discovered by paying attention to the letters (or numbers) that appear after pressing the initial Alt, and then following the prompts. So the key sequences are not really hidden. I bet most people don't notice them, so in a sense they are kind of invisible. But once one knows about the letters and numbers that are exposed when you start accessing menus and ribbons via keyboard, one finds they are almost everywhere. In general, I find key sequences are easier to spot in programs that have menus rather than ribbons. With menus, you are looking for underlined letters rather than floating alpha numeric characters. For example, in Firefox, "Options" is Alt + T, O. It might be helpful to know something interesting about the initial Alt. You do NOT need to hold it down while pressing the subsequent key. So you could press, with one finger, the first key, then the second, then the third. In Firefox, "Options" is.. Alt T O Another useful trick for macro scripting is to know you can substitute F10 for the initial Alt. Alt and F10 are functionally identical: F10 T O