Hi,
I would like to put the name of the drive from which I booted up my computer into a text register.
Since the name of this drive is given by the Windows environment variable %HOMEDRIVE%, I could do this via redirection. Here are the details:
System("cmd /c set HOMEDRIVE >|(VEDIT_TEMP)\homedrive.tmp")
#10=Buf_Free
Buf_Switch(#10)
File_Open("|(VEDIT_TEMP)\homedrive.tmp",NOEVENT+NOMSG+OVERWRITE)
Begin_Of_File
Char(10)
Block_Begin(Cur_Pos)
Char(2)
Block_End(Cur_Pos)
Reg_Copy_Block(10,BB,BE)
Buf_Close(#10)
Return( )
This little macro, indeed, works for me.
According to the Vedit on-line help:
Out_Reg(r) Re-route console output to T-Reg 'r'.
So, I thought that the Out_Reg( ) command would do this task faster. However, I can not make it work.
Thanks,
-peter
|
|