Texas Instruments TI-Nspire CX CAS TINSPIRE-CX-CAS Merkblatt

Produktcode
TINSPIRE-CX-CAS
Seite von 603
554 Using the Script Editor
house,C:\images\house.jpg
5.
Click Open.
6.
Right-click an image name to Rename, Copy Name, Preview, or Remove
the image. You may also click the
button to remove an image.
Create a Script to Call Up an Image
1.
Type a script in the script line box as follows:
myimage = image.new(_R.IMG.img_1)
function on.paint (gc)
gc:drawimage (myimage, 30, 30)
end
Note:
Replace img_1 (above) with the name of your image.
2.
Click
Set Script
to save the script. You will see your image in the Document
Preview screen.
3.
Click
Focus Script
to set the focus to the page in the document where you
want to attach the script application.
Note:
A TI-Nspire document sets the focus to the page; A PublishView™
document sets the focus to the frame on the page.
Create a Script to Call Up Multiple Images
1.
Type a script in the script line box as follows:
myimg = { }
for name, data in pairs (_R.IMG)
myimg [name] = image.new(data)
end
function on.paint (gc)
gc:drawImage (myimg[imagename], 30, 30)
end
2.
Click
Set Script
to save the script. You will see your image in the Document
Preview screen.