I just added these two macros to keymac.lib.
You might find them useful.
// FN2CLIP.VDM - Place current file's filename into the clipboard
//
Reg_Set(103,FILENAME) //@103 = Current Filename
#103 = Buf_Num //Save current buffer ID
Buf_Switch(Buf_Free(EXTRA)) //Switch to a free buffer
Reg_Ins(103) //Insert the filename
Clip_Copy_Block(0,Cur_Pos) //Copy it to the clipboard
Buf_Quit(OK) //Close the buffer
Buf_Switch(#103) //Switch back to original buffer
Return
// PATH2CLIP.VDM - Place current file's path (directory) into the clipboard
//
Reg_Set(103,PATHONLY) //@103 = Current path-directory
#103 = Buf_Num //Save current buffer ID
Buf_Switch(Buf_Free(EXTRA)) //Switch to a free buffer
Reg_Ins(103) //Insert the filename
if (File_Size==2 && (Cur_Char(-1)==':')) { //If in a root drive
Ins_Text("\") //.. add a backslash
}
Clip_Copy_Block(0,Cur_Pos) //Copy it to the clipboard
Buf_Quit(OK) //Close the buffer
Buf_Switch(#103) //Switch back to original buffer
Return
Ted.
Ted.
-------------------------------------------------------------------------
Ted Green (ted@...) Greenview Data, Inc.
Web: www.... Fax: 734-996-1308 PO Box 1586, Ann Arbor, MI 48106
Tel: (734) 996-1300 Desk: 734-369-3550 VEDIT - Text/Data/Binary Editor
-------------------------------------------------------------------------
www.SpamStopsHere.com ranked #1 in accuracy by Network Computing Magazine
|
|