Script Interaction

Metraxis

Member
I'm looking at segmenting one of my larger scripts a bit, in order to fake inheritance, among other things (like implementing a slightly server-frendlier auto-restore), so I've been source diving, and have come up with a few questions.

Question 1: Is call documented anywhere, or is it intended only for use with undocumented features?

Question 2: Is responseText always complete?
 

Nightmist

Member
[quote author=Metraxis link=topic=681.msg3180#msg3180 date=1167894026]
I'm looking at segmenting one of my larger scripts a bit, in order to fake inheritance, among other things (like implementing a slightly server-frendlier auto-restore), so I've been source diving, and have come up with a few questions.

Question 1: Is call documented anywhere, or is it intended only for use with undocumented features?

Question 2: Is responseText always complete?
[/quote]
Q1: Err documented in the official scripting manual? (http://kolmafia.sourceforge.net/scripting.html#scripts, assuming you ment call <filename>)
Q2: Not sure what your asking here >>.
 

Metraxis

Member
1:Ah. Don't know how I missed that page.

2: I meant, does it contain the whole page, or just the HEAD section?
 
as for the call function, it is useful, but I have found import more useful. import allows shared function calls across scripts, and variable access

2> if you are referring to responseText returned by visit_url, it returns the entire html page.
 

Metraxis

Member
[quote author=efilnikufecin link=topic=681.msg3198#msg3198 date=1168143298]
as for the call function, it is useful, but I have found import more useful. import allows shared function calls across scripts, and variable access
[/quote]

This is true, but function names need to be specified in full at compile-time. With call, you can munge together a filename/functionname from pieces of text. It may be that the value I place on this is a holdover from switchless MOO programming habits I picked up in the days of yore.
 
Top