I've written a basic help function that reads the first few thousand characters from my script (which is basic readme information) and pops them up in an alert box on screen.
Now, this works fine if I just call the function within the script, but as soon as I assign it to a button handler, the alert dialog pops up empty.
Code: Select all
function help(){
var f=new File('Kronos Utility 1.0.jsx')
f.open('r')
f.seek(243)
var str=f.read(2127)
f.close()
alert(str)
}
Code: Select all
dlg.btnHelp.onClick=help
Dave