HOW TO ENCODE STRING TO NUMBER AND DECODE NUMBER TO STRING

hello my name is Nam , i com from vietnam , i am a newbie in maxscript , i found a simple script to encode string to number , but i dont know how to decode from number to string , can you help me thank you very much

diachimac = ((((dotNetClass "System.Net.NetworkInformation.NetworkInterface").GetAllNetworkInterfaces())[1].getPhysicalAddress()).tostring())

encodingString = "abcdefghijklmnopqrstuvwxyz1234567890"
fn encodeString stringToEncode =
(
encodedSysID = ""
for i = 1 to stringToEncode.count do
(
charIndex = findstring encodingString stringToEncode[i]
encodedSysID += charIndex as string +" "
)
return encodedSysID
)

encodeString diachimac

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexnguyen's picture

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.