Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: File Read Function(s)  (Read 31684 times)

NickE

  • Full Member
  • ***
  • Posts: 167
    • View Profile
File Read Function(s)
« on: July 30, 2008, 11:45:00 am »

Steve,
If I could beg for a single ASL update for the next preview, it would be file.read member function(s).

Here's why:

It would be a work-around for most of the other items on the scripting wish-list. 
(1) One could read and write Anim8or project files allowing one to do particle animation, fluid dynamics, and physics by generating objects and morph targets and scene object placement and controller values, and so much more!
(2) One could simulate parameter passing between scripts
(3) Custom import filters

Once a file.read ability exists, the only thing needed to have robust access to all of Anim8or's modes would be the ability to trigger another script's execution from within a script.  (more begging here)  Even the simplest implementation would be sufficient: completely terminate the original script and begin execution of the requested script.  The file read/write functions can be used to simulate user defined functions ability.

Those two additional functions - file.read and script.execute - would open the door to the development of libraries of script functions like physics, walk sequences, mouth movement, lip synch, etc.

Thank you!
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2124
    • View Profile
Re: File Read Function(s)
« Reply #1 on: August 08, 2008, 08:03:48 pm »

File reads are on the list, both binary and text, as are functions, but not for the next drop.
Logged

D.J.Peters

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: File Read Function(s)
« Reply #2 on: June 23, 2009, 06:08:47 am »

What is the curent state of file.open("file.txt","r") mode ?

Joshy
Logged

D.J.Peters

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: File Read Function(s)
« Reply #3 on: March 14, 2018, 09:45:53 pm »

Hello Steve,
it's 9 year ago is file reading posible now ?

have a good time.

Joshy
« Last Edit: October 11, 2018, 07:33:39 am by D.J.Peters »
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2124
    • View Profile
Re: File Read Function(s)
« Reply #4 on: March 14, 2018, 09:54:28 pm »

D.J.Peters: Are you clairvoyant??? You're asking this today after 9 years?
It happens that I'm just putting the finishing touches on a prototype build with text file input working. I should have it posted in a day or so
Logged

nemyax

  • Full Member
  • ***
  • Posts: 227
    • View Profile
Re: File Read Function(s)
« Reply #5 on: March 15, 2018, 09:45:54 am »

Will ASL allow function definitions in the new prototype?
Logged

Claude

  • Sr. Member
  • ****
  • Posts: 285
    • View Profile
Re: File Read Function(s)
« Reply #6 on: March 15, 2018, 10:32:56 am »

User defined functions are available.
http://www.anim8or.com/smf/index.php/topic,4814.msg35005.html#msg35005

Steve ,the spec still says:
"There is currently no support for user defined functions."
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2124
    • View Profile
Re: File Read Function(s)
« Reply #7 on: March 15, 2018, 12:07:18 pm »

Claude: Oops! I need to fix that, too.
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2124
    • View Profile
Re: File Read Function(s)
« Reply #8 on: May 26, 2018, 04:44:01 pm »

Just a note to say that text input is available in build build 1321. See this topic for details.
Logged

D.J.Peters

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: File Read Function(s)
« Reply #9 on: October 11, 2018, 07:37:53 am »

D.J.Peters: Are you clairvoyant?
I'm sure you not :-)

Thank you for the text scanner I give it a try now.

Joshy
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: File Read Function(s)
« Reply #10 on: March 15, 2019, 01:58:57 am »

@Steve

Can we get a "?" token (currently returns an error token), and can I request an enhancement to Error Token such that scanner.strval is populated with the string equivalent of whatever it is that it comes across as an Error Token?
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2124
    • View Profile
Re: File Read Function(s)
« Reply #11 on: March 15, 2019, 07:01:01 pm »

Raxx: Check out build 1357 which has new tokens for QUESTION_TOKEN and ATSIGN_TOKEN.
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: File Read Function(s)
« Reply #12 on: March 15, 2019, 08:47:30 pm »

Works as expected. Thanks!
Logged