This macro will do it. The "
ÿ" is a character with hex code 0x255 and is used to mark first bookmark to avoid an endless loop. You can use any other character which is surely not present at start of a line in your file. I have also added some extra codes to avoid also an endless loop if no bookmark is present in the current file. With no bookmarks set only the current line is copied to the clipboard. The file must be temporarily modified with the "
ÿ", so you can't use the macro on a read-only file.
InsertMode
ColumnModeOff
HexOff
Top
GotoBookMark
SelectLine
Copy
EndSelect
Key UP ARROW
Key HOME
IfColNumGt 1
Key HOME
EndIf
"ÿ"
Key LEFT ARROW
Loop
GotoBookMark
Key HOME
IfColNumGt 1
Key HOME
EndIf
IfCharIs "ÿ"
Key DEL
ExitLoop
Else
SelectLine
CopyAppend
EndIf
EndLoopEdited on 2006-08-25: The macro works now also when the configuration option
Editor - Miscellaneous - Home Key Always Goto Column 1 is not checked and the configuration option
Editor - Bookmarks - Bookmark column with line is checked. The second feature is available since UEStudio 6.00 and will be available for UltraEdit with next release v12.20 (current version is v12.10a).
Edited on 2011-03-26: For a script solution not modifying active file and therefore working also on a read-only file see
Copying all bookmarked lines to active clipboard.
PS: With UltraEdit v12.20a+2 and UEStudio v6.10a+2 or later the 2 command sequences
Key HOME
IfColNumGt 1
Key HOME
EndIfcould be replaced by single command
GotoLine 0 1to make the macro faster which moves the caret also always to start of active line.