PDA

View Full Version : writing script to link outside Alice program


Slane
01-19-2015, 03:54 PM
Does anyone know how to write script for Alice2.3 that will enable the user to click on an object and be taken to a URL link outside the program?
Somewhere like Google Docs?

Thank you.

MrMoke
01-20-2015, 03:01 PM
Pretty sure It can be done.

The Jython base for scripting for Alice2 can support that functionality, and it can be enhanced by using Java in your script.

To do so you must:

1) Activate Scripting in Preferences/Seldom used, then do some research on Alice Scripting, and play with it.

2) Do some Internet Research on Java calls that perform this functionality in a Java program.

3) Start a script and making sure to import the appropriate Java Libraries.

4) World variables actually are handled as Global, and can be used in both Alice blocks and Scripts. You can also pass them in as parameters when calling your methods.

5) Code the required Java calls in the Jython format used in Alice.

6) Test, TEst, TESt, TEST...