- HIDE: ON
- Hidebb Message Hidden Description
--Obtiene el número serial del disco local
--Gets the serial number of the local disk
local SerialNumber = Drive.GetInformation(String.SplitPath(_ProgramFilesFolder).Drive).SerialNumber
--Verifica si el serial coincide con el ingresado en File.txt
--Check if the serial matches the one entered in File.txt
if tostring(SerialNumber) == TextFile.ReadToString("AutoPlay\\File.txt") then
--Si coincide muestra el mensaje
--If it matches it shows the message
Dialog.Message("Alert", "The serial number matches the text file")
else
--De lo contrario, guarda el número serial en el archivo
--Otherwise, save the serial number to the file
TextFile.WriteFromString("AutoPlay\\File.txt", tostring(SerialNumber), false)
end
braggart ..... are you sure?/fanfarrón ... ¿estás seguro?pexabosh escribió: ↑21 Jun 2021 19:38Sin plugins / without plugins:Inglés no es mi lengua materna / English is not my mother tongue--Obtiene el número serial del disco local --Gets the serial number of the local disk local SerialNumber = Drive.GetInformation(String.SplitPath(_ProgramFilesFolder).Drive).SerialNumber
thankspexabosh escribió: ↑21 Jun 2021 19:38Sin plugins / without plugins:Inglés no es mi lengua materna / English is not my mother tongue--Obtiene el número serial del disco local --Gets the serial number of the local disk local SerialNumber = Drive.GetInformation(String.SplitPath(_ProgramFilesFolder).Drive).SerialNumber --Verifica si el serial coincide con el ingresado en File.txt --Check if the serial matches the one entered in File.txt if tostring(SerialNumber) == TextFile.ReadToString("AutoPlay\\File.txt") then --Si coincide muestra el mensaje --If it matches it shows the message Dialog.Message("Alert", "The serial number matches the text file") else --De lo contrario, guarda el número serial en el archivo --Otherwise, save the serial number to the file TextFile.WriteFromString("AutoPlay\\File.txt", tostring(SerialNumber), false) end
You probably no longer have the doubt, but I forgot to post this when you askedMORTEZA420 escribió: ↑22 Jun 2021 18:39Thanks
This is just to identify a series. I have 10 serial drives
if TextFile.ReadToString("Serial.txt") == System.GetDeviceIdentifier() then
Dialog.Message("LOL", "El serial de este PC coincide con el archivo de texto :D")
end
if String.Find(TextFile.ReadToString("Serial.txt"), System.GetDeviceIdentifier()) ~= -1 then
Dialog.Message("LOL", "El serial de este PC está en la lista del archivo de texto :D")
end