PDA

View Full Version : VBScript useful for DVD utilities?


Dr.Khron
24th July 2007, 18:28
I'm a financial analyst by trade, so I do a lot of VBA programming, mostly Excel and Access.

I wanted to do some Outlook code to help manage a group email box, but our local security policies keep the Outlook Macro security set to high, permanently. This effectively prevents me from developing or running macros for Outlook. The local IT guy said that he couldn't grant an exception to the security policy, but he suggested that I could accomplish what I wanted with VBScript.

So I ordered a book on VBScript and the WSH from Amazon. It came yesterday, and I read the frist chapter. It left me wondering about the general utility of VBScript, and what I can or can't do with it.

Could I potentially automate some DVD ripping utilities with VBScript? For a first project, I was thinking of making an autoripper for TV episode DVDs (it would automate DVD Decrypter, sort of like what RipItForMe does).

Since I debating wether to spend my free time learning VBScript, any opinions/experience/feedback you have on the topic is welcomed.

nullstuff
24th July 2007, 21:45
...it should be possible, for example using SendKeys (http://msdn2.microsoft.com/en-us/library/8c6yea83.aspx) to "control" not-available-in-command-line DVDD's options (http://forum.videohelp.com/topic279499.html#1373527) (like PSL loading).

-- nullstuff

foxyshadis
25th July 2007, 17:03
If you don't know either, it'd probably be better to learn JScript, if only because its control structures are a little saner and simpler to use than vbscript's more complex ones. But if you know VBA, you already have a good handle on VBScript. (Since the whole scripting host library is pretty lousy, something you could also look into is using .net in wsh; it's as simple as CreateObject("DotNet.Namespace") and calling the methods for that object.)

You could also ask your admin to set up a "testing" account with no access to important local and network resources, that can only be used to develop macros, if security is his concern. (If it's about simply not knowing how to grant an exception, it's very simple with GPMC, by creating a macro testing policy and applying it only to the macro testing user/group.)

Dr.Khron
25th July 2007, 19:50
Thanks for the input, guys...

"SENDKEYS"? Thats how RipItForMe handles PSL loading?
Gee, I figured that there would be some sort of slicker option available... I mean hell, I can use SHELL and SENDKEYS from an Excel Macro!

Makes sense, tho... whatever you can't do from a command line, you need to do through the interface.

As for the security policies.... I like your solution, but its a fools errand at this place. International company with many locations, this location has 3,000 employees... there are local IT security policies, companywide policies, Server security, mainframe security, unix security, DB security.... becuase things are chopped so fine, there is little that any one person can do to buck the system (which is by design, we handle a LOT of sensitive personal data).

This is why the local guy told me it would be easier to just learn VBScript instead... Although why the VBScript security policies are different from the VBA security policies, I'll never know.
:confused:

stax76
26th July 2007, 01:36
Some consider WSH (http://en.wikipedia.org/wiki/WSH) as legacy technology, just like classic VB/VBA. The successor is obviously .NET, and yes, it's 100 times more powerful. It lacks scripting as this is dynamically typed and .NET is statically typed but dynamic JScript (http://en.wikipedia.org/wiki/JScript#Managed_JScript) and VB versions for .NET can be expected in .NET 4.0 or with the first Silverlight (http://en.wikipedia.org/wiki/Silverlight)release for people who can't wait. Furthermore MS is working on Python (http://en.wikipedia.org/wiki/IronPython)and Ruby (http://en.wikipedia.org/wiki/Ironruby)for .NET so they'll offer 4 dynamic languages.

Since there isn't real .NET scripting yet, it was always very popular to emulate .NET scripting, I'm offering a effective solution (http://www.planetdvb.net/utilities/staxscript) myself.

something you could also look into is using .net in wsh; it's as simple as CreateObject("DotNet.Namespace") and calling the methods for that object.)

It works however only for types exposed to COM, static members can't be accessed.

Shinigami-Sama
26th July 2007, 06:11
what about powershell?

it writes like korn/bash and is OO in a sane way, very easy to learn and more powerfull than VB
talk to your Admin about it as well