Jump to content
Macro Express Forums

rberq

Members
  • Posts

    1,203
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by rberq

  1. Good idea to make the Direct Editor the default -- that would save a little time for each scan. Is that an ME 6 option? -- can't find it in ME 4. I wrote a driver for the scan macro and ran it on 33 macros. Nice round number. It took slightly over a minute in all. Screens flash by too fast for me to read much. Variable Set Integer %count% to 33 Repeat Start (Repeat %count% times) Macro Run: 9a_Search_Macros_for_Macro_Run_Commands End Repeat I also was not aware that Export could put out a text file. That file could probably be imported into an Excel spreadsheet, add a column to sequentially number each line from one to umpteen, sort to put all "Name:" lines together and all "Macro run" lines together, delete everything else, re-sort on the sequence column, and voila.
  2. So I wrote this macro anyway, to get practice working with ME Pro instead of ME 3. I had a few hours of frustrating failure with what I knew to be FAULTLESS code (the kind I always write🙄), until I figured out what it means to process or not process embedded variables. This macro scans a macro selected from the Macro Explorer and reports main macro name and macros called from within the main macro. It does this by copying the Direct Editor code into a variable, then analyzing that. It only scans one macro, then quits, but before it quits it advances to the next in the Explorer list. Therefore it should work well with a “driver” macro that simply calls the scanner 10 times in succession, or 100 times, or 1,000 …. See additional documentation in comment statements near the beginning of the macro text. I STRONGLY recommend running this against a copy of your live macro file, not against the “real” one. In theory, it makes no changes to any macro. But I hate to turn loose a process intended to interact, at very high speed, with hundreds of valuable macros – if something goes awry, who knows what damage might be caused. I’m going to look into Cory’s “export” technique; probably faster than running in the Explorer and Editor, but I assume parsing out the commands would be much the same. Lock Player: Wait for running macros to stop Log Errors to "C:\Temp\MacroExpressProLogFiles\MacroExpressPro_Macro_Log_File.txt" Log Messages to "C:\Temp\MacroExpressProLogFiles\MacroExpressPro_Macro_Log_File.txt" "Macro executed: TempRunCommandSearch" Log Errors to Default Macro Log // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Keystroke Speed: 10 milliseconds Mouse Speed: 30 milliseconds // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx // // MACRO TO FIND "MACRO RUN" COMMANDS WITHIN A "MAIN" MACRO // // This macro was written and tested with Macro Express Pro (ME version 4). // This macro scans macro text to find MACRO RUN commands. // An output report (text) file is written containing the name of the main (scanned) // macro, followed by the names of all called macros. // If the main macro does no calls, then its name is not written to the report. // If a macro is called multiple times by the main macro, its name is listed only once. // Processing should begin with Macro Explorer open, and the macro to be scanned // should be highlighted (selected). // This macro: // 1) Opens the main macro in the Macro Editor and extracts the name (nickname). // 2) Switches to the Direct editor. // 3) Copies the Direct editor script to the clipboard and then to a text variable. // 4) Closes Macro Editor and arrows down to the next macro line within Explorer. // 5) Parses the copied script to extract names from MACRO RUN commands, writes report. // This macro is best run by a second "driver" macro that activates it multiple times. // Because it processes the macro selected in Explorer, then selects the subsequent // macro, a large number of scripts may be scanned by one start of the "driver" macro. // For safety, this macro should be run against a temporary test copy of the macro file, // not against a live macro file. // // For testing, delete the output text file if it exists Delete File/Files: "c:\temp\test_called_macros.txt" // Type ENTER in Macro Explorer to open highlighted macro in Editor Text Type (Simulate Keystrokes): <ENTER> // Wait for Editor to open Repeat Until %dummy% Does not Equal "%dummy%" If Window "Macro Express Pro - Script Editor" is focused Repeat Exit Else Delay: 100 milliseconds End If End Repeat // Alt-n to go to macro nickname field Text Type (Simulate Keystrokes): <ALTD>n<ALTU> // Highlight macro nickname and copy to clipboard, then to variable mainmac, then END to release the highlighting Text Type (Simulate Keystrokes): <SHIFTD><END><SHIFTU> Macro Run: 0_Generic_Copy_To_Clipboard Variable Set String %mainmac% from the clipboard contents Text Type (Simulate Keystrokes): <END> Text Box Display: Diagnostics // Alt-i to get to script tab, then Alt-v (View) and letter i for Direct Editor Text Type (Simulate Keystrokes): <ALTD>i<ALTU> Text Type (Simulate Keystrokes): <ALTD>v<ALTU>i Delay: 1000 milliseconds // At this point the main macro should be visible in the Direct Editor // Ctrl-a to highlight the entire macro script, copy to clipboard then to %maintext% variable, type END to clear the highlighting Text Type (Simulate Keystrokes): <CTRLD>a<CTRLU> Delay: 1000 milliseconds Macro Run: 0_Generic_Copy_To_Clipboard Variable Set String %maintext% from the clipboard contents Text Type (Simulate Keystrokes): <END> Text Box Display: Diagnostics // Close Macro Editor. FROM HERE ON WE WILL WORK WITH VARIABLES, NOT IN THE MACRO EDITOR. Text Type (Simulate Keystrokes): <ALTD>s<ALTU>c // Wait until Editor is closed and Macro Explorer is focused Repeat Until %dummy% Does not Equal "%dummy%" If Window "Macro Express Pro - Explorer" is focused Repeat Exit Else Delay: 100 milliseconds End If End Repeat Text Box Display: Diagnostics // In Macro Explorer, arrow down to the next macro so we will be ready to process it Text Type (Simulate Keystrokes): <ARROW DOWN> Delay: 1000 milliseconds // // // Clear working variables: %called_list% for all called macros found within this main macro. %display% for lines to be written to the output text file. Variable Set String %called_list% to "" Variable Set String %display% to "" // Clean up the macro script by stripping CR/LF and removing % symbols Variable Modify String %maintext%: Strip CR/LF Variable Modify String: Replace "%" in %maintext% with "" // If macro text contains a Macro Run command, send the main macro name to the output file // If no Macro Run command within this macro, exit from this macro. If Variable %maintext% Contains "<MACRO RUN Use_ID="" Variable Set String %display% to " " // blank line to separate report for each scanned macro Variable Modify String: Append %display% to text file, "c:\temp\test_called_macros.txt" Variable Set String %display% to "Main macro: " Variable Modify String %display%: Append Text String Variable (%mainmac%) Variable Modify String: Append %display% to text file, "c:\temp\test_called_macros.txt" Else Macro Return End If // Entire macro script is in variable %maintext%. Extract and list each unique macro name found within a MACRO RUN command. Repeat Until %maintext% Does not Contain "<MACRO RUN Use_ID="" // Variable Set Integer %offset% to the position of "<MACRO RUN Use_ID="" in %maintext% // find MACRO RUN command within macro script If Variable %offset% Does not Equal "0" Variable Modify Integer: %offset% = %offset% + 18 Text Box Display: Diagnostics Macro Return Variable Modify String %maintext%: Delete a substring starting at 1 and %offset% characters long // delete all macro script up through MACRO RUN ... text Text Box Display: Diagnostics deleted up through MACRO RUN Else Text Box Display: Error Macro Return End If // Variable Set Integer %offset% to the position of "name="" in %maintext% // find "name= within remaining macro script If Variable %offset% Does not Equal "0" Variable Modify Integer: %offset% = %offset% + 5 Variable Modify String %maintext%: Delete a substring starting at 1 and %offset% characters long // delete all macro script up to and including "name=" Text Box Display: Diagnostics deleted up through name= Else Text Box Display: Error Macro Return End If // Variable Set Integer %offset% to the position of """ in %maintext% // find quotation mark terminating the name of the called macro within the MACRO RUN command If Variable %offset% Does not Equal "0" Variable Modify Integer %offset%: Decrement Variable Modify String: Copy a substring in %maintext%, starting at 1 and %offset% characters long to %called_name% // extract the called macro name from the Macro Run command Text Box Display: Diagnostics Else Text Box Display: Error Macro Return End If // If name of called macro is not already in "called_list", put it there and send name to output text file // If the called macro name has already been found (is in called_list), bypass it so output file won't contain duplicates // Add "xxxxxxxxxx" to the name inserted in "called_list", so subsets of the name won't be confused with the full name. Variable Modify String %extended_called_name%: Copy Whole Text (%called_name%) Variable Modify String %extended_called_name%: Append Text (xxxxxxxxxx) Text Box Display: Diagnostics before filling called_list If Variable %called_list% Does not Contain "%extended_called_name%" Text Box Display: Diagnostics is called name in list? Variable Modify String %called_list%: Append Text String Variable (%extended_called_name%) Text Box Display: Diagnostics after filling called_list Variable Set String %display% to "Called macro: " Variable Modify String %display%: Append Text String Variable (%called_name%) Variable Modify String: Append %display% to text file, "c:\temp\test_called_macros.txt" End If // End Repeat // Text Box Display: Diagnostics // // // // // // // Macro Return // Unlock Player <LOCK PLAYER Wait="TRUE"/> <LOG ERRORS Filename="C:\\Temp\\MacroExpressProLogFiles\\MacroExpressPro_Macro_Log_File.txt" Hide_Errors="TRUE"/> <LOG MESSAGES Filename="C:\\Temp\\MacroExpressProLogFiles\\MacroExpressPro_Macro_Log_File.txt" Message="Macro executed: TempRunCommandSearch" Stamp="TRUE"/> <LOG ERRORS Hide_Errors="FALSE" _ENABLED="FALSE"/> <COMMENT Value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"/> <KEYSTROKE SPEED Delay="10"/> <MOUSE SPEED Delay="30"/> <COMMENT Value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"/> <COMMENT Value=" "/> <COMMENT Value="MACRO TO FIND \"MACRO RUN\" COMMANDS WITHIN A \"MAIN\" MACRO "/> <COMMENT Value=" "/> <COMMENT Value="This macro was written and tested with Macro Express Pro (ME version 4). "/> <COMMENT Value="This macro scans macro text to find MACRO RUN commands."/> <COMMENT Value="An output report (text) file is written containing the name of the main (scanned)"/> <COMMENT Value="macro, followed by the names of all called macros."/> <COMMENT Value="If the main macro does no calls, then its name is not written to the report."/> <COMMENT Value="If a macro is called multiple times by the main macro, its name is listed only once."/> <COMMENT Value="Processing should begin with Macro Explorer open, and the macro to be scanned"/> <COMMENT Value="should be highlighted (selected). "/> <COMMENT Value="This macro:"/> <COMMENT Value="1) Opens the main macro in the Macro Editor and extracts the name (nickname)."/> <COMMENT Value="2) Switches to the Direct editor."/> <COMMENT Value="3) Copies the Direct editor script to the clipboard and then to a text variable."/> <COMMENT Value="4) Closes Macro Editor and arrows down to the next macro line within Explorer."/> <COMMENT Value="5) Parses the copied script to extract names from MACRO RUN commands, writes report. "/> <COMMENT Value="This macro is best run by a second \"driver\" macro that activates it multiple times. "/> <COMMENT Value="Because it processes the macro selected in Explorer, then selects the subsequent "/> <COMMENT Value="macro, a large number of scripts may be scanned by one start of the \"driver\" macro. "/> <COMMENT Value="For safety, this macro should be run against a temporary test copy of the macro file, "/> <COMMENT Value="not against a live macro file. "/> <COMMENT Value=" "/> <COMMENT Value="For testing, delete the output text file if it exists "/> <DELETE FILE/FILES Path="c:\\temp\\test_called_macros.txt" Progress="FALSE" Recurse="FALSE" Permanent="TRUE" _ENABLED="FALSE"/> <COMMENT Value="Type ENTER in Macro Explorer to open highlighted macro in Editor "/> <TEXT TYPE Action="0" Text="<ENTER>"/> <COMMENT Value="Wait for Editor to open "/> <REPEAT UNTIL Variable="%dummy%" Condition="\x01" Value="%dummy%"/> <IF WINDOW Option="\x00" Title="Macro Express Pro - Script Editor" Partial="TRUE" Wildcards="FALSE"/> <REPEAT EXIT/> <ELSE/> <DELAY Flags="\x12" Time="100"/> <END IF/> <END REPEAT/> <COMMENT Value="Alt-n to go to macro nickname field "/> <TEXT TYPE Action="0" Text="<ALTD>n<ALTU>"/> <COMMENT Value="Highlight macro nickname and copy to clipboard, then to variable mainmac, then END to release the highlighting "/> <TEXT TYPE Action="0" Text="<SHIFTD><END><SHIFTU>"/> <MACRO RUN Use_ID="FALSE" Name="0_Generic_Copy_To_Clipboard" ID="-1" Wait="TRUE"/> <VARIABLE SET STRING Option="\x02" Destination="%mainmac%" NoEmbeddedVars="FALSE"/> <TEXT TYPE Action="0" Text="<END>"/> <TEXT BOX DISPLAY Title="Diagnostics" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 mainmac = %mainmac%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value="Alt-i to get to script tab, then Alt-v (View) and letter i for Direct Editor "/> <TEXT TYPE Action="0" Text="<ALTD>i<ALTU>"/> <TEXT TYPE Action="0" Text="<ALTD>v<ALTU>i"/> <DELAY Flags="\x12" Time="1000" _ENABLED="FALSE"/> <COMMENT Value="At this point the main macro should be visible in the Direct Editor "/> <COMMENT Value="Ctrl-a to highlight the entire macro script, copy to clipboard then to %maintext% variable, type END to clear the highlighting"/> <TEXT TYPE Action="0" Text="<CTRLD>a<CTRLU>"/> <DELAY Flags="\x12" Time="1000" _ENABLED="FALSE"/> <MACRO RUN Use_ID="FALSE" Name="0_Generic_Copy_To_Clipboard" ID="-1" Wait="TRUE"/> <VARIABLE SET STRING Option="\x02" Destination="%maintext%" NoEmbeddedVars="FALSE"/> <TEXT TYPE Action="0" Text="<END>"/> <TEXT BOX DISPLAY Title="Diagnostics" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 maintext = %maintext%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value="Close Macro Editor. FROM HERE ON WE WILL WORK WITH VARIABLES, NOT IN THE MACRO EDITOR."/> <TEXT TYPE Action="0" Text="<ALTD>s<ALTU>c"/> <COMMENT Value="Wait until Editor is closed and Macro Explorer is focused"/> <REPEAT UNTIL Variable="%dummy%" Condition="\x01" Value="%dummy%"/> <IF WINDOW Option="\x00" Title="Macro Express Pro - Explorer" Partial="TRUE" Wildcards="FALSE"/> <REPEAT EXIT/> <ELSE/> <DELAY Flags="\x12" Time="100"/> <END IF/> <END REPEAT/> <TEXT BOX DISPLAY Title="Diagnostics" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 ME Editor has been closed and Explorer is in focus\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value="In Macro Explorer, arrow down to the next macro so we will be ready to process it "/> <TEXT TYPE Action="0" Text="<ARROW DOWN>"/> <DELAY Flags="\x12" Time="1000" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value="Clear working variables:\r\n%called_list% for all called macros found within this main macro.\r\n%display% for lines to be written to the output text file."/> <VARIABLE SET STRING Option="\x00" Destination="%called_list%" NoEmbeddedVars="TRUE"/> <VARIABLE SET STRING Option="\x00" Destination="%display%" NoEmbeddedVars="TRUE"/> <COMMENT Value="Clean up the macro script by stripping CR/LF and removing % symbols"/> <VARIABLE MODIFY STRING Option="\x03" Destination="%maintext%" _ENABLED="FALSE"/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%maintext%" ToReplace="%" All="TRUE" IgnoreCase="TRUE" NoEmbeddedVars="TRUE"/> <COMMENT Value="If macro text contains a Macro Run command, send the main macro name to the output file "/> <COMMENT Value="If no Macro Run command within this macro, exit from this macro."/> <IF VARIABLE Variable="%maintext%" Condition="\x06" Value="<MACRO RUN Use_ID=\"" IgnoreCase="TRUE"/> <VARIABLE SET STRING Option="\x00" Destination="%display%" Value=" " NoEmbeddedVars="FALSE" _COMMENT="blank line to separate report for each scanned macro"/> <VARIABLE MODIFY STRING Option="\x12" Destination="%display%" Filename="c:\\temp\\test_called_macros.txt" Strip="TRUE" NoEmbeddedVars="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%display%" Value="Main macro: " NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%display%" Variable="%mainmac%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x12" Destination="%display%" Filename="c:\\temp\\test_called_macros.txt" Strip="TRUE" NoEmbeddedVars="FALSE"/> <ELSE/> <MACRO RETURN/> <END IF/> <COMMENT Value="Entire macro script is in variable %maintext%. Extract and list each unique macro name found within a MACRO RUN command. "/> <REPEAT UNTIL Variable="%maintext%" Condition="\x07" Value="<MACRO RUN Use_ID=\""/> <COMMENT Value=" "/> <VARIABLE SET INTEGER Option="\x0E" Destination="%offset%" Text_Variable="%maintext%" Text="<MACRO RUN Use_ID=\"" Ignore_Case="TRUE" _COMMENT="find MACRO RUN command within macro script"/> <IF VARIABLE Variable="%offset%" Condition="\x01" Value="0" IgnoreCase="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x00" Destination="%offset%" Value1="%offset%" Value2="18"/> <TEXT BOX DISPLAY Title="Diagnostics" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 offset=%offset%\r\n\\par maintext=%maintext%\\f1 \r\n\\par }\r\n" Left="10" Top="136" Width="1296" Height="544" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="5" _ENABLED="FALSE"/> <MACRO RETURN _ENABLED="FALSE"/> <VARIABLE MODIFY STRING Option="\x0A" Destination="%maintext%" Start="1" Count="%offset%" _COMMENT="delete all macro script up through MACRO RUN ... text"/> <TEXT BOX DISPLAY Title="Diagnostics deleted up through MACRO RUN" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 offset=%offset%\r\n\\par maintext=%maintext%\\f1 \r\n\\par }\r\n" Left="10" Top="136" Width="1296" Height="544" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <ELSE/> <TEXT BOX DISPLAY Title="Error" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 Error parsing \"Macro Run\" command -- macro aborted.\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="457" Height="168" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <MACRO RETURN/> <END IF/> <COMMENT Value=" "/> <VARIABLE SET INTEGER Option="\x0E" Destination="%offset%" Text_Variable="%maintext%" Text="name=\"" Ignore_Case="TRUE" _COMMENT="find \"name= within remaining macro script"/> <IF VARIABLE Variable="%offset%" Condition="\x01" Value="0" IgnoreCase="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x00" Destination="%offset%" Value1="%offset%" Value2="5"/> <VARIABLE MODIFY STRING Option="\x0A" Destination="%maintext%" Start="1" Count="%offset%" _COMMENT="delete all macro script up to and including \"name=\""/> <TEXT BOX DISPLAY Title="Diagnostics deleted up through name=" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 offset=%offset%\r\n\\par maintext=%maintext%\\f1 \r\n\\par }\r\n" Left="10" Top="136" Width="1296" Height="544" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <ELSE/> <TEXT BOX DISPLAY Title="Error" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 Error parsing called-macro name within \"Macro Run\" command -- macro aborted.\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="551" Height="168" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <MACRO RETURN/> <END IF/> <COMMENT Value=" "/> <VARIABLE SET INTEGER Option="\x0E" Destination="%offset%" Text_Variable="%maintext%" Text="\"" Ignore_Case="TRUE" _COMMENT="find quotation mark terminating the name of the called macro within the MACRO RUN command"/> <IF VARIABLE Variable="%offset%" Condition="\x01" Value="0" IgnoreCase="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x08" Destination="%offset%"/> <VARIABLE MODIFY STRING Option="\x09" Destination="%called_name%" Variable="%maintext%" Start="1" Count="%offset%" NoEmbeddedVars="TRUE" _COMMENT="extract the called macro name from the Macro Run command"/> <TEXT BOX DISPLAY Title="Diagnostics" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 called macro name=%called_name%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="907" Height="184" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <ELSE/> <TEXT BOX DISPLAY Title="Error" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 Error parsing called-macro name within \"Macro Run\" command -- macro aborted.\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="551" Height="168" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <MACRO RETURN/> <END IF/> <COMMENT Value="If name of called macro is not already in \"called_list\", put it there and send name to output text file"/> <COMMENT Value="If the called macro name has already been found (is in called_list), bypass it so output file won't contain duplicates"/> <COMMENT Value="Add \"xxxxxxxxxx\" to the name inserted in \"called_list\", so subsets of the name won't be confused with the full name."/> <VARIABLE MODIFY STRING Option="\x08" Destination="%extended_called_name%" Variable="%called_name%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%extended_called_name%" Value="xxxxxxxxxx" NoEmbeddedVars="FALSE"/> <TEXT BOX DISPLAY Title="Diagnostics before filling called_list" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 called_name=%called_name%\r\n\\par extended_called_name=%extended_called_name%\r\n\\par called_list=%called_list%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="1245" Height="505" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <IF VARIABLE Variable="%called_list%" Condition="\x07" Value="%extended_called_name%" IgnoreCase="TRUE"/> <TEXT BOX DISPLAY Title="Diagnostics is called name in list?" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 Called name %extended_called_name% \r\n\\par is not in list %called_list%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="1245" Height="505" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%called_list%" Variable="%extended_called_name%" NoEmbeddedVars="FALSE"/> <TEXT BOX DISPLAY Title="Diagnostics after filling called_list" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 called_name=%called_name%\r\n\\par extended_called_name=%extended_called_name%\r\n\\par called_list=%called_list%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="1245" Height="505" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%display%" Value="Called macro: " NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%display%" Variable="%called_name%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x12" Destination="%display%" Filename="c:\\temp\\test_called_macros.txt" Strip="TRUE" NoEmbeddedVars="FALSE"/> <END IF/> <COMMENT Value=" "/> <END REPEAT/> <COMMENT Value=" "/> <TEXT BOX DISPLAY Title="Diagnostics" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 called_list=%called_list%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="1245" Height="505" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value=" "/> <MACRO RETURN/> <COMMENT Value=" "/> <UNLOCK PLAYER/>
  3. Alternative to the logging method above: Write a macro to step through Macro Explorer, opening each macro and looking for "Macro Run" commands and appending them to a text file. At your leisure you can look at the text file to see the called macros that are not to be deleted.
  4. I have these two commands at the beginning of every macro. (I wrote a macro to put them there.) The result is a single log file, rather than a separate log for each macro. Because "Log Messages" explicitly logs each macro, called macros are just as easy to identify as main macros. The single log is especially useful for complicated applications where you want to see the sequence and timing that related macros ran. Also, for trace and/or diagnostic purposes you can scatter "Log Messages" commands throughout your macro and examine them later at your leisure. I generally inactivate the diagnostic logging after a macro is debugged, but leave the commands in place so they are easy to reactivate if later problems appear. A very short sample of my log is below. Macro Express inserts the "Macro Completed" lines, so between that and the "Log Messages" at the beginning you know when and for how long a macro ran. Notice in the last log sample that "0_Generic_Copy_To_Clipboard" is a called macro; it's beginning is indicated by the explicit "Log Messages" command within the macro, but Macro Express does NOT tell us when it ended, same as macro explorer says last run time was "Never." If you needed to know how long the called macro took to run, you could put your own time-stamped "Log Messages" command at the end of it. Commands: Log Messages to "C:\Temp\MacroExpressProLogFiles\MacroExpressPro_Macro_Log_File.txt" "Macro executed: 0_Generic_Copy_To_Clipboard" Log Errors to "C:\Temp\MacroExpressProLogFiles\MacroExpressPro_Macro_Log_File.txt" 7/16/2020 12:32:41 PM: Macro executed: Kybd_Paste_Solitaire_Hint Thursday, July 16, 2020 12:32:42 PM: Macro Completed (Kybd_Paste_Solitaire_Hint) 7/16/2020 12:33:18 PM: Macro executed: 1_Type_gmail_eMail_Address Thursday, July 16, 2020 12:33:19 PM: Macro Completed (1_Type_gmail_eMail_Address) 7/16/2020 12:34:26 PM: Macro executed: 1_Close_Application_or_Browser_Window Thursday, July 16, 2020 12:34:26 PM: Macro Completed (1_Close_Application_or_Browser_Window) 7/16/2020 12:34:27 PM: Macro executed: 1_Close_Application_or_Browser_Window Thursday, July 16, 2020 12:34:27 PM: Macro Completed (1_Close_Application_or_Browser_Window) 7/16/2020 12:36:12 PM: Macro executed: 1_GoToForumLink_or_eMail 7/16/2020 12:36:12 PM: Macro executed: 0_Generic_Copy_To_Clipboard Thursday, July 16, 2020 12:36:13 PM: Macro Completed (1_GoToForumLink_or_eMail)
  5. I did modify my book-marking macro to insert a comment via the command list panel. It's nice knowing how to navigate the list with just keystrokes. Also finally wrote a macro that does nothing but simulate the DELETE key. It's either my keyboard or my clumsy fingers, but frequently when I try to delete something, it ends up deleting twice.
  6. Here are my solutions to the copy-and-paste I described above: (1) Insert a "bookmark" comment into the script. (2) For a highlighted block of code, copy to clipboard, re-find the bookmark, delete it, and in its place paste from the clipboard. The bookmark is inserted by duplicating the command at the insertion point, and adding a "bookmark" comment to the duplicated command. This is a little bit crude, because if the bookmark doesn't get deleted we end up with a duplicated command which might or might not cause problems. I might rewrite it to use your command-panel navigation method, to insert a standalone comment rather than modify a "live" command. I couldn't quite figure out that navigation when I originally worked on this a few days ago. // Macro bookmarks a place in the script by duplicating the current line and adding a "BOOKMARK" comment to it // (Works only if the Editor is set to insert commands AFTER the current command) // // Duplicate the line of code at the insertion point Text Type (Simulate Keystrokes): <CTRLD>d<CTRLU> // Ctrl-Alt-c shortcut to insert comment Text Type (Simulate Keystrokes): <CTRLD><ALTD>c<ALTU><CTRLU> Delay: 250 milliseconds // Type special recognizable "bookmark" text, then tab to "OK" and press ENTER to insert the bookmark comment Text Type (Use Clipboard and Paste Text): !@#$%*** BOOKMARK ***!@#$% Text Type (Simulate Keystrokes): <TAB><ENTER> // Macro Return // Macro copies highlighted macro script lines, pastes them into bookmarked location in script // Macro Run: 0_Generic_Copy_To_Clipboard // // Ctlr-HOME to top of script, locate bookmark, paste copied text, arrow up to bookmark line, remove bookmark Text Type (Simulate Keystrokes): <CTRLD><HOME><CTRLU> Text Type (Simulate Keystrokes): <CTRLD>f<CTRLU> Text Type (Simulate Keystrokes): !@#$%*** BOOKMARK ***!@#$%<ENTER><ESC> Text Type (Simulate Keystrokes): <CTRLD>v<CTRLU> Text Type (Simulate Keystrokes): <ARROW UP> Text Type (Simulate Keystrokes): <DELETE> // Macro Return
  7. Yes! Although I admit to getting sucked into doing too-big things with it myself. 🙄
  8. Clever idea, to automate the insertion of often-used commands. There's one thing I would like to have, and I wrote macros for in my last job, and that is bookmarking places in the code. I often will copy a block of code, and want to insert it elsewhere in the same macro. Lots of time is spent finding the code to be copied, then lots more time to re-find the insertion point and paste in the code. It is not unknown for me to paste it in the wrong place. 😧 So I will work on two macros: (1) Insert a "bookmark" comment into the script. (2) Copy to clipboard, re-find the bookmark, delete it, and in its place paste from the clipboard. After macro (1), of course, one would manually locate and highlight the block of code to be cloned, then run macro (2).
  9. Ctrl-1/2/3 etc. seem to work in Firefox and in IE also. If there are more than eight tabs in Firefox, Ctrl-9 takes you to the last one. Things I never knew before ....🙃
  10. Look up keyboard shortcuts for Chrome. When I Googled "keyboard shortcut to switch to a specific Chrome tab", I found that Ctrl-1 activates the first tab, Ctrl-2 activates the second, and so on. So if your Parts tab is always the second one, instead of doing "Window Activate", use the Text Type command to "type" Ctrl-2. Of course Chrome itself will have to be in focus to accept the keystrokes. I don't know for sure that this will work for you, but it's worth a try.
  11. Simpler than mine. Hardest part of making the macro is looking up the Excel keyboard shortcuts.
  12. Now that's impressive!!! You did OCR strictly with ME macros??? How much data did you have to get off a typical document -- a few key characters, or whole lines, or pages of text? How large were the fonts, or did you blow up the PDFs to make gigantic letters? Even though you were working with known fonts and sizes, there must have been slight variations between the pixels "read" and the standardized pixel maps. How did you adjust for the differences? How did you determine that a character was, or was not, a match to one of the maps? By sampling a few dozen, or a few hundred, pixels within a known space on the screen? When you say you could read "very quickly", what does that mean in characters per second, or however you measured it? Sounds like wicked good programming fun!!!
  13. Yes and no. Lots of nice features in ME that make it easy to do stuff beyond keyboard and mouse functions. For simple jobs it's quick and easy, but then one can get sucked in to using it beyond where its strengths are. As a high-level language, the fact that you have to define your own inter-module structure means my techniques will probably differ a lot from yours. Like the days when every bicycle mechanic became his own automobile manufacturer -- eventually Henry Ford had a better idea. ME works nicely as one tool in the box but doesn't replace the whole box.
  14. This seems to work well with Excel 2010. Before initiating the macro, hover the mouse over any cell in the row to be moved down. Then keyboard shortcuts are used. Though row X is to be moved down, the macro actually creates an empty row above X, then copies the row below X to the clipboard and pastes it into the empty row, then deletes the copied/pasted row. The last step of the macro is to position the mouse over the row that has just been moved down, so that no manual repositioning is needed to move it down further – just initiate the macro again. A macro to move a row up would be similar. // // // move excel row down -- mouse hovered over row to be moved // select any cell in row to be moved, based on mouse hovering over it Mouse Left Click // keyboard select entire row to be moved Text Type (Simulate Keystrokes): <SHIFTD><SPACE><SHIFTU> // keyboard insert empty row above row to be moved Text Type (Simulate Keystrokes): <CTRLD><SHIFTD>=<SHIFTU><CTRLU> // keyboard arrow down to row below that to be moved down, keyboard select entire row, copy to clipboard Text Type (Simulate Keystrokes): <ARROW DOWN><ARROW DOWN><SHIFTD><SPACE><SHIFTU><CTRLD>c<CTRLU> // keyboard arrow up to the blank inserted row, keyboard select entire row, paste copied row from clipboard Text Type (Simulate Keystrokes): <ARROW UP><ARROW UP><SHIFTD><SPACE><SHIFTU><CTRLD>v<CTRLU> // keyboard arrow down to row below that to be moved down, keyboard select entire row, keyboard delete row Text Type (Simulate Keystrokes): <ARROW DOWN><ARROW DOWN><SHIFTD><SPACE><SHIFTU><CTRLD>-<CTRLU> // Keyboard arrow up to the row just moved, position mouse over row so we can repeat macro to move it down still more Text Type (Simulate Keystrokes): <ARROW UP> Mouse Move: To the Text Cursor Position // Macro Return // //
  15. Also check Options | Preferences | Playback | Delay After Keystroke Down (and UP). On my system, both items are check-marked, and the suggested 300 microseconds is specified. Are these macros that previously worked, and are now failing? Or have they never worked reliably? Is your PC fairly modern? What version of Windows?
  16. The icons along the right side are so subdued that I didn't even notice them (bear in mind I only started using ME Pro a couple weeks ago.)🙄 But I have for a long time used the keyboard equivalents ctrl-up-arrow, ctrl-down-arrow, and ctrl-d to move or duplicate highlighted lines. I haven't figured out the keyboard shortcut for adding a comment, but while experimenting I discovered that ctrl-x deletes highlighted line(s).
  17. I have been astonished how well my Android phone understands my speech. Not only Google searches, but the map application, too. Instead of all that typing with fingers or a stylus, I can just say, "Hey, Google, navigate to Kalamazoo," and it comprehends.
  18. Yeah, but then my wife will know what I am up to, and offer her opinions.🙄 But that's a great idea. I like my smartphone feature, where I can just say, "Hey, Google, what's the population of Paraguay, and where the heck is Paraguay, anyhow?" and it tells me. I will look into Dragon. Maybe I can just mumble and it will understand....
  19. I have used the opposite approach in many macros, to establish the text cursor position. Generally this is by positioning the mouse over an item, such as one of the titles in a list of emails, or a file name in Explorer, or a word within text. Then hit the hotkey combination to start a macro, and the first thing the macro does is click the mouse to establish the cursor position. Biggest problem with this is, when I move my hands to the keyboard to start the macro, the touch-pad detects the movement and slides the mouse pointer to somewhere else! Perhaps the next ME release will have a brain-wave interface so I can just think "run macro now" without moving my hands. But I will have to keep in mind the possibilities for this command. I experimented a bit this morning and it worked in most of the applications I tested with.
  20. Works well now with the more-common Notepad method of (1) using the ENTER key to start a new line, or just typing along and letting Notepad wrap the words; and (2) using two ENTERs in a row to start a new paragraph by double-spacing. This involved simply scanning the text for two contiguous CRLFs, and if any is/are found, then all single CRLFs are removed. Haven't really tested extensively with lots of documents -- it's fun but I don't envision much use for this macro. <COMMENT Value=" "/> <LOG MESSAGES Filename="C:\\Temp\\MacroExpressProLogFiles\\MacroExpressPro_Macro_Log_File.txt" Message="Macro name: Kbyd_Paragraph" Stamp="TRUE"/> <LOG ERRORS Hide_Errors="FALSE"/> <COMMENT Value="Line Feed (New Line) character ascii 10"/> <VARIABLE SET TO ASCII CHAR Value="10" Destination="%LF%"/> <COMMENT Value="Carriage Return character ascii 13"/> <VARIABLE SET TO ASCII CHAR Value="13" Destination="%CR%"/> <COMMENT Value="Carriage Return / Line Feed combination characters ascii 13 + ascii 10"/> <VARIABLE MODIFY STRING Option="\x08" Destination="%CRLF%" Variable="%CR%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%CRLF%" Variable="%LF%" NoEmbeddedVars="FALSE"/> <COMMENT Value="Octal 01 and 02 "/> <VARIABLE SET TO ASCII CHAR Value="1" Destination="%Octal01%"/> <VARIABLE SET TO ASCII CHAR Value="94" Destination="%Octal01%" _ENABLED="FALSE" _COMMENT="caret ^"/> <VARIABLE SET TO ASCII CHAR Value="2" Destination="%Octal02%"/> <VARIABLE SET TO ASCII CHAR Value="126" Destination="%Octal02%" _ENABLED="FALSE" _COMMENT="tilde ~"/> <COMMENT Value="Pattern to flag paragraph (insertion point) "/> <VARIABLE SET STRING Option="\x00" Destination="%pattern%" Value=")(*()(*()(*()(*()(*()][\\][p" NoEmbeddedVars="FALSE"/> <COMMENT Value="Maximum number of paragraphs to be handled by macro"/> <COMMENT Value="Clear %paragraph% array to hold up to 50 paragraphs "/> <VARIABLE SET INTEGER Option="\x00" Destination="%max_paragraphs%" Value="500"/> <CLEAR VARIABLES Type="Text Variables" Option="\x01" Variable="%paragraph%" Start="1" End="%max_paragraphs%" _COMMENT="clear storage array to hold paragraphs"/> <COMMENT Value=" "/> <COMMENT Value="Style_1 has one CRLF per paragraph.\r\nStyle_2 has a double-CRLF per paragraph, to double-space between paragraphs.\r\nStyle_2 may or may not have a CRLF for each line within a paragraph."/> <COMMENT Value=" "/> <COMMENT Value=" "/> <COMMENT Value="Text file should be already open in Notepad, with mouse hovering over paragraph which is to be moved down.\r\nInsert funny pattern of characters at insertion point."/> <MOUSE LEFT CLICK/> <TEXT TYPE Action="0" Text="%pattern%"/> <COMMENT Value=" "/> <COMMENT Value="Get Notepad content into veriable %book%. "/> <MACRO RUN Use_ID="FALSE" Name="0_Kybd_Copy_All" ID="-1" Wait="TRUE"/> <VARIABLE SET STRING Option="\x02" Destination="%book%" NoEmbeddedVars="FALSE"/> <DELAY Flags="\x11" Time="2" _ENABLED="FALSE"/> <TEXT BOX DISPLAY Title="Debugging -- display book content with pattern inserted" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 %book%\\f1 \r\n\\par }\r\n" Left="25" Top="114" Width="1289" Height="566" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Make sure no octal 01 or 02 already exist in the text"/> <IF VARIABLE Variable="%book%" Condition="\x06" Value="%Octal01%" IgnoreCase="FALSE"/> <OR/> <IF VARIABLE Variable="%book%" Condition="\x06" Value="%Octal02%" IgnoreCase="FALSE"/> <TEXT BOX DISPLAY Title="Error" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 Error: ZIP macro -- text to be compressed already contains the ESC Escape character, or an octal 01 or 02. These characters are not allowed, because they are used for special purposes within this macro.\r\n\\par \r\n\\par Macro aborted. \\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <MACRO RETURN/> <END IF/> <COMMENT Value=" "/> <COMMENT Value="Right-trim the overall text and add another copy of the marker pattern to the end,\r\npreceded by octal 02 so it will be split out as a (dummy) concluding paragraph. "/> <VARIABLE MODIFY STRING Option="\x02" Destination="%book%"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%book%" Value="%Octal02%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%book%" Value="%pattern%" NoEmbeddedVars="FALSE"/> <VARIABLE SET INTEGER Option="\x0D" Destination="%length_book%" Text_Variable="%book%"/> <COMMENT Value=" "/> <COMMENT Value="If text contains any double-CRLF, set Style_2 indicator. Otherwise Style_1. \r\nIf Style_2, replace double-CRLFs by octal 01, so we know where to put back the\r\ndouble-CRLFs later on. Then, if Style_2, get rid of single CRLFs (if any) that mark\r\nends of lines as opposed to paragraphs. "/> <IF VARIABLE Variable="%book%" Condition="\x06" Value="%CRLF%%CRLF%" IgnoreCase="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%style1%" Value="FALSE" NoEmbeddedVars="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%style2%" Value="TRUE" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%book%" ToReplace="%CRLF%%CRLF%" ReplaceWith="%Octal01%" All="TRUE" IgnoreCase="FALSE" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%book%" ToReplace="%CRLF%" ReplaceWith=" " All="TRUE" IgnoreCase="FALSE" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%book%" ToReplace="%Octal01%" ReplaceWith="%CRLF%" All="TRUE" IgnoreCase="FALSE" NoEmbeddedVars="FALSE"/> <ELSE/> <VARIABLE SET STRING Option="\x00" Destination="%style1%" Value="TRUE" NoEmbeddedVars="FALSE"/> <VARIABLE SET STRING Option="\x00" Destination="%style2%" Value="FALSE" NoEmbeddedVars="FALSE"/> <END IF/> <TEXT BOX DISPLAY Title="Diagnostics -- style" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 style1 = %style1%\r\n\\par style2 = %style2%\\f1 \r\n\\par \r\n\\par }\r\n" Left="Center" Top="Center" Width="1348" Height="597" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <COMMENT Value=" "/> <COMMENT Value="Replace all CRLF within text by octal 02."/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%book%" ToReplace="%CRLF%" ReplaceWith="%Octal02%" All="TRUE" IgnoreCase="FALSE" NoEmbeddedVars="FALSE"/> <TEXT BOX DISPLAY Title="Diagnostics -- modified text with octal 02" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 %book%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="1348" Height="597" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Split out text into paragraphs based on CRLF (which has been replaced by octal 02). "/> <SPLIT STRING Source="%book%" SplitChar="%Octal02%" Dest="%paragraph%" Index="1"/> <TEXT BOX DISPLAY Title="Diagnostics -- paragraphs 1 to 12" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 %paragraph[1]%\r\n\\par \r\n\\par %paragraph[2]%\r\n\\par \r\n\\par %paragraph[3]%\r\n\\par \r\n\\par %paragraph[4]%\r\n\\par \\f1 \r\n\\par \\f0 %paragraph[5]%\r\n\\par \r\n\\par %paragraph[6]%\r\n\\par \r\n\\par %paragraph[7]%\r\n\\par \r\n\\par %paragraph[8]%\r\n\\par \r\n\\par %paragraph[9]%\r\n\\par \r\n\\par %paragraph[10]%\r\n\\par \r\n\\par %paragraph[11]%\r\n\\par \r\n\\par %paragraph[12]%\\f1 \r\n\\par \r\n\\par \r\n\\par \r\n\\par \r\n\\par \r\n\\par \r\n\\par }\r\n" Left="7" Top="89" Width="1352" Height="596" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Scan paragraphs in array looking for special pattern that we inserted earlier.\r\nMake sure to take the first pattern, so as not to use the extra pattern that\r\nwe inserted at the end. "/> <VARIABLE SET INTEGER Option="\x00" Destination="%paragraph_index%" Value="0"/> <VARIABLE SET INTEGER Option="\x00" Destination="%index_of_paragraph_to_be_moved%" Value="0"/> <REPEAT UNTIL Variable="%paragraph_index%" Condition="\x04" Value="%max_paragraphs%"/> <VARIABLE MODIFY INTEGER Option="\x07" Destination="%paragraph_index%"/> <IF VARIABLE Variable="%paragraph[%paragraph_index%]%" Condition="\x06" Value="%pattern%" IgnoreCase="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x06" Destination="%index_of_paragraph_to_be_moved%" Variable="%paragraph_index%"/> <REPEAT EXIT/> <END IF/> <END REPEAT/> <TEXT BOX DISPLAY Title="Diagnostics -- paragraph containing pattern" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 Paragraph %index_of_paragraph_to_be_moved% contains the marker pattern\\f1 \r\n\\par \r\n\\par }\r\n" Left="Center" Top="Center" Width="543" Height="171" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Switch the pattern-marked paragraph with the subsequent paragraph "/> <VARIABLE MODIFY INTEGER Option="\x00" Destination="%index_of_subsequent_paragraph%" Value1="%index_of_paragraph_to_be_moved%" Value2="1"/> <VARIABLE MODIFY STRING Option="\x08" Destination="%temporary_paragraph%" Variable="%paragraph[%index_of_paragraph_to_be_moved%]%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x08" Destination="%paragraph[%index_of_paragraph_to_be_moved%]%" Variable="%paragraph[%index_of_subsequent_paragraph%]%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x08" Destination="%paragraph[%index_of_subsequent_paragraph%]%" Variable="%temporary_paragraph%" NoEmbeddedVars="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Build output text by concatenating paragraphs. \r\nAppend to each paragraph the octal 02 that was removed by the Strip command."/> <VARIABLE SET STRING Option="\x00" Destination="%book1%" NoEmbeddedVars="FALSE"/> <VARIABLE SET INTEGER Option="\x00" Destination="%paragraph_index%" Value="0"/> <REPEAT UNTIL Variable="%paragraph_index%" Condition="\x04" Value="%max_paragraphs%"/> <VARIABLE MODIFY INTEGER Option="\x07" Destination="%paragraph_index%"/> <IF VARIABLE Variable="%paragraph[%paragraph_index%]%" Condition="\x00" IgnoreCase="FALSE"/> <ELSE/> <VARIABLE MODIFY STRING Option="\x07" Destination="%book1%" Variable="%paragraph[%paragraph_index%]%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%book1%" Variable="%Octal02%" NoEmbeddedVars="FALSE"/> <END IF/> <END REPEAT/> <VARIABLE SET INTEGER Option="\x0D" Destination="%length_book1%" Text_Variable="%book1%"/> <TEXT BOX DISPLAY Title="Diagnostics -- output rebuilt, but without CRLFs" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 Length of original book %length_book%\r\n\\par Length of modified book1 %length_book1%\r\n\\par \r\n\\par %book1%\\f1 \r\n\\par \r\n\\par }\r\n" Left="Center" Top="Center" Width="1345" Height="613" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Put back the CRLF sequences that we previously converted to octal 02."/> <IF VARIABLE Variable="%style1%" Condition="\x00" Value="TRUE" IgnoreCase="TRUE"/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%book1%" ToReplace="%Octal02%" ReplaceWith="%CRLF%" All="TRUE" IgnoreCase="FALSE" NoEmbeddedVars="FALSE"/> <ELSE/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%book1%" ToReplace="%Octal02%" ReplaceWith="%CRLF%%CRLF%" All="TRUE" IgnoreCase="FALSE" NoEmbeddedVars="FALSE"/> <END IF/> <TEXT BOX DISPLAY Title="Diagnostics -- output rebuilt, CRLFs restored" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 %book1%\\f1 \r\n\\par \r\n\\par }\r\n" Left="Center" Top="Center" Width="1345" Height="613" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Remove the marker pattern from the text "/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%book1%" ToReplace="%pattern%" All="TRUE" IgnoreCase="FALSE" NoEmbeddedVars="FALSE"/> <TEXT BOX DISPLAY Title="Diagnostics -- final output rebuilt, marker patterns removed" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 %book1%\\f1 \r\n\\par \r\n\\par }\r\n" Left="Center" Top="Center" Width="1345" Height="613" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Put the retructured text back into the Notepad area by highlighting all and pasting from clipboard"/> <VARIABLE MODIFY STRING Option="\x10" Destination="%book1%" NoEmbeddedVars="FALSE"/> <TEXT TYPE Action="0" Text="<CTRLD>a<CTRLU>"/> <DELAY Flags="\x12" Time="500"/> <TEXT TYPE Action="0" Text="<CTRLD>v<CTRLU>"/> <COMMENT Value=" "/> <COMMENT Value=" "/> <MACRO RETURN/> <COMMENT Value=" "/>
  21. Often this approach works well for precisely-defined conditions, like what you used it for, and can be done in relatively-few keystrokes. I used to have a wonderful keyboard where you just pressed one of twelve "program" keys, then entered whatever keystrokes you wanted. Basically you could enter a keyboard macro in a matter of seconds, right within the keyboard. My keyboard finally became obsolete because newer computers had no place to plug it in,😧 so I transitioned to Macro Express. ME is vastly more powerful overall, but the programmable keyboard was vastly easier and faster for small keyboard-only sequences. Meanwhile, minor tweaks have made my Notepad macro work with more common document layouts that I mentioned above.
  22. Well, I have a preliminary version working for Notepad. It moves a paragraph down; moving it up would be similar. It requires that the text be typed continuously in Notepad, using the ENTER key only to start a new paragraph. That means the CR-LF sequence exists only at the end of a paragraph. Logic of the macro is first to type an oddball string at the insertion point – wherever the mouse is positioned within the paragraph to be moved down. Then, get the whole document into a variable, and replace every CR-LF with an octal 02, an unprintable character that will never exist in normal text. Replacing CR-LF with a single byte is done because Macro Express needs a single byte for splitting. The text is then split on &02 into array %paragraph%. Each item in the array is searched for the oddball string that the macro initially typed, and when found that array item is swapped with the subsequent one. The items of array %paragraph% are then concatenated to an output string, with CR-LF appended after each paragraph, and the oddball marker string is removed. It works fine when the text follows the constraints I defined. However, when I loaded the text of a book from Project Gutenberg, there was a CR-LF for every line, and paragraphs delineated by double-spacing. More work needed to handle these real-world cases! <COMMENT Value=" "/> <LOG MESSAGES Filename="C:\\Temp\\MacroExpressProLogFiles\\MacroExpressPro_Macro_Log_File.txt" Message="Macro name: Kbyd_Paragraph" Stamp="TRUE"/> <LOG ERRORS Hide_Errors="FALSE"/> <COMMENT Value="Line Feed (New Line) character ascii 10"/> <VARIABLE SET TO ASCII CHAR Value="10" Destination="%LF%"/> <COMMENT Value="Carriage Return character ascii 13"/> <VARIABLE SET TO ASCII CHAR Value="13" Destination="%CR%"/> <COMMENT Value="Carriage Return / Line Feed combination characters ascii 13 + ascii 10"/> <VARIABLE MODIFY STRING Option="\x08" Destination="%CRLF%" Variable="%CR%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%CRLF%" Variable="%LF%" NoEmbeddedVars="FALSE"/> <COMMENT Value="Octal 01 and 02 "/> <VARIABLE SET TO ASCII CHAR Value="1" Destination="%Octal01%"/> <VARIABLE SET TO ASCII CHAR Value="2" Destination="%Octal02%"/> <COMMENT Value="Pattern to flag paragraph (insertion point) "/> <VARIABLE SET STRING Option="\x00" Destination="%pattern%" Value=")(*()(*()(*()(*()(*()][\\][p" NoEmbeddedVars="FALSE"/> <COMMENT Value="Maximum number of paragraphs to be handled by macro"/> <COMMENT Value="Clear %paragraph% array to hold up to 50 paragraphs "/> <VARIABLE SET INTEGER Option="\x00" Destination="%max_paragraphs%" Value="50"/> <CLEAR VARIABLES Type="Text Variables" Option="\x01" Variable="%paragraph%" Start="1" End="%max_paragraphs%" _COMMENT="clear storage array to hold paragraphs"/> <COMMENT Value=" "/> <COMMENT Value="Text file should be already open in Notepad, with mouse hovering over paragraph which is to be moved down.\r\nInsert funny pattern of characters at insertion point."/> <MOUSE LEFT CLICK/> <TEXT TYPE Action="0" Text="%pattern%"/> <COMMENT Value=" "/> <COMMENT Value="Get Notepad content into veriable %book%. "/> <MACRO RUN Use_ID="FALSE" Name="0_Kybd_Copy_All" ID="-1" Wait="TRUE"/> <VARIABLE SET STRING Option="\x02" Destination="%book%" NoEmbeddedVars="FALSE"/> <DELAY Flags="\x11" Time="2" _ENABLED="FALSE"/> <TEXT BOX DISPLAY Title="Debugging -- display book content with pattern inserted" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 %book%\\f1 \r\n\\par }\r\n" Left="25" Top="114" Width="1289" Height="566" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Make sure ESC character does not exist in the text, also no octal 01 or 02"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%book%" Variable="%Octal02%" NoEmbeddedVars="FALSE" _ENABLED="FALSE"/> <IF VARIABLE Variable="%book%" Condition="\x06" Value="%Octal02%" IgnoreCase="FALSE"/> <TEXT BOX DISPLAY Title="Error" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 Error: ZIP macro -- text to be compressed already contains the ESC Escape character, or an octal 01 or 02. These characters are not allowed, because they are used for special purposes within this macro.\r\n\\par \r\n\\par Macro aborted. \\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <MACRO RETURN/> <END IF/> <COMMENT Value=" "/> <COMMENT Value="Right-trim the overall text and add another copy of the marker pattern to the end,\r\npreceded by octal 02 so it will be split out as a (dummy) concluding paragraph. "/> <VARIABLE MODIFY STRING Option="\x02" Destination="%book%"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%book%" Value="%Octal02%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%book%" Value="%pattern%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x06" Destination="%book%" Value="%Octal02%" NoEmbeddedVars="FALSE" _ENABLED="FALSE"/> <VARIABLE SET INTEGER Option="\x0D" Destination="%length_book%" Text_Variable="%book%"/> <COMMENT Value=" "/> <COMMENT Value="Replace all CRLF within text by octal 02."/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%book%" ToReplace="%CRLF%" ReplaceWith="%Octal02%" All="TRUE" IgnoreCase="FALSE" NoEmbeddedVars="FALSE"/> <TEXT BOX DISPLAY Title="Diagnostics -- modified text with octal 02" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 %book%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="1348" Height="597" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Split out text into paragraphs based on CRLF (which has been replaced by octal 02). "/> <SPLIT STRING Source="%book%" SplitChar="%Octal02%" Dest="%paragraph%" Index="1"/> <TEXT BOX DISPLAY Title="Diagnostics -- paragraphs 1 to 12" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 %paragraph[1]%\r\n\\par \r\n\\par %paragraph[2]%\r\n\\par \r\n\\par %paragraph[3]%\r\n\\par \r\n\\par %paragraph[4]%\r\n\\par \\f1 \r\n\\par \\f0 %paragraph[5]%\r\n\\par \r\n\\par %paragraph[6]%\r\n\\par \r\n\\par %paragraph[7]%\r\n\\par \r\n\\par %paragraph[8]%\r\n\\par \r\n\\par %paragraph[9]%\r\n\\par \r\n\\par %paragraph[10]%\r\n\\par \r\n\\par %paragraph[11]%\r\n\\par \r\n\\par %paragraph[12]%\\f1 \r\n\\par \r\n\\par \r\n\\par \r\n\\par \r\n\\par \r\n\\par \r\n\\par }\r\n" Left="7" Top="89" Width="1352" Height="596" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Scan paragraphs in array looking for special pattern that we inserted earlier.\r\nMake sure to take the first pattern, so as not to use the extra pattern that\r\nwe inserted at the end. "/> <VARIABLE SET INTEGER Option="\x00" Destination="%paragraph_index%" Value="0"/> <VARIABLE SET INTEGER Option="\x00" Destination="%index_of_paragraph_to_be_moved%" Value="0"/> <REPEAT UNTIL Variable="%paragraph_index%" Condition="\x04" Value="%max_paragraphs%"/> <VARIABLE MODIFY INTEGER Option="\x07" Destination="%paragraph_index%"/> <IF VARIABLE Variable="%paragraph[%paragraph_index%]%" Condition="\x06" Value="%pattern%" IgnoreCase="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x06" Destination="%index_of_paragraph_to_be_moved%" Variable="%paragraph_index%"/> <REPEAT EXIT/> <END IF/> <END REPEAT/> <TEXT BOX DISPLAY Title="Diagnostics -- paragraph containing pattern" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 Paragraph %index_of_paragraph_to_be_moved% contains the marker pattern\\f1 \r\n\\par \r\n\\par }\r\n" Left="Center" Top="Center" Width="543" Height="171" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Switch the pattern-marked paragraph with the subsequent paragraph "/> <VARIABLE MODIFY INTEGER Option="\x00" Destination="%index_of_subsequent_paragraph%" Value1="%index_of_paragraph_to_be_moved%" Value2="1"/> <VARIABLE MODIFY STRING Option="\x08" Destination="%temporary_paragraph%" Variable="%paragraph[%index_of_paragraph_to_be_moved%]%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x08" Destination="%paragraph[%index_of_paragraph_to_be_moved%]%" Variable="%paragraph[%index_of_subsequent_paragraph%]%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x08" Destination="%paragraph[%index_of_subsequent_paragraph%]%" Variable="%temporary_paragraph%" NoEmbeddedVars="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Build output text by concatenating paragraphs. \r\nAppend to each paragraph the octal 02 that was removed by the Strip command."/> <VARIABLE SET STRING Option="\x00" Destination="%book1%" NoEmbeddedVars="FALSE"/> <VARIABLE SET INTEGER Option="\x00" Destination="%paragraph_index%" Value="0"/> <REPEAT UNTIL Variable="%paragraph_index%" Condition="\x04" Value="%max_paragraphs%"/> <VARIABLE MODIFY INTEGER Option="\x07" Destination="%paragraph_index%"/> <IF VARIABLE Variable="%paragraph[%paragraph_index%]%" Condition="\x00" IgnoreCase="FALSE"/> <ELSE/> <VARIABLE MODIFY STRING Option="\x07" Destination="%book1%" Variable="%paragraph[%paragraph_index%]%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x07" Destination="%book1%" Variable="%Octal02%" NoEmbeddedVars="FALSE"/> <END IF/> <END REPEAT/> <VARIABLE SET INTEGER Option="\x0D" Destination="%length_book1%" Text_Variable="%book1%"/> <TEXT BOX DISPLAY Title="Diagnostics -- output rebuilt, but without CRLFs" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 Length of original book %length_book%\r\n\\par Length of modified book1 %length_book1%\r\n\\par \r\n\\par %book1%\\f1 \r\n\\par \r\n\\par }\r\n" Left="Center" Top="Center" Width="1345" Height="613" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Put back the CRLF sequences that we previously converted to octal 02."/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%book1%" ToReplace="%Octal02%" ReplaceWith="%CRLF%" All="TRUE" IgnoreCase="FALSE" NoEmbeddedVars="FALSE"/> <TEXT BOX DISPLAY Title="Diagnostics -- output rebuilt, CRLFs restored" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 %book1%\\f1 \r\n\\par \r\n\\par }\r\n" Left="Center" Top="Center" Width="1345" Height="613" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Remove the marker pattern from the text "/> <VARIABLE MODIFY STRING Option="\x0F" Destination="%book1%" ToReplace="%pattern%" All="TRUE" IgnoreCase="FALSE" NoEmbeddedVars="FALSE"/> <TEXT BOX DISPLAY Title="Diagnostics -- final output rebuilt, marker patterns removed" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 %book1%\\f1 \r\n\\par \r\n\\par }\r\n" Left="Center" Top="Center" Width="1345" Height="613" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <COMMENT Value=" "/> <COMMENT Value="Put the retructured text back into the Notepad area by highlighting all and pasting from clipboard"/> <VARIABLE MODIFY STRING Option="\x10" Destination="%book1%" NoEmbeddedVars="FALSE"/> <TEXT TYPE Action="0" Text="<CTRLD>a<CTRLU>"/> <DELAY Flags="\x12" Time="500"/> <TEXT TYPE Action="0" Text="<CTRLD>v<CTRLU>"/> <COMMENT Value=" "/> <COMMENT Value=" "/> <MACRO RETURN/> <COMMENT Value=" "/>
×
×
  • Create New...