Author Topic: yes, another question [SOLVED]  (Read 2700 times)

0 Members and 1 Guest are viewing this topic.

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
yes, another question [SOLVED]
« on: March 06, 2009, 07:58:27 PM »
0
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?
« Last Edit: June 24, 2009, 11:24:59 AM by TrailMyx »

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: yes, another question
« Reply #1 on: March 06, 2009, 08:02:49 PM »
0
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?
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: yes, another question
« Reply #2 on: March 06, 2009, 08:14:25 PM »
0
hmm..interesting, I may have to play around with that...perhaps after the whiskey wears off

Thanks again TM, as always  8)

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: yes, another question
« Reply #3 on: March 06, 2009, 08:28:14 PM »
0
You can't get off that easy!  I gots me 1.5 bottles of wine in me, and formulated that thought.  :p
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: yes, another question
« Reply #4 on: March 06, 2009, 09:08:21 PM »
0
Lol, 5 Jack and cokes here,  in Big Cups !...dam regex.

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: yes, another question
« Reply #5 on: March 07, 2009, 02:45:54 AM »
0
1 bottle of cough medicine and a few shots of throat spray every 5 minutes. 

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: yes, another question
« Reply #6 on: March 07, 2009, 07:56:55 AM »
0
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


Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: yes, another question
« Reply #7 on: March 07, 2009, 10:29:56 AM »
0
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.
Please read the ScriptUO site RULES
Come play RIFT with me!

Tags: