Jump to content
Macro Express Forums

acantor

Members
  • Posts

    1,532
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by acantor

  1. If the four windows have the same titles, try using Handle variables to uniquely identify them.
  2. Do you mean that you want to copy a specific file to the clipboard? Or copy the file and paste it into a different folder? Or copy a file that you previously selected? Or duplicate a file in the same folder but with a different name?
  3. The caption text contains today's date, so the caption changes every day. You might be able to make this work if you switch "Exact Match" to "Partial Match," and then specify only the part of the caption that is unchanging, e.g., - ArcheAge or ArchAge DX11 or whatever
  4. Ctrl+Shift+N creates a new folder. Alt+Shift+N does nothing. This Windows hotkey works in a lot of contexts, e.g., in a Word or Outlook "Save As..." dialog, in Windows Explorer, etc.
  5. You may need to use a repeat to loop through all each value of the array. The code isn't complicated -- start repeat, test, iterate, end repeat -- but I don't think there are any major shortcuts.
  6. What are you trying to do with all those clicks? The reason I ask is that there are very few tasks in Microsoft Word that require pointing and clicking. I would guess that 99+% can be accomplished purely by sending a few keystrokes. Macros are far more reliable when keystrokes substitute for mouse clicks.
  7. Terry, I am curious to know how you get the "Select a Macro" window. I don't think I have ever seen it, despite my having been using MEP since its inception.
  8. Or do it this way, which gives focus to the icon without moving the mouse. Activate the icon by pressing spacebar or Enter. // Move keyboard input focus the left edge of SysTray, where the "Show Hidden Icons" control resides Text Type (Simulate Keystrokes): <WIN>b // Set the title of the Systray "window" Variable Set String %WindowTitle% to topmost window title // Get SysTray Control (set the "top level window caption" to %WindowTitle% Get Control: (EXPLORER.EXE) Using z-order -> %SysTrayControl% // Give it focus, without moving the mouse pointer Set Focus to %SysTrayControl%
  9. // Move keyboard input focus the left edge of SysTray, where the "Show Hidden Icons" control resides Text Type (Simulate Keystrokes): <WIN>b // Give time for SysTray to gain focus Delay: 200 milliseconds // Move the mouse cursor to this location Mouse Move: To the Text Cursor Position
  10. Joe, your code sample hints at the potential of using External Scripts. Thank you for sharing. But there are a lot of details to understand. Would you consider posting code samples for simpler tasks? For example, how to activate a hypertext link, "click" a pushbutton, or pick a radio button.
  11. Terry, do you know about Excel's fill commands? Basically, you type periodic data in two contiguous cells; select the two cells; then drag the "handle" in the lower right corner of the selected cells in the direction you want to fill. Fill commands work with integers and decimals (positive and negative, days of the week, months, dates (although not every format is supported), prices, and more. For example: to create a row with cells starting at 01-January-2014 and going to 31-December-2014... 1. Type 01-January-2014 in a cell. 2. Type 02-January-2014 in the adjacent cell to the right. 3. Select the two cells. 4. With the mouse, grab the handle in the lower right corner, and drag right. This will cause cells to fill with values until the mouse is released.
  12. You could also try <ALT><ARROW UP> instead of <ALT><ARROW DOWN>. In some situations, <F4> opens a drop down list.
  13. Not as portable a solution, but you could send the DNS hotkey to toggle the microphone on and off: Text Type (Simulate Keystrokes): <KEYP+>
  14. I wonder whether the temporary case of "treacleitis" (or "molassesitis" in Canada and the US) that afflicts computers after a reboot, also affects computers after they hibernate, or are put in sleep mode.
  15. Definitely something that happens regularly when I run a macro immediately after firing up a computer. I don't think there is anything you can do about it, short of adding inordinately long delays into scripts that, under other conditions, don't need the delays.
  16. I had a crash with the new update this morning. But then I had flawless performance the rest of the day. In fact, my most unreliable scripts felt more solid today, including those that use weird combinations of Text Type + Clipboard commands + string variable manipulations. The jury is out on whether this morning's crash (and Terry's treacly experience) are related to the update. My guess: no.
  17. In MEP, you are not restricted to variable names like %N1,% %T1%, etc. You can use %Count%, %Height%, and whatever. It's a nice option.
  18. My bad! The code sample I provided was based on what can be done with Macro Express Pro!
  19. You can save a lot of effort if you avoid basing your ME scripts on the position of the mouse pointer. Windows Explorer supports keyboard navigation, keyboard selection and copying via keyboard.
  20. In Macro Express, there is no elegant way to do this. There are two choices that I am aware of: 1. Cumbersome text type commands, 2. Repeat with text type commands (as suggested by the previous poster)
  21. I am not sure what you mean by the Explore properties bar, but I confirm that the ampersand followed by a space appears as an underscore (with no space) whwere the nickname appears in the tab in the lower left corner in the Script Editor, just above the words "Licensed to..."
  22. Delay: 2 seconds, without ability to halt I stopped using this command, as too often it caused Macro Express to freeze. After a few seconds, the whole computer became non-responsive. The only solution was a reboot. The regular delay command sidesteps this problem, at least most of the time: Delay: 2 seconds
  23. Excellent ideas everybody! I found another solution that works reliably, is fast, does not involve the clipboard, and as a bonus, includes a mechanism for inserting the subject line and the body text. This solution does involve sending keystrokes to the user interface, but only minimally. It's a hybrid MEP + VBA macro: 1. A Macro Express script triggers the VBA script via the Outlook UI. 2. The VBA does its magic entirely programatically, 3. Macro Express sends a few keystrokes to finish the job. In Outlook, open the VBA Editor, add a new module, and insert this code for a script called AddAttachment. Note that the script also defines the subject line and the body text. (Both are optional.) Sub AddAttachment() Dim myItem As Outlook.MailItem Dim myAttachments As Outlook.Attachments Dim AttachmentName, BodyText, SubjectText As String Let AttachmentName = "c:\test.pdf" Let BodyText = "Thank you for writing. The attachment contains a full explanation." Let SubjectText = "Reply to your Question." Set myItem = Application.CreateItem(olMailItem) Set myAttachments = myItem.Attachments myAttachments.Add AttachmentName myItem.Subject = SubjectText myItem.Body = BodyText myItem.Display End Sub In MEP, create a macro with window specific scope of: - Message ( This forces the script to be recognized in any Outlook email message. MEP opens the Outlook "Macro" window (Alt + F8), types in the name of the VBA script, and runs it (Alt + R). The VBA code inserts the attachment, subject and body text. Then Macro Express moves keyboard focus into the body field and moves the cursor to the end: Text Type (Simulate Keystrokes): <ALT><F8> Text Type (Simulate Keystrokes): AddAttachment Text Type (Simulate Keystrokes): <ALT>r Text Type (Simulate Keystrokes): <SHIFTD><TAB><TAB><TAB><TAB><TAB><SHIFTU> Text Type (Simulate Keystrokes): <CONTROL><END>
×
×
  • Create New...