|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
|
_________________ Asati di tempari! |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Oct 05, 2007 4:07 am |
Nope, can't be done. The TINTIN-like script syntax doesn't work. You can use Ctrl+' to change the language on the command line, but that's it. Allowing for multiple languages was one of the aims of the new XML format.
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Oct 05, 2007 6:01 am |
You can also execute a Lua script from within zScript using the #LUA command. But this won't return a value. But Fang is correct...there isn't going to be any way to do this on the command line...too many arguments already. You'll need to use the GUI.
|
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Fri Oct 05, 2007 2:01 pm |
No worries, I was actually just following up on a question that was asked to me. I do most of my coding the package editor.
|
|
_________________ Asati di tempari! |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Fri Oct 05, 2007 6:10 pm |
Didn't you just recreate the #FUNCTION command though? I'm assuming the only use for specifying the language would be with the new functions that have the new returns.
Since it's a new command you could change it so that it's first argument is required and equates to a valid scripting language.
Though I can see why there isn't much point as we're trying to encourage sharing of code through the package library and xml. |
|
_________________ Taz :) |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Oct 05, 2007 6:33 pm |
No, you can have different scripting languages for any script: Function, Alias, Trigger, Event, etc. So it's not just the #FUNCTION command. I'm not adding any more obscure command line arguments because I'm trying to encourage people to use the GUI.
Also, if you set the Default Language in the Preferences, then any new script will be created in that language. In theory you could use %pref("DefLanguage","Lua") to change the default to Lua within a script, then change it back to zScript. |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Fri Oct 05, 2007 8:12 pm |
Zugg wrote: |
No, you can have different scripting languages for any script: Function, Alias, Trigger, Event, etc. So it's not just the #FUNCTION command. |
True though I should have made it clear I was comparing #FUNCTION with #VARFUNC where there is no language to be specified.
In any case it was really a throw away comment with my mention of the package library and xml which you further clarified by mentioning the GUI. |
|
_________________ Taz :) |
|
|
|
|
|