What's the Best Way to Handle Scripting Under XP?
ChrisZermatt asks: "I've got to build a custom workflow for a customer that has a photography business. His photographers take hundreds of thousands of photos a year, and since he's recently moved entirely to digital, he wants to automate a lot of his current processes. Ideally I'd be able to plonk a recent Mac running Tiger into his shop, and use a combination of AppleScript, iView
Pro, Photoshop and an FTP program to handle all his needs. Sadly, he insists on using *cheap* PC's running Windows, so a Mac isn't an option for this project. So, what should I use on the Windows side of things to build a custom workflow?"
"iView lets you control the program using VBS or Javascript, but they don't really offer much in the way of advice on building a Windows workflow. I need to be able to copy/move a ton of files around and link the above mentioned programs. I'd really rather *not* spend money on something like VisualBasic. What are the alternatives for scripting on Windows?"
put linux on it.
Or jsut make "Batch" files.
/* oops I accidentally made a comment, sorry */
(replying to myself)
Actually, on second thought, since he's paying YOU, maybe you should just keep quiet.
I'm sure there are some horrendously complex ways to do what you want with XP which should generate loads of billable hours for you.
Beauty is in the eye of the beerholder.
Dont forget PHP! PHP-cli is actually quite awesome for windows stuff, and if you can handle glade, you can even make some rapid efficient graphical apps. My only tip would be to avoid vbs like the plague.
If it was me, I'd do it all in Python. It even has FTP libs built in. Plus, when you're ready to dump the Windows boxes you can run the same Python scripts or Linux or a Mac.
As someone else said, use AutoIt. AutoIt is by far the best open source software for automating Windows installs and other tasks in which the program pretends to be a user. There's an IDE with an Intellisense-like interface and a compiler. Be sure you get AutoIt with the SciTE IDE, the site is a little confusing.
AutoHotkey came from the same source as AutoIt, is also open source, and is also impressive.
--
If your gov't chose killing as policy (CIA trained Arabs in 1980), expect others to choose the same.
Don't underestimate the power of Photoshop's scripting. I also do some work for a photographer and between actions and photoshop scripts, just about everything except some of the actual art is automated.
Username taken, please choose another one.
If you want to appease the /. crowd you should install a bunch of open source tools. If your not a zealot, you should just use Windows Scripting Host which is already installed on an XP machine. Here is a three step example to get you started.
1. Open up notepad
2. Create a file with a vbs extension like "test.vbs".
3. Save the following text:
MsgBox "test"
Now just click on the file in Windows Explorer. There are whole websites to using VBScript.
I don't care about Mod points or I would of just said use some open source tool. I use open source tools all the time when it is the right tool for the job.
Well, half circle, I guess.
Here's a parable (story) I once heard, which seems rather fitting. It's about offering to give the customer what they want, but making it clear what it will cost when they want something that's not to their benefit.
A consultant was writing a custom application for a company. The program was written to work on a PC. One of the executives at the company used a Mac, so he insisted that they make the program work on his Mac. The consultant says "sure, we can do that". The consulant comes back with an estimate on the cost of making the program work on the Mac: $50,000 and 6 months. The executive decided to use a PC.
So my advice to you is this: provide the guy with 2 estimates -- one for your Mac solution, and one for a solution using the limited tools he's forcing you to use. Don't forget to factor in the Mac hardware costs, your research time, the extra time it will take to work with tools you are not familiar with, and perhaps a premium for working with tools you don't like. Maybe the difference will change his mind; maybe it will change yours.
Software sucks. Open Source sucks less.
Microsoft naturally comes out on top when you google for Windows scripting. But that doesn't mean that MS scripting technology is the best choice. On the contrary, Microsoft scripting relies heavily on their usual kludgey, baroque libraries and runtimes. I'm no expert, but if I were looking to do this sort of thing, I'd at least look at other scripting solutions for Windows. ActiveState is the obvious first place to look. There are many others.
Don't forget Tcl and Tk, either. Tcl is quite a capable language, once you get some extensions loaded (and it's nice and small too, because it doesn't make them built-ins). On Windows, ActiveTcl is a sensible proposal.
As far as GUI's, Tk is still one of the best cross-platform things going out there. Especially when using the new Tile system.
http://www.welton.it/davidw/
How "custom" are the requirements for this software? Keeping track of thousands and thousands of photos isn't a new problem, and there are heaps of programs around that do just that (eg IMatch, ACDSee, Fotostation, Portfolio). I'd be very surprised if this didn't work out more cost effectively than a custom solution.