I have looked around on the website and have not found anything.
Some simple examples to get us started would be great
Where can I find a scripting example?
Re: Where can I find a scripting example?
Hi,
Large parts of radium itself is scripted, so you can look in the bin/scheme directory for examples. In bin/menus.conf and bin/keybindings.conf you can search for functions that are executed through "evalScheme".
In the manual, you'll find instructions how to bind scripts to keys: http://users.notam02.no/~kjetism/radium ... ramed.html
List of available functions: https://raw.githubusercontent.com/kmath ... rotos.conf
Large parts of radium itself is scripted, so you can look in the bin/scheme directory for examples. In bin/menus.conf and bin/keybindings.conf you can search for functions that are executed through "evalScheme".
In the manual, you'll find instructions how to bind scripts to keys: http://users.notam02.no/~kjetism/radium ... ramed.html
List of available functions: https://raw.githubusercontent.com/kmath ... rotos.conf
Re: Where can I find a scripting example?
There's also a few discussion about scripting in the github issue tracker:
https://github.com/kmatheussen/radium/i ... evalScheme
https://github.com/kmatheussen/radium/i ... evalScheme
-
- Posts: 34
- Joined: 06 Jan 2018 23:03
Re: Where can I find a scripting example?
Thank you.
-
- Posts: 34
- Joined: 06 Jan 2018 23:03
Re: Where can I find a scripting example?
I am finally getting around to reviewing the links from your previous replies.
My initial thoughts about Radium "scripting" would be the ability to control Radium externally, which does not seem to be the case (please correct me if I'm wrong.)
Is it correct to say that the only way to control Radium externally is to issue the supported keybindings, from some other program like AutoHotKey/AutoIt, OR is there another way to call the ra.functions from a script/command line external from the program itself?
Thanks again for your time.
My initial thoughts about Radium "scripting" would be the ability to control Radium externally, which does not seem to be the case (please correct me if I'm wrong.)
Is it correct to say that the only way to control Radium externally is to issue the supported keybindings, from some other program like AutoHotKey/AutoIt, OR is there another way to call the ra.functions from a script/command line external from the program itself?
Thanks again for your time.
Re: Where can I find a scripting example?
Radium opens a public port you can send scheme code to (first instance uses 5080, if 5080 was not open, use 5081, and so forth). See Help -> About -> Control Port.
You can start a browser-based repl by opening bin/s7webserver/s7webserver_repl.html in a browser.
You can start repl in a terminal by running the bin/scheme/reply.py script.
To start playing from the command line, run this command:
You can start a browser-based repl by opening bin/s7webserver/s7webserver_repl.html in a browser.
You can start repl in a terminal by running the bin/scheme/reply.py script.
To start playing from the command line, run this command:
Code: Select all
curl -i -X POST -H "Content-Type: text/plain" -d '(ra:play-song-from-start)' http://localhost:5080
-
- Posts: 34
- Joined: 06 Jan 2018 23:03
Re: Where can I find a scripting example?
WOW.
Very cool powerful remote functionality baked-in!
FYI, sInce I am on Windows:
1. I needed CURL- Windows binaries can be downloaded from:
https://curl.haxx.se/windows/
2. The command-line example supplied needed a syntax modification to work from the Windows cmd prompt- the radium function call requires double-quotes (not single quotes), i.e.:
curl -i -X POST -H "Content-Type: text/plain" -d "(ra:play-song-from-start)" http://localhost:5080
Again, thanks for your time.
Lots more to learn and try out.
Very cool powerful remote functionality baked-in!
FYI, sInce I am on Windows:
1. I needed CURL- Windows binaries can be downloaded from:
https://curl.haxx.se/windows/
2. The command-line example supplied needed a syntax modification to work from the Windows cmd prompt- the radium function call requires double-quotes (not single quotes), i.e.:
curl -i -X POST -H "Content-Type: text/plain" -d "(ra:play-song-from-start)" http://localhost:5080
Again, thanks for your time.
Lots more to learn and try out.