I am having a problem trying to get SaveStringToTextFile and LoadStringFromTextFile to work. I tried a simple file name but the Return Code was bad telling me GP did not create the file.
On Activate
var
rc : Boolean
FileName : String = “GPTest.txt”
rc = SaveStringToTextFile (FileName, "TestString")
Print("rc: "+BoolToString(rc))
end
So, I created the file “GPTest.txt” on my Desktop manually and then tried the code again. GP still couldn’t find it.
So, I created the file “C:\Users\Phil\Desktop\GP_test.txt” manually and then tried similar code, but GP doesn’t like the string “C:\Users\Phil\Desktop\GP_test.txt” … so, I didn’t get a chance to test this code:
On Activate
var
rc : Boolean
FileName : String = “C:\Users\Phil\Desktop\GP_test.txt”
rc = SaveStringToTextFile (FileName, "TestString")
Print("rc: "+BoolToString(rc))
end
Has anyone been successful using these functions and if so, could you plz provide a simple scriptlet?