Most of the system-varibales can be obtained by using the DOS-commands.
this is an simple example to get the computers- and the user-name
set window on
set window size 800,600
set display mode 800,600,32
ink rgb(0,255,128),0
cls
`------------------------------------------------------------------------------
` Example how to find the windows-username in DarkBasic
`------------------------------------------------------------------------------
if file exist("settings.bat") then delete file "settings.bat"
open to write 1, "settings.bat"
write string 1, "echo USERNAME=%username% > set.txt"
write string 1, "echo COMPUTERNAME=%computername% >> set.txt"
write string 1, "del settings.bat"
write string 1, "exit"
close file 1
execute file "settings.bat","", get dir$()
while file exist("settings.bat")
sync
wait 100
endwhile
sync
open to read 1,get dir$()+"\set.txt"
while file end(1)=0
read string 1, dataline$
if upper$(left$(dataline$,9)) = "USERNAME="
text 80,40, "Your logged in to Windows as "+chr$(34)+right$(dataline$,len(dataline$)-9)+chr$(34)
sync
endif
if upper$(left$(dataline$,13)) = "COMPUTERNAME="
text 80,20, "Your computer identifies himself as "+right$(dataline$,len(dataline$)-13)
sync
endif
endwhile
close file 1
suspend for key
end
This will work in DBClassic too, in DBpro im mostly using the matrix utilities to get the values. A list of the posiible variables and values is diplayed when you enter "set" at the DOS-Prompt.