Note! This information is updated from time to time.
How to turn on build in script interpreter
You must enable script mode :
Make 'AUTORUN.xxx' file (xxx same as in MODSET file) with script inside.
END, EXIT, PAUSE, WAIT,
GOTO, IFGOTO, ALLCLR, CLS,
PRINT, LANGUAGE, COLOR, $ % ( for values )
GOSUB, IFGOSUB , RETURN, IF, ELSE,
WHILE, INTERVAL, CYCLE, FILEOUT, FSEARCH,
Looks like quite functional script language
You could try "hello world" first.
AUTORUN.xxx hello world example
PRINT "Hello World";
AUTORUN.xxx second example
%A = 1000
WHILE %A < 1004
PRINT "Hex value %x" %A
%A += 1
%B = 50
PRINT "B=%d" %B
As you can see, it uses integer variables, loop and printing of values.
AUTORUN.xxx works on every camera start, and in case of synax error it hangs sometimes.
Extra info, you could use FILEOUT "STRING" to write STRING to CHKDAT.xxx file. String will be appended to end of file.
WAIT without parameters causes syntax error.
With any parameter it wait indefinetely. Parameter may be TaskID.
You could also note that interpreter runs in his own thread, at least AF and metering works perfectly.
(c) 2009 Pentax Hacking Community