I am building a list of words for a custom dictionary and it would be handy to be able to simply select a word and add it to a list in a file.
Ideas on how to send/add selected text to a text file
Ideas on how to send/add selected text to a text file
How would you do that manually? Maybe with following steps:
IfSel
Clipboard 9
Copy
Open "name of list file with full path"
Bottom
IfColNum 1
Else
"
"
EndIf
Paste
"
"
CloseFile Save
ClearClipboard
Clipboard 0
EndIf
What you want to do could be also done faster without a macro by using a user tool.
Open Advanced - Tool Configuration and create a new tool with following settings:
Tab Command
Menu Item Name: Add selection to list file
Command Line: echo %sel% >>"name of list file with full path"
Working Directory: select with the Browse button the direcotry of the list file - please really use the Browse button
Toolbar bitmap/icon (file path): whatever you like and have
Tab Options
Program Type: Dos Program
Save Active File: unchecked
Save all files first: unchecked
Tab Output
Command Output: Append to Existing
Show DOS Box: unchecked
Capture Output: unchecked
Replace selected text with: No Replace
Okay, now you have a tool which you can run whenever you want to append to your list file a line with the current selection.
You can assign a hotkey for the user tool and you can customize the toolbar and add the user tool to the toolbar.
Note: I have both methods not tested.
- Select the word.
- Copy it to clipboard.
- Open the file with the list of words.
- Go to bottom of the file.
- Paste the word.
- Insert a line break.
- Close the list file with save.
IfSel
Clipboard 9
Copy
Open "name of list file with full path"
Bottom
IfColNum 1
Else
"
"
EndIf
Paste
"
"
CloseFile Save
ClearClipboard
Clipboard 0
EndIf
What you want to do could be also done faster without a macro by using a user tool.
Open Advanced - Tool Configuration and create a new tool with following settings:
Tab Command
Menu Item Name: Add selection to list file
Command Line: echo %sel% >>"name of list file with full path"
Working Directory: select with the Browse button the direcotry of the list file - please really use the Browse button
Toolbar bitmap/icon (file path): whatever you like and have
Tab Options
Program Type: Dos Program
Save Active File: unchecked
Save all files first: unchecked
Tab Output
Command Output: Append to Existing
Show DOS Box: unchecked
Capture Output: unchecked
Replace selected text with: No Replace
Okay, now you have a tool which you can run whenever you want to append to your list file a line with the current selection.
You can assign a hotkey for the user tool and you can customize the toolbar and add the user tool to the toolbar.
Note: I have both methods not tested.
Best regards from an UC/UE/UES for Windows user from Austria