ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Superslayer on March 06, 2009, 07:58:27 PM

Title: yes, another question [SOLVED]
Post 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?
Title: Re: yes, another question
Post by: TrailMyx on March 06, 2009, 08:02:49 PM
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?
Title: Re: yes, another question
Post by: Superslayer on March 06, 2009, 08:14:25 PM
hmm..interesting, I may have to play around with that...perhaps after the whiskey wears off

Thanks again TM, as always  8)
Title: Re: yes, another question
Post by: TrailMyx on March 06, 2009, 08:28:14 PM
You can't get off that easy!  I gots me 1.5 bottles of wine in me, and formulated that thought.  :p
Title: Re: yes, another question
Post by: Superslayer on March 06, 2009, 09:08:21 PM
Lol, 5 Jack and cokes here,  in Big Cups !...dam regex.
Title: Re: yes, another question
Post by: Khameleon on March 07, 2009, 02:45:54 AM
1 bottle of cough medicine and a few shots of throat spray every 5 minutes. 
Title: Re: yes, another question
Post by: Superslayer on March 07, 2009, 07:56:55 AM
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:

Code: [Select]
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:

Code: [Select]
set %file #curpath , file.txt
call %file

Title: Re: yes, another question
Post by: TrailMyx on March 07, 2009, 10:29:56 AM
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.