POV-Ray : Newsgroups : povray.windows : Start POV-Ray from another program Server Time
23 Nov 2024 12:57:58 EST (-0500)
  Start POV-Ray from another program (Message 1 to 2 of 2)  
From: weedogt
Subject: Start POV-Ray from another program
Date: 14 Jul 2006 11:25:00
Message: <web.44b7b6f1d171ba5e883efa7e0@news.povray.org>
I'm trying start Pov-Ray (3.6) from my own windows program. It work nice
using a command line like this:

pvengine cylinder1.pov -d /exit

The POV-Ray windows application starts, the rendering runs and the
application closes.

My question: Can I also hide the POV-Ray windows application during
rendering somehow? I just would like to render my file in the background.


Post a reply to this message

From: tysonflint
Subject: Re: Start POV-Ray from another program
Date: 18 Jul 2007 14:40:01
Message: <web.469e541a595e3e41234a56910@news.povray.org>
You might try the following, I haven't tried this, but I think it should
work for you.
1. Open notepad
2. Past the following line (it is only one line, but may appear as two on
the forum, so hit delete to get rid of the extra carriage-return-line-feed
so it's all on one line):
CreateObject("Wscript.Shell").Run "c:/path-to-povray/pvengine
c:/path-to-code/cylinder1.pov -d /exit", 0, False
3. Change the forward slashes in the folder names to backslashes, as I can't
post backslashes on this forum. Don't change the forward slash before /exit
to a backslash.
3. Save as: "run-pov-silently.vbs".
4. Double click to execute.
You'll need to change c:/path-to-povray/ to where pvengine lives and also
change c:/path-to-code/ to where cylinder1.pov lives.

If the above doesn't work, you might also try running your script as a
service.
There's a little tool that Microsoft makes to do this called SrvAny and
InstSrv, which are included in the "Windows Server 2003 Resource Kit Tools"
and are a free download from:
http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

To use the tool you might want to check out these sites:
http://www.iopus.com/guides/srvany.htm
http://www.tacktech.com/display.cfm?ttid=197

Once you have it as a service, you should be able to create a batch file or
shortcut that has this as the command line:
net start POV-Service
(where POV-Service is the name of service that you created).
You could also have one to stop it:
net stop POV-Service

You might want to check out the "RunProcess" tool if your interested in
limiting the runtime of the service:
http://www.jsifaq.com/SF/Tips/Tip.aspx?id=7127

Hope this helps!

tysonflint


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.