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 03-08-2009, 01:41 AM
peternm22 peternm22 is offline
Sage Expert
 
Join Date: Jan 2005
Posts: 709
ExecuteProcess - Where am I going wrong?

Hey everyone,

I run VideoRedo's quick stream fix on any unplayable R5000 recordings. Having to manually go to the computer to run it gets annoying, so I'm trying to make a button which will run it from SageTV. I've been using a batch file that was posted a while back on the forum for running the quick stream fix.

I can't seem to get it to run from SageTV though. I have the following in an action widget beneath a button:

Quote:
ExecuteProcess("C:/QFIXSAGE/qfixsage.bat", GetFileForSegment(GetMediaFileForAiring(Airing), 0), "C:/QFIXSAGE/", true)
The batch file never seems to launch (I verified this in the task manager), and VideoRedo never launches either.

Any idea what I'm doing wrong?

Thanks.
Reply With Quote
  #2  
Old 03-08-2009, 01:44 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
it may be that you need to switch from using unix style forward-slashes to windows backslashes...
ie, C:\QFIXSAGE\qfixsage.bat instead of C:/QFIXSAGE/qfixsage.bat
Reply With Quote
  #3  
Old 03-08-2009, 01:51 AM
peternm22 peternm22 is offline
Sage Expert
 
Join Date: Jan 2005
Posts: 709
Thanks stuckless.

I tried that and it made no difference. I can get programs like notepad.exe to run, but I can't seem to get this batch file to run at all.

Any other thoughts?
Reply With Quote
  #4  
Old 03-08-2009, 02:36 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Works for me with various batch files. Note that if the last argument is true you won't see a console window pop up on screen.

Since you can launch Notepad, it seems like the next logical step would be to create a batch file that calls Notepad (or does any other trivial task) and see if you can get ExecuteProcess to launch that successfully.

You might also (if you haven't already) try running the problematic batch file from a command prompt to make sure it works that way.

When in doubt, break the test case down into smaller pieces and test each piece separately to isolate the problem.
__________________
-- Greg
Reply With Quote
  #5  
Old 03-08-2009, 03:30 AM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
How about
ExecuteProcess("C\:\\QFIXSAGE\\qfixsage.bat", GetFileForSegment(GetMediaFileForAiring(Airing), 0), "C\:\\QFIXSAGE", true)

John
Reply With Quote
  #6  
Old 03-08-2009, 06:37 AM
davephan's Avatar
davephan davephan is offline
Sage Icon
 
Join Date: Mar 2004
Location: Minnesota
Posts: 1,911
What is the command line to run quickfix as a stand alone batch file?

After manually testing the stand alone batch file, it should be easy to have the utility "DirMon2" monitor your recording directories, then kick off the batch file for each recording as it finishes, just like "DirMon2" can automatically run Comskip or ShowAnalyzer on each recording after the files stop growing in size, outside of SageTV.

Dave
Reply With Quote
  #7  
Old 03-30-2009, 06:49 PM
lazysean lazysean is offline
Sage User
 
Join Date: Aug 2008
Posts: 48
Your call to ExecuteProcess looks correct, although like others have pointed out I've had to use double backslashes in the path to get Sage to parse it correctly, ie:

ExecuteProcess("C:\\QFIXSAGE\\qfixsage.bat", GetFileForSegment(GetMediaFileForAiring(Airing), 0), "C:\\QFIXSAGE\\", true)

But if Notepad is opening correctly that doesn't seem to be your problem. My guess is that there is a problem in your code before it gets to that point - for instance an invalid Airing handle - something that would make the call to GetFileForSegment return NULL or garbage. In that scenario your batch file would probably launch, but maybe quit immediately when it thinks there's nothing to process and you're not able to catch it happening in task manager. You could verify that better in something like procmon, or by maybe altering the batch file to print out what args were passed to it and then pausing...




Huh. I just noticed this question is a few weeks old. Not sure anyone cares anymore, but what the heck.

Last edited by lazysean; 03-30-2009 at 06:51 PM. Reason: I'm unobservant.
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
ExecuteProcess forcing called app to "unhide" kricker SageTV Studio 1 07-24-2008 12:24 PM
SageTV picking the wrong source or and tranmist to the wrong STB TechBill SageTV Software 34 09-28-2007 06:19 AM
executeprocess arguments evilpenguin SageTV Studio 4 04-27-2006 08:41 AM
Something is wrong... Please help!! tangfj SageTV Beta Test Software 4 04-22-2004 11:06 PM


All times are GMT -6. The time now is 09:48 AM.


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