NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) GB-PVR Support (legacy) v
« Previous 1 … 710 711 712 713 714 … 1231 Next »
Batch file question

 
  • 0 Vote(s) - 0 Average
Batch file question
theredbaron
Offline

Member

Posts: 69
Threads: 16
Joined: Feb 2006
#21
2006-09-27, 02:56 AM
ok, it didn't work the way i wanted it to. i would have to make it wait like an hour + until the transcoding is finished, and that doesn't even take into account recordings that are saved while postprocessing is running.

how do i do this:
i want to tell it to check if a certain program is running, and if it is to do a certain action, and if it's not to do another action. (the sub-actions have conditions to them too - if/else). Can i give the sub-actions a name to be called to. feel free to link me to some place that has information on it.
madcat
Offline

Senior Member

Posts: 634
Threads: 104
Joined: Apr 2006
#22
2006-09-27, 03:53 AM
So, there are many ways. you could go with more "Advance" langugages as some (including yours truly) suggested here such as Windows Scripting, or AutoIt3.
However, even with normal "DOS" style batch files u can tell if exe is running. But to the best of my knowledge, you will need one external utility to help you. I recommend PsList (part of the PsTools freeware).
If you try it from the command line:
> pslist
will give u a list of applicaitons running.
> pslist kuku
will filter the list for "kuku". Now, there's something u need to knowabout batch files. There is something called ERRORLEVEL which is sort of the return value of the last operation. It is something you can check in if statement.
e.g.:
Code:
@echo off
set prog=notepad.exe

pslist %prog%
if ERRORLEVEL 1 goto not_found

rem ### program is running ###
rem do something...
goto end

:not_found
rem ### program is NOT running ###
rem do something else

:end
In this example we check for "notepad.exe".
Also note that we assume here that "pslist.exe" is in your path.
I guess you can figure the rest.
Enjoy.
* Rogers Analog Cable [Canada]
* Hauppauge WintTV PVR USB2
* IBM Thinkpad T42 / 1GB Mem / Centrino 1.6Ghz / 60GB HD / ATI Mobility Radeon 7500 + VGA/DVI out
* MCE Remote + Keyboard
* Win XP SP2 / GBPVR [Latest version. always]
* Pioneer HDTV via VGA (1360x768)
* MS Remote Keyboard
* Logitech Harmony 880 [via MS Remote Control Reciever]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): « Previous 1 2 3


Possibly Related Threads…
Thread Author Replies Views Last Post
  file types of recorded TV paul1 3 3,647 2012-09-30, 05:20 PM
Last Post: sub
  GBPVR Database question - Recording Schedule David B 1 1,613 2010-11-08, 09:21 PM
Last Post: sub
  Descriptive Audio Service Question mikeh49 3 3,111 2010-10-21, 10:49 PM
Last Post: sub
  No Data In the Recorded File zb1 5 2,196 2010-08-24, 01:08 AM
Last Post: zb1
  Italian channels post and a question about compatibility with Seven 64 bit pinopallino 2 1,636 2010-08-18, 09:14 AM
Last Post: pinopallino
  Path to file being recorded. brianj 5 2,245 2010-08-08, 10:58 PM
Last Post: brianj
  error: failure playing back file yonu 4 2,005 2010-07-12, 12:52 AM
Last Post: yonu
  UK Freesat Scan.cache File jeffers 3 2,018 2010-05-25, 10:34 PM
Last Post: jeffers
  Newbie Question rthefish 4 2,081 2010-05-25, 08:06 PM
Last Post: pBS
  3 AC3Filter instances when playing back a still recording TS file? jksmurf 3 1,879 2010-05-17, 12:30 AM
Last Post: jksmurf

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode