I'm using a little "ai" "assistant" that does basic tasks on my computer i have it making sounds and producing images however i use rainmeter on a flash drive so i can use it at school (it wont work on the C: drive because of my schools admin protected laptops) i also use it at home and thus i transfer the flash drive back and forth, unfortunately the different names for the usb ports makes calling the files difficult ( ex. F:\Skins vs E:\Skins) i found a way to test witch it is however the problem comes when i need to change what file is called from my lua script i am trying to stitch the home string with the file directory but it doesn't appear to be working
function file_check(file_name)
local file_found=io.open(file_name, "r")
home = "F:"
if file_found==nil then
file_found=file_name .. " ... Error - File Not Found"
home = "E:"
else
file_found=file_name .. " ... File Found"
home = "F:"
end
return file_found
end
print(file_check("F:\\rainmeter sounds\\i_was_sleeping.wav"))
--if this file is found i know im on my home laptop ^^^
function DealWithInput(inArg)
inputText = string.lower(inArg)
print(home)
if inputText == 'hi' then outputText = 'ugh i was sleeping -_-'SKIN:Bang('Play "home .. \\rainmeter sounds\\i_was_sleeping.wav"')
thanks in advance
Last edited by fonpaolo on September 1st, 2017, 7:54 am, edited 1 time in total.
Reason:Please use the [code] tags to display your code