Also, the global variable (%Computername%) from inside LiveCode does
not display non ASCII chars correctly and respects only uppercase so I can not use it.
So I try to use the CMD shell with the command "hostname", which
displays the name correctly in the commandline window but not inside LiveCode.
I made a little script wich replaces the odd chars but there must be a better way !
After reading the use-list and the Forum up and down I have give up , can anyone help ?
Code: Select all
on mouseUp
set hideConsoleWindows to true
put empty into varComputerName
--•• use the shell to get the computername, this returns Ô·Š‚…™šŽ”„ for ÈÉÀèéàÖÜÄöüä
put shell("hostname") into varComputerName
--•• replace chars to get the correct characters
replace "Ô" with "È" in varComputerName
replace "" with "É" in varComputerName
replace "·" with "À" in varComputerName
replace "Š" with "è" in varComputerName
replace "‚" with "é" in varComputerName
replace "…" with "à" in varComputerName
replace "™" with "Ö" in varComputerName
replace "š" with "Ü" in varComputerName
replace "Ž" with "Ä" in varComputerName
replace "”" with "ö" in varComputerName
replace "" with "ü" in varComputerName
replace "„" with "ä" in varComputerName
answer varComputerName
end mouseUp
Cheers Rolf