Jump to content
Macro Express Forums

Challenge: a macro to simplify "Save As..." operations in Microsoft Word


Recommended Posts

At some point, Microsoft changed the method for accessing the "Save As..." dialog box in Word.

 

Before, accessing the "Save As…" dialog box was a two-step process:

 

Click "File"

Click "Save As..."

 

With the keyboard, press "Alt + F" and then "A".

 

In Word 2019, there are additional steps to access "Save As…"

 

Click "File"

Click "Save As..."

[Wait for the screen to redraw]

Click "Browse"

 

Via keyboard: "Alt + F" and then "A". Then wait for "Browse" to appear. Then press "O".

 

After cursing about Microsoft's decision to force me to perform extra steps, I realized I could use Macro Express to reduce the effort of saving documents in specific folders.

 

For the sake of this challenge, assume that the majority of your Word documents always get saved in the same two or three folders.

 

The challenge:

 

1. Develop a Macro Express script for Microsoft Word to simplify the saving of documents in specific folders. So choose two (or more) folders that you actually use!

 

For the folders you specify, the script opens the "Save As" dialog box with that folder already selected. When the macro ends, all you need to do is type the file name (in the "File Name" field) and Save.  

 

2. The "Save As" dialog allows you to save files in non-Word formats, e.g., PDF, Plain Text, RTF, etc. (It's done through the "Save as type" drop-down list.)

 

Expand the capability of your macro so that it presents options to save a file as a PDF and/or a Plain Text file.

Link to comment
Share on other sites

Well, here's what I came up with. Word is kind of a nightmare to work with from a Macro standpoint.

 

<COMMENT Value="Establish Multiple Choice Defaults (optional)"/>
<VARIABLE SET STRING Option="\x00" Destination="%Selection%" Value="MEProTest Folder&1" NoEmbeddedVars="FALSE"/>
<VARIABLE SET STRING Option="\x00" Destination="%Type%" Value="A" NoEmbeddedVars="FALSE"/>
<COMMENT Value="Choosing Where and How to save."/>
<MULTIPLE CHOICE MENU Style="\x00" Result="\x01" Dest="%Selection%" Title="Save this where?" Prompt="Choose a desitnation folder." Options="MEProTest Folder&1\r\nMEProTest Folder&2" Left="Center" Top="Center" Monitor="0" Width="443" Height="296" OnTop="TRUE" Columns="Auto"/>
<MULTIPLE CHOICE MENU Style="\x00" Result="\x00" Dest="%Type%" Title="Save this as?" Prompt="Choose a file type." Options="&Word Document\r\n&PDF\r\nPlain &Text" Left="Center" Top="Center" Monitor="0" Width="443" Height="296" OnTop="TRUE" Columns="Auto"/>
<VARIABLE MODIFY STRING Option="\x0F" Destination="%Selection%" ToReplace="&" ReplaceWith=" " All="FALSE" IgnoreCase="FALSE" NoEmbeddedVars="FALSE"/>
<COMMENT Value="For the purpose of this macro, I've created two folders that are both in the D:\\ drive, but if the macro complexity were to scale, this next variable could be set as part of the earlier Multiple Choice menus."/>
<VARIABLE SET STRING Option="\x00" Destination="%Directory%" Value="D:/%Selection%" NoEmbeddedVars="FALSE"/>
<TEXT TYPE Action="0" Text="<F12>" _COMMENT="F12 is the \"Save As\" shortcut in the latest versions of Word."/>
<WAIT FOR WINDOW TITLE Title="Save As" Partial="TRUE" Wildcards="FALSE" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="10"/>
<TEXT TYPE Action="0" Text="<ALTD>d<ALTU>" _COMMENT="Alt+D is the shortcut to the file directory"/>
<TEXT TYPE Action="0" Text="%Directory%<ENTER>"/>
<TEXT TYPE Action="0" Text="<ALTD>t<ALTU>" _COMMENT="Alt+t is the shortcut to the File Type menu"/>
<IF VARIABLE Variable="%Type%" Condition="\x00" Value="A" IgnoreCase="FALSE" _COMMENT="Word (default type)"/>
<TEXT TYPE Action="0" Text="<SHIFTD><TAB><SHIFTU>"/>
<ELSE/>
<IF VARIABLE Variable="%Type%" Condition="\x00" Value="B" IgnoreCase="FALSE" _COMMENT="PDF Type"/>
<TEXT TYPE Action="0" Text="p"/>
<TEXT TYPE Action="0" Text="<SHIFTD><TAB><SHIFTU>"/>
<ELSE/>
<TEXT TYPE Action="0" Text="pp" _COMMENT="Plain Text Type"/>
<TEXT TYPE Action="0" Text="<SHIFTD><TAB><SHIFTU>"/>
<END IF/>
<END IF/>

 

This macro could possibly utilize Controls, but I found them to be inconsistent (and possibly broken) when testing in Word.

 

I've never had much luck with them in general, to be honest.

 

Another approach I thought of after finishing this macro would be to use another Set Variable prompt where you'd give the file it's name, and then rather than specifying the file type with a series of If > Else commands, the file type is just appended to the file name.

 

But this doesn't work (I tried it). FileName.pdf saves as FileName.pdf.docx

Link to comment
Share on other sites

1 hour ago, stevecasper said:

This macro could possibly utilize Controls, but I found them to be inconsistent (and possibly broken) when testing in Word.

 

Totally agree. My solution (which I will post after others have had a chance to respond) could use Windows controls. The controls in the "Save As" dialog box can be captured and acted upon. But I have found that these controls, at least in the context of this dialog box, don't improve the reliability or robustness or speed of the resulting macro.

 

Your solution and mine overlap, and also have differences. I thought I would mention a simplification that you might find helpful: when the "Save As" dialog opens, the "File name" field has focus. Your script moves focus to the Address bar (Alt + D), outputs the destination folder, and then moves focus to "File Type" drop-down list (Alt + T).

 

I found it's not necessary to go to the Address line. The directory can be entered directly into the "File name" field. Then press Enter, and the directory has changed!

Link to comment
Share on other sites

Took your suggestion to heart:

<COMMENT Value="Establish Multiple Choice Defaults (optional)"/>
<VARIABLE SET STRING Option="\x00" Destination="%Selection%" Value="MEProTest Folder&1" NoEmbeddedVars="FALSE"/>
<VARIABLE SET STRING Option="\x00" Destination="%Type%" Value="A" NoEmbeddedVars="FALSE"/>
<VARIABLE SET STRING Option="\x00" Destination="%Title%" Value="Name This Document" NoEmbeddedVars="FALSE"/>
<COMMENT Value="Choosing Where and How to save."/>
<VARIABLE SET STRING Option="\x01" Destination="%Title%" Prompt="File Name" Mask="FALSE" OnTop="TRUE" Left="Center" Top="Center" Monitor="0"/>
<MULTIPLE CHOICE MENU Style="\x00" Result="\x01" Dest="%Selection%" Title="Save this where?" Prompt="Choose a desitnation folder." Options="MEProTest Folder&1\r\nMEProTest Folder&2" Left="Center" Top="Center" Monitor="0" Width="443" Height="296" OnTop="TRUE" Columns="Auto"/>
<MULTIPLE CHOICE MENU Style="\x00" Result="\x00" Dest="%Type%" Title="Save this as?" Prompt="Choose a file type." Options="&Word Document\r\n&PDF\r\nPlain &Text" Left="Center" Top="Center" Monitor="0" Width="443" Height="296" OnTop="TRUE" Columns="Auto"/>
<VARIABLE MODIFY STRING Option="\x0F" Destination="%Selection%" ToReplace="&" ReplaceWith=" " All="FALSE" IgnoreCase="FALSE" NoEmbeddedVars="FALSE"/>
<COMMENT Value="For the purpose of this macro, I've created two folders that are both in the D:\\ drive, but if the macro complexity were to scale, this next variable could be set as part of the earlier Multiple Choice menus."/>
<VARIABLE SET STRING Option="\x00" Destination="%Directory%" Value="D:/%Selection%" NoEmbeddedVars="FALSE"/>
<TEXT TYPE Action="0" Text="<F12>" _COMMENT="F12 is the \"Save As\" shortcut in the latest versions of Word."/>
<WAIT FOR WINDOW TITLE Title="Save As" Partial="TRUE" Wildcards="FALSE" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="10"/>
<TEXT TYPE Action="0" Text="%Directory%\\%Title%"/>
<IF VARIABLE Variable="%Type%" Condition="\x01" Value="A" IgnoreCase="FALSE"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<IF VARIABLE Variable="%Type%" Condition="\x00" Value="B" IgnoreCase="FALSE"/>
<TEXT TYPE Action="0" Text="p"/>
<TEXT TYPE Action="0" Text="<SHIFTD><TAB><SHIFTU>"/>
<ELSE/>
<TEXT TYPE Action="0" Text="pp"/>
<TEXT TYPE Action="0" Text="<SHIFTD><TAB><SHIFTU>"/>
<END IF/>
<END IF/>

 

Link to comment
Share on other sites

Our solutions are similar. Both of us:

 

1. Use Word's built in hotkey, F12, to open the "Save As" dialog box.

2. Rely on keystrokes to navigate around the "Save As" dialog box and to choose items from the drop-down list.

3. Include accelerator keys in the Multiple Choice menu to enhance keyboard access.

4. Define the folder locations as variables (for ease of maintenance, scaling up or down, etc.)

 

There are minor differences: I do the "heavy lifting" with CASE statements instead of IF-THEN-ELSE. I opted to use the clipboard to output paths because it's faster.  For PDFs, my script goes the extra step of saving the new file.

 

The biggest difference: I use one Multiple Choice menu, and you use two: the first to get the folder, the second to get the file type. I combined the two because I always save as a Word file before I save it as a PDF or a plain text file, and I always want the second file to be in the same folder as the first. But aesthetically, I prefer what you did.

 

Another (minor) difference: When the target folder is "Alan" I do want to save files in that folder. But I typically DON'T save files in the "CCCC" and "Stories" folders. Each folder contains multiple subfolders. So for those two folders only, my script navigates to the folder list instead of stopping in the "File Name" field. From the folder list, I can quickly reach my "real" target with a few keystrokes. I decided it was good enough to get close to my destination. The alternative would be a Multiple Choose menu displaying ten or twenty folders, which might be unwieldy.

 

// Streamline "Save As" operations in Word 2019
// This macro automates mouse- or keyboard-intensive steps when performing a "Save As"
// It includes shortcuts to save files in specific folders, and options to generate PDFs and plain text files
 
// Restore variables from last time to produce default action for this run
// (The only variable we care about is %Action%)
Variable Restore: Restore Text Variables
 
// Include full paths to the specific folders we want to shortcut. Add more if wanted
Variable Set String %Path1% to "C:\tmp\Alan"
Variable Set String %Path2% to "C:\tmp\CCCC"
Variable Set String %Path3% to "C:\tmp\Stories"
 
// We use the clipboard to quickly output a path; so save the original clipboard, and restore it later
Variable Set String %Clip% from the clipboard contents
 
// Offer all "Save As" options here
Multiple Choice Menu: Save As...
 
// Use Word's hotkey to invoke the "Save As" dialog box. Quit if it doesn't appear in 1 second
Text Type (Simulate Keystrokes): <F12>
 
Wait for Window Title: Save As
On Error
  Catch Error: Condition was not met within the specified amount of time
    MessageBox: Problem with Macro!
    Macro Stop
  End Catch Error
End Error
 
// Do the heavy lifting, based on action chosen in multiple choice menu
Switch( %Action% )
Case: Choose a &Folder...
// We're done
End Case
 
Case: Save in "&Alan"
  Text Type (Use Clipboard and Paste Text): %Path1% // Full path to this folder
  Delay: 500 milliseconds // Delay needed to ensure clipboard fully outputs
  Text Type (Simulate Keystrokes): <ENTER>
End Case
 
Case: Save in "&CCCC"
  Text Type (Use Clipboard and Paste Text): %Path2% // Full path to this folder
  Delay: 500 milliseconds // Delay needed to ensure clipboard fully outputs
  Text Type (Simulate Keystrokes): <ENTER>
  Text Type (Simulate Keystrokes): <SHIFT><TAB><SHIFT><TAB> // Navigate to the folder list
End Case
 
Case: Save in "&Stories"
  Text Type (Use Clipboard and Paste Text): %Path3% // Full path to this folder
  Delay: 500 milliseconds // Delay needed to ensure clipboard fully outputs
  Text Type (Simulate Keystrokes): <ENTER>
  Text Type (Simulate Keystrokes): <SHIFT><TAB><SHIFT><TAB> // Navigate to the folder list
End Case
 
Case: Save as &PDF
  Text Type (Simulate Keystrokes): <ALT>t // Hotkey for "Save as type..." drop-down list
  Text Type (Simulate Keystrokes): <ARROW DOWN> // Drop-down list must be open to navigate
  Text Type (Simulate Keystrokes): <HOME>p // Go to top, then to first item that starts with "P" (PDF)
  Text Type (Simulate Keystrokes): <ENTER>
  Text Type (Simulate Keystrokes): <ALT>s // Hotkey for "Save" button 
End Case
 
Case: Save as Plain &Text
  Text Type (Simulate Keystrokes): <ALT>t // Hotkey for "Save as type..." drop-down list
  Text Type (Simulate Keystrokes): <ARROW DOWN> // Drop-down list must be open to navigate
  Text Type (Simulate Keystrokes): <HOME>pp // Go to top, then to 2nd item that starts with "P" (Plain Text)
  Text Type (Simulate Keystrokes): <ENTER> // (Not needed when saving TXT files?)
  Text Type (Simulate Keystrokes): <SHIFT><TAB> // Navigate to "File name" field
End Case
 
Default Case
  MessageBox: Debug
End Case
End Switch
 
// Try to restore original clipboard
Clipboard Start Copy
  Text Type (Simulate Keystrokes): %Clip%
Clipboard End Copy
 
// Save variables for next time (although values won't survive a reboot)
Variable Save: Save Text Variables

  
<COMMENT Value="Streamline \"Save As\" operations in Word 2019" _BACK="0080FFFF"/>
<COMMENT Value="This macro automates mouse- or keyboard-intensive steps when performing a \"Save As\"" _BACK="0080FFFF"/>
<COMMENT Value="It includes shortcuts to save files in specific folders, and options to generate PDFs and plain text files" _BACK="0080FFFF"/>
<COMMENT/>
<COMMENT Value="Restore variables from last time to produce default action for this run" _BACK="0080FFFF"/>
<COMMENT Value="(The only variable we care about is %Action%)" _BACK="0080FFFF"/>
<VARIABLE RESTORE Option="\x01"/>
<COMMENT/>
<COMMENT Value="Include full paths to the specific folders we want to shortcut. Add more if wanted" _BACK="0080FFFF"/>
<VARIABLE SET STRING Option="\x00" Destination="%Path1%" Value="C:\\tmp\\Alan" NoEmbeddedVars="FALSE"/>
<VARIABLE SET STRING Option="\x00" Destination="%Path2%" Value="C:\\tmp\\CCCC" NoEmbeddedVars="FALSE"/>
<VARIABLE SET STRING Option="\x00" Destination="%Path3%" Value="C:\\tmp\\Stories" NoEmbeddedVars="FALSE"/>
<COMMENT/>
<COMMENT Value="We use the clipboard to quickly output a path; so save the original clipboard, and restore it later" _BACK="0080FFFF"/>
<VARIABLE SET STRING Option="\x02" Destination="%Clip%" NoEmbeddedVars="FALSE"/>
<COMMENT/>
<COMMENT Value="Offer all \"Save As\" options here" _BACK="0080FFFF"/>
<MULTIPLE CHOICE MENU Style="\x00" Result="\x01" Dest="%Action%" Title="Save As..." Prompt="Where to save, or file type to save?" Options="Choose a &Folder...\r\nSave in \"&Alan\"\r\nSave in \"&CCCC\"\r\nSave in \"&Stories\"\r\nSave as &PDF\r\nSave as Plain &Text" Left="727" Top="356" Monitor="0" Width="476" Height="266" OnTop="TRUE" Columns="Auto"/>
<COMMENT/>
<COMMENT Value="Use Word's hotkey to invoke the \"Save As\" dialog box. Quit if it doesn't appear in 1 second" _BACK="0080FFFF"/>
<TEXT TYPE Action="0" Text="<F12>"/>
<COMMENT/>
<WAIT FOR WINDOW TITLE Title="Save As" Partial="FALSE" Wildcards="FALSE" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="1" _HANDLE="0x0014"/>
<ON ERROR/>
<CATCH ERROR Code="20"/>
<MESSAGEBOX Caption="Problem with Macro!" Message="\"Save As\" dialog box did not appear in time" Icon="4"/>
<MACRO STOP/>
<END CATCH ERROR/>
<END ERROR/>
<COMMENT/>
<COMMENT Value="Do the heavy lifting, based on action chosen in multiple choice menu" _BACK="0080FFFF"/>
<SWITCH Variable="%Action%"/>
<CASE Value="Choose a &Folder..."/>
<COMMENT Value="We're done"/>
<END CASE/>
<COMMENT/>
<CASE Value="Save in \"&Alan\""/>
<TEXT TYPE Action="1" Text="%Path1%" _COMMENT="Full path to this folder"/>
<DELAY Flags="\x02" Time="500" _COMMENT="Delay needed to ensure clipboard fully outputs"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<END CASE/>
<COMMENT/>
<CASE Value="Save in \"&CCCC\""/>
<TEXT TYPE Action="1" Text="%Path2%" _COMMENT="Full path to this folder"/>
<DELAY Flags="\x02" Time="500" _COMMENT="Delay needed to ensure clipboard fully outputs"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<TEXT TYPE Action="0" Text="<SHIFT><TAB><SHIFT><TAB>" _COMMENT="Navigate to the folder list"/>
<END CASE/>
<COMMENT/>
<CASE Value="Save in \"&Stories\""/>
<TEXT TYPE Action="1" Text="%Path3%" _COMMENT="Full path to this folder"/>
<DELAY Flags="\x02" Time="500" _COMMENT="Delay needed to ensure clipboard fully outputs"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<TEXT TYPE Action="0" Text="<SHIFT><TAB><SHIFT><TAB>" _COMMENT="Navigate to the folder list"/>
<END CASE/>
<COMMENT/>
<CASE Value="Save as &PDF"/>
<TEXT TYPE Action="0" Text="<ALT>t" _COMMENT="Hotkey for \"Save as type...\" drop-down list"/>
<TEXT TYPE Action="0" Text="<ARROW DOWN>" _COMMENT="Drop-down list must be open to navigate"/>
<TEXT TYPE Action="0" Text="<HOME>p" _COMMENT="Go to top, then to first item that starts with \"P\" (PDF)"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<TEXT TYPE Action="0" Text="<ALT>s" _COMMENT="Hotkey for \"Save\" button "/>
<END CASE/>
<COMMENT/>
<CASE Value="Save as Plain &Text"/>
<TEXT TYPE Action="0" Text="<ALT>t" _COMMENT="Hotkey for \"Save as type...\" drop-down list"/>
<TEXT TYPE Action="0" Text="<ARROW DOWN>" _COMMENT="Drop-down list must be open to navigate"/>
<TEXT TYPE Action="0" Text="<HOME>pp" _COMMENT="Go to top, then to 2nd item that starts with \"P\" (Plain Text)"/>
<TEXT TYPE Action="0" Text="<ENTER>" _ENABLED="FALSE" _COMMENT="(Not needed when saving TXT files?)"/>
<TEXT TYPE Action="0" Text="<SHIFT><TAB>" _COMMENT="Navigate to \"File name\" field"/>
<END CASE/>
<COMMENT/>
<DEFAULT CASE/>
<MESSAGEBOX Caption="Debug" Message="Case = \"%Action%\" is not handled" Icon="1"/>
<END CASE/>
<END SWITCH/>
<COMMENT/>
<COMMENT Value="Try to restore original clipboard" _BACK="0080FFFF"/>
<CLIPBOARD START COPY/>
<TEXT TYPE Action="0" Text="%Clip%"/>
<CLIPBOARD END COPY/>
<COMMENT/>
<COMMENT Value="Save variables for next time (although values won't survive a reboot)" _BACK="0080FFFF"/>
<VARIABLE SAVE Option="\x01"/>

 

Link to comment
Share on other sites

  • 2 weeks later...

Do you want a really SIGNIFICANT reply to the "save as"? 

TL;DR <=  Sorry if so.

I have a file called "names.txt", containing comma delimited "short names" for folders - even on my NAS \\Alpha\...

a few lines:

how,C:\Ward\Bin\How\
dc,C:\Ward\Darryl\Chats\
xn,C:\Ward\Xmodem-net\
e,C:\Ward\Eudora\
nastv,\\Alpha\shows\tv\

When I do a save-as, the suggested name is highlighted so I ^C it to save it. -- but I don't HAVE to, read on:

 

I then type my macro express pro 6 shortcut leadin which is ";;" then the macro to read my names file and return the full path:  "dot"  (.).

ex:    save as

shows [myfile.ods] but this isn't in the directory I want

I press ^C to save it

I type [mac ex shortkey leadin].   <== note the "dot" at the end.

it pops up a window asking for the shortcut name:

I type for ex dc<enter>

it looks up, finds dc is c:\ward\darryl\chats\ and stuffs it in the "save as" name field.

I can then do either of these:

1: press ^V to paste in the "myfile.ods" and hit enter to save.

-or-

2: I hit enter with just the path in the save-as filename, which switches to that directory *and* puts the "myfile.ods" back, so press enter

 

Do I use this macro?   Does the fact that I have 495 names in my NAMES.TXT help you answer?  LOL

 

Name: . = go via names.txt any app
Icon: (Default)
Shortkey: .
Scope: Global
<VARIABLE SET STRING Option="\x02" Destination="%saveclip%" NoEmbeddedVars="FALSE" _ENABLED="FALSE"/>
<TEXT TYPE Action="0" Text="<SHIFTD><HOME><DELETE><SHIFTU>" _ENABLED="FALSE"/>
<DELAY Flags="\x02" Time="500"/>
<VARIABLE SET STRING Option="\x01" Destination="%name%" Prompt="name to look up:" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/>
<VARIABLE SET STRING Option="\x02" Destination="%name%" NoEmbeddedVars="FALSE" _ENABLED="FALSE"/>
<VARIABLE SET STRING Option="\x00" Destination="%NamesPath%" Value="C:\\Ward\\Directories\\T520-names.txt" NoEmbeddedVars="FALSE"/>
<IF NOT FILE EXISTS File="%NamesPath%"/>
    <VARIABLE SET STRING Option="\x00" Destination="%NamesPath%" Value="c:\\Ward\\Names.txt" NoEmbeddedVars="FALSE"/>
    <IF NOT FILE EXISTS File="%NamesPath%"/>
        <VARIABLE SET STRING Option="\x00" Destination="%NamesPath%" Value="C:\\Ward\\T520-names.txt" NoEmbeddedVars="FALSE"/>
    <END IF/>
    <IF NOT FILE EXISTS File="%NamesPath%"/>
        <MACRO STOP/>
    <END IF/>
<END IF/>
<REPEAT START Start="1" Step="1" Count="100" Save="FALSE" _ENABLED="FALSE"/>
<ASCII FILE BEGIN PROCESS Filename="%NamesPath%" Format="CSV" Start_Record="1" Process_All="TRUE" Records="1" Variable="%namesfile%" Start_Index="1" Parse_Blank_Lines="FALSE" Clear_Array="TRUE"/>
<TEXT BOX DISPLAY Title="Variables" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs14 %name%\r\n\\par %namesfile[1]%\r\n\\par %namesfile[2]%\r\n\\par \\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x01" Delay="1" _ENABLED="FALSE"/>
<DELAY Flags="\x01" Time="1" _ENABLED="FALSE"/>
    <IF VARIABLE Variable="%namesfile[1]%" Condition="\x00" Value="%name%" IgnoreCase="FALSE"/>
        <DELAY Flags="\x02" Time="500"/>
        <TEXT TYPE Action="0" Text="%namesfile[2]%"/>
        <MACRO RETURN/>
        <REPEAT EXIT/>
    <END IF/>
<ASCII FILE END PROCESS/>
<END REPEAT _ENABLED="FALSE"/>
<TEXT TYPE Action="0" Text="\\" _ENABLED="FALSE"/>
<TEXT TYPE Action="0" Text="%name% -- ** Not found **"/>

Hope you don't mind the indents - I wrote a URL indenter and expanded it to work with macro express...

I should have cleaned that up for submission, by making assigning the names.txt a variable -- just search for it in the macro.

 

BUGS:  Windows 10, curses, sometimes does the popup window asking for the name, BEHIND the active window.   I've learned to ignore that, and just type the shortcut, e.g. dc<enter> which works find. 

 

Enjoy. 

 

Ward Christensen, inventor of "Xmodem" and "BBSs" (Bulletin Board Systems) (all 3 entries are on wikipedia if you're curious)

 

P.S. I have about 250 macro express macros.  I'll probably be rather active here, haha.  I'm a 75-yr-old retiree from 44 years at IBM in the Chicago area.

 

P.P.S. The "program/programming language" I use for (1) maintaining my names.txt list, and (2) indenting urls and macros, is Mansfield Software Kedit, so sorry, not very portable.

 

______________________

A bit of background:  At one point, I believe it was Windows XP, assigning shortcut keys in Windows was easy - you just did the properties on the link in the start menu folder, and assigned for example "K" which meant this .lnk would be launched by Ctrl-Alt-K.

 

Well, one day, I realized that doing Windows shortcut keys to launch, sometimes took TEN SECONDS.   I analyzed why, and found that XP was NOT CACHING the shortcut keys, so was finding the start menu for every user, opening each .lnk file, scanning for the n'th character, to see if it matched the one you used with Ctrl-Alt.   I was SO annoyed, I sought a replacement - and Macro Express to the rescue!  Instant loading of programs, instead of up to 10 seconds of "nothing".  

 

THEN I went nuts with shortcut keys, to where I now have 173. 

 

 

Link to comment
Share on other sites

Does anyone else have a problem with Windows, (I'm on Windows 10) where pressing enter after a "save as" name is all set, doesn't always work?

Even pressing alt-S (the highlighted "save" button].   At times I press enter 2-3 times to get it to save.

 

I bring this up, because it is a nightmare to program macros for things that -- unlike what a computer SHOULD do -- aren't repeatable.

 

If i just sent an enter keystroke and assume the "save as" window is done, BOOM goes the rest of the macro.  The only SURE way is to move the mouse to the [save] button and click.  I "think" it is always in the same relative position.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...