Post by Stefan on Mar 18, 2022 18:26:02 GMT -5
Hi George,
You're pretty meticulous so I thought I'd bring this to your attention.
THis could potentially trip up a macro writer.
Try this macro in a CLIP session, a 'NEW' (ie 'empty') session and a normal (ie. file loaded) session.
Note the inconsistent values returned by the GET_FILE... calls in case for NEW comapred to CLIP.
eg:
NEW: strings of blanks for Date/Time instead of "" or an actual value, also filenames of "(empty)" instead of ""
' IT.MACRO
DIM AS NUMBER topPtr
topPtr = Get_TopScrn_LPtr
SPF_Cmd("DELETE LNOTE")
SPF_Cmd("LINE !"+topPtr+" LNOTE10")
Set_Line(topPtr+01,"SessionType$ ["+Get_Session_Type$+"]")
Set_Line(topPtr+02,"FullPath$ ["+Get_FullPath$(Get_FileName$)+"]")
Set_Line(topPtr+03,"FilePath$ ["+Get_FilePath$+"]")
Set_Line(topPtr+04," '' Base$ ["+Get_FileBase$+"]")
Set_Line(topPtr+05," '' Name$ ["+Get_FileName$+"]")
Set_Line(topPtr+06," '' Ext$ ["+Get_FileExt$+ "]")
Set_Line(topPtr+07," '' Date$ ["+Get_FileDate$+"]")
Set_Line(topPtr+08," '' Time$ ["+Get_FileTime$+"]")
DIM AS NUMBER topPtr
topPtr = Get_TopScrn_LPtr
SPF_Cmd("DELETE LNOTE")
SPF_Cmd("LINE !"+topPtr+" LNOTE10")
Set_Line(topPtr+01,"SessionType$ ["+Get_Session_Type$+"]")
Set_Line(topPtr+02,"FullPath$ ["+Get_FullPath$(Get_FileName$)+"]")
Set_Line(topPtr+03,"FilePath$ ["+Get_FilePath$+"]")
Set_Line(topPtr+04," '' Base$ ["+Get_FileBase$+"]")
Set_Line(topPtr+05," '' Name$ ["+Get_FileName$+"]")
Set_Line(topPtr+06," '' Ext$ ["+Get_FileExt$+ "]")
Set_Line(topPtr+07," '' Date$ ["+Get_FileDate$+"]")
Set_Line(topPtr+08," '' Time$ ["+Get_FileTime$+"]")
Halt