ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Superslayer on March 06, 2009, 07:58:27 PM
-
Here we go.
Is it possible for a script to 'read' text from another text file and return it somehow? Whether by call or otherwise?
-
Not with EasyUO. However, if you format the text file as code, i.e.
set %test something_you_want_to_read
set %test1 something_else
Then you can just "call" the offending text file and suddenly the information appears as variables in your EasyUO memory space. Perhaps that'll work for you?
-
hmm..interesting, I may have to play around with that...perhaps after the whiskey wears off
Thanks again TM, as always 8)
-
You can't get off that easy! I gots me 1.5 bottles of wine in me, and formulated that thought. :p
-
Lol, 5 Jack and cokes here, in Big Cups !...dam regex.
-
1 bottle of cough medicine and a few shots of throat spray every 5 minutes.
-
Ok, so I was able to format the code and replace 'whitespaces' with underscores (_) , but the calling isn't happening yet. Is there a 'template' for called scripts where the first few lines check for passed parameters? What I'm doing currently is simply calling the text file. The files only 2 lines read as follows:
Set %1 C:\Folder1\Folder_Folder2\Folder_Folder3\filename.txt_
Exit
And the script doing the calling is not passing any parameters. Kinda looks like this:
set %file #curpath , file.txt
call %file
-
You might look at my file system subs. I do what you are talking about in there. Also, since the CLAw uses those subs, there are some example files generated as saved files that are later loaded back into the CLAw. You can look at the resulting output.
Actually, if you go look at the quester (1.22), there is an sample CLAw saved file.