SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-23-2010, 04:46 AM
ElvisLorin ElvisLorin is offline
Sage User
 
Join Date: May 2010
Posts: 19
Using listener to execute Command line program

Hi,

I have been having a play wit studio, with a viw to linking it in with my Home Automation system and Girder better.

I think the listeners are ideal for me. I am trying to execute a small commandline program, but it is not working. Could someone just steer me in the right direction please.

I have been trying to use Execute Process. I have the following as it's parameters

p = ExecuteProcess("cmd", "C:\\Program Files\\Promixis\\Girder\\event.exe" + " hello", null, true)

Which does not work.

I have also tried

p = ExecuteProcess("cmd", "C:\Program Files\Promixis\Girder\event.exe hello", null, true)

and

p = ExecuteProcess("C:\Program Files\Promixis\Girder\event.exe", " hello", null, true)

So the question is... What am I doing wrong.

I have had a look in the tracer, and it is seeing the listener event.

I have set it up so I have the listener ---> Action.

Thanks in advance.
______________________________________________________
complete strut assembly
shocks and struts
Shock absorber

Last edited by ElvisLorin; 06-25-2010 at 04:20 AM.
Reply With Quote
  #2  
Old 06-23-2010, 10:04 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
From the ExecuteProcess documentation:

Quote:
Arguments - the arguments to pass to the command that is executed, if it's a java.util.Collection or array then each element is an argument, otherwise it is considered a single argument; use null for no arguments
So you should not be concatenating arguments together into a single string. Pass them as separate array elements instead (using CreateArray, for instance).

Also, you don't need to call cmd to execute an .exe file. You can call event.exe directly. You'd need cmd only for executing batch files or other shell functions.
__________________
-- Greg
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Execute another program from within SageTV d2tw4all SageTV Customizations 1 01-10-2010 12:04 PM
How to execute external program on the server? MeInMaui SageTV Studio 3 06-28-2008 09:08 PM
execute a command when Sage finished recording? dbdan SageTV Software 2 02-26-2006 10:03 PM
Using listener to execute Command line program danward79 SageTV Studio 4 11-05-2005 01:56 PM


All times are GMT -6. The time now is 06:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.