LOGIN  |  REGISTER
Smart Living Made Brilliant!
CASTLEOS FORUM

HomeScripting

A forum for information about scripting with CastleOS. Get samples, suggestions, and other help here

Remote Application Launcher Messages in this topic - RSS

Nick Bento
Nick Bento
Posts: 221


1/30/2015
Nick Bento
Nick Bento
Posts: 221
Hey All,
I wrote a pair of programs that will get around the issue, and are actually pretty neat/useful in general!
It consists of a Server (RemoteAppLaunchServer.exe inside the RemoteAppLaunchServer folder) and a client (RemoteAppLaunchClient.exe). You place the RemoteAppLaunchServer folder (which includes the executable as well as assistance files it needs to run) on whatever machine you want to have applications launch on and execute the exe. This will launch an application that shows up in your system tray. If you click the little icon (it looks like a computer), it has a Console you can look at to make sure things are working. Then, on whatever machine you want to be able to launch voice commands to launch apps with (machine with Kinect), you place the client program on it (I would put it in the scripts folder for simplicity). Then in your custom script, you just use Process.Start to call the client app and pass it the ip address of the machine running the server, along with the name of the program you want to launch and any arguments you want to pass it. For example, I can put the following in my script to launch internet explorer and have it navigate to google.com:
Process.Start(@".\RemoteAppLaunchClient.exe", "192.168.0.130 iexplore.exe www.google.com");

The neat thing about this is that I could launch apps on devices that aren't even running the CastleOS Kinect Service (for instance, I could have it launch internet explorer on my windows 8.1 tablet and have it navigate to the CastleOS Portal for my system by saying "Jarvis, Bring up the control interface")

Also of note, if you wanted the server program to automatically run when the system starts, it would have to be added to the startup programs for the user that logs into the system, it can't be used as a service (otherwise we'd just be right back to our original problem haha!)

Try them out and let me know if it helps, thanks!


UPDATE: I added new features! Now if you send the command [MONOFF] it will turn off the monitors of the system running the server, and if you send [LOCKSYS] it will lock the computer the server is running on!
Example: RemoteAppLaunchClient.exe 192.168.0.130 [LOCKSYS]
RemoteAppLaunchClient.exe 192.168.0.130 [MONOFF]


I also added some more robust error handling/recovery and resource management, so the program should be even more stable now than it already was.
Be sure to grab this new version, attached below!
edited by nikku on 1/31/2015
edited by nikku on 1/31/2015
edited by nikku on 1/31/2015

--
-Nick B.


+1 link
mario rodriguez
mario rodriguez
Posts: 21


1/31/2015
mario rodriguez
mario rodriguez
Posts: 21
thank you Nick!!! all this time I have been trying to open a program using castleOS.. with no success until now! thank you so much!. smile
+2 link
mario rodriguez
mario rodriguez
Posts: 21


1/31/2015
mario rodriguez
mario rodriguez
Posts: 21
now I can say computer play music and it opens the program "elpis" to play Pandora.
+2 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


1/30/2015
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
Thanks Nick! This is an awesome app and will be very helpful to the community. You've gone above and beyond! I've pinned this thread...
+1 link