Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

External Access to LSL scripts and SL

Valradica Vanek
Registered User
Join date: 1 Aug 2006
Posts: 78
08-07-2006 06:04
I am toying with a voice activation program for controlling Second Life. I have the working program in VB6, but need a clean way to access scripts from outside Second Life, such as an API or even being able to pass simple strings and variables into the Second Life from the outside. Can this be done? A typical example would be to simply speak words (instead of having to type them in) and when the phrase is recognized, automatically send it to chat, or to be able to name gestures and have them work - Any Clues? I found nothing in the LSL description or any of the forums so far.
Norman Desmoulins
Grand Poohba
Join date: 10 Nov 2005
Posts: 194
08-07-2006 06:25
Could be done easily with libsecondlife and the proxy.

https://gna.org/projects/libsecondlife/
Dargo Fetid
Registered User
Join date: 12 Nov 2005
Posts: 3
Why would you need an external program to script?
08-26-2006 13:46
I'm Not sure why you dont want to be in world while you work? But if you have a freinds list like mine I could understand about constant interuptions by your freinds IMing you, or other people greifing you. If that is the case. I would sugest using an alt to do your scripting, this alt should have no freinds lol and get yourself a self rezing workshop that will rez high in the sky and then you hide in there to do your scripting. The best place to test a script would be "in-world" under all the normal conditions. Even with using an alternate grid, you cant completely reproduce all the bugs that may appear, if that was possible then all new releases of the SL client would be bug proof :)
If you have this on your own land you can eliminate greifers by just putting yourself on the access list of the land and that will exclude all potential greifers. If it is in a sandbox like "sandbox island" we all have to deal with those people, just make sure you fill out a good and complete report on them. But in my opinion the best place to script is "inworld" under normal conditions.
Plus I always make a backup text version of changes in a script on my computer before saving inworld, just incase I get a save error, and loose all the scripting I had done.
Hope I have been of some help :)
Metaforest Cheetah
Registered User
Join date: 18 Aug 2006
Posts: 82
08-26-2006 14:36
From: Dargo Fetid
I'm Not sure why you dont want to be in world while you work? But if you have a freinds list like mine I could understand about constant interuptions by your freinds IMing you, or other people greifing you. If that is the case. I would sugest using an alt to do your scripting, this alt should have no freinds lol and get yourself a self rezing workshop that will rez high in the sky and then you hide in there to do your scripting. The best place to test a script would be "in-world" under all the normal conditions. Even with using an alternate grid, you cant completely reproduce all the bugs that may appear, if that was possible then all new releases of the SL client would be bug proof :)
If you have this on your own land you can eliminate greifers by just putting yourself on the access list of the land and that will exclude all potential greifers. If it is in a sandbox like "sandbox island" we all have to deal with those people, just make sure you fill out a good and complete report on them. But in my opinion the best place to script is "inworld" under normal conditions.
Plus I always make a backup text version of changes in a script on my computer before saving inworld, just incase I get a save error, and loose all the scripting I had done.
Hope I have been of some help :)



Did you read the OP?!

=B-)
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
08-26-2006 15:37
From: Valradica Vanek
I am toying with a voice activation program for controlling Second Life. I have the working program in VB6, but need a clean way to access scripts from outside Second Life, such as an API or even being able to pass simple strings and variables into the Second Life from the outside. Can this be done? A typical example would be to simply speak words (instead of having to type them in) and when the phrase is recognized, automatically send it to chat, or to be able to name gestures and have them work - Any Clues? I found nothing in the LSL description or any of the forums so far.
I have suggested that LL provide a mechanism to bind a local port (for example 127.0.0.1:1700 through 127.0.0.1:1800) to a chat channel, so that a program on the local machine could write strings to (say) 127.0.0.1:1700 and have them come out on whatever channel the script specified, as if you had said them, and have messages on the channel be written back to the program over the port.

For example:

CODE

state_entry()
{
llBindSocket(123456,2); // Bind channel 123456 to socket 2 (port 1702).
}

Then you could use this POSIX C program to write "Hello Second Life" on channel 123456:
CODE

main()
{
char *message="Hello Second Life\n";
integer sock = socket(AF_INET,SOCK_STREAM,0);
struct sockaddr_in addr;
fill_sockaddr_in(&addr,inet_addr("127.0.0.1"),htons(1702));
if(sock < 0 || connect(sock,&addr,sizeof addr) < 0)
{
perror("connect socket");
exit(1);
}
write(sock,message,strlen(message));
close(sock);
exit(0);
}