Alice Community

Alice Community (
-   How do I...? (
-   -   writing script to link outside Alice program (

Slane 01-19-2015 04:54 PM

writing script to link outside Alice program
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 04:01 PM

Might get Complicated
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.

[U]To do so you must[/U]:

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...

All times are GMT -5. The time now is 06:04 AM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.