Slashdot Mirror


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?"

167 comments

  1. well there's the obvious by nocomment · · Score: 2, Insightful

    put linux on it.

    Or jsut make "Batch" files.

    --
    /* oops I accidentally made a comment, sorry */
    /* http://allyourbasearebelongto.us */
    1. Re:well there's the obvious by nocomment · · Score: 1

      I hate replying to myself, but you can also use PERL.

      --
      /* oops I accidentally made a comment, sorry */
      /* http://allyourbasearebelongto.us */
    2. Re:well there's the obvious by itwerx · · Score: 2, Informative

      I hate replying to myself
      I hate replying to you too!
      [rimshot]

      (No offense intended, just couldn't resist the straight line! :)

      Back on topic - I would agree that Linux probably is the best answer. However, there are various freeware/shareware apps for image editing under Windows that are scriptable. E.g. our faithful friend Gimp

    3. Re:well there's the obvious by aminorex · · Score: 2, Insightful

      Yeah, but there's no cron, no nfs, no umpteen zillion scriptable utility programs from "a2p" to "zip". You could install cygwin, though.
      That's close enough to Unix so that it's useful for automation tasks.

      --
      -I like my women like I like my tea: green-
    4. Re:well there's the obvious by nocomment · · Score: 1

      so what jobs you have in the puget sound area? I'm in Federal Way.

      --
      /* oops I accidentally made a comment, sorry */
      /* http://allyourbasearebelongto.us */
    5. Re:well there's the obvious by nocomment · · Score: 1

      a2p, and of course winzip ;)

      I imagine it all very AWKward (pun intended) on windows though.

      --
      /* oops I accidentally made a comment, sorry */
      /* http://allyourbasearebelongto.us */
    6. Re:well there's the obvious by Southpaw018 · · Score: 2, Insightful

      I use a combination of Cygwin, Windows Task Scheduler, cmd shell, and batch files to get the job done. It ain't pretty, but it works and it works well.

      --
      ACs are modded -6. I don't read you, I don't mod you, I don't see you. Don't like it? Don't be a coward.
    7. Re:well there's the obvious by belroth · · Score: 1
      I use a combination of Cygwin, Windows Task Scheduler, cmd shell, and batch files to get the job done. It ain't pretty, but it works and it works well.
      If you have CygWin why not use cron - and why use cmd? Not an attack, I'm just curious.
      --
      I hereby inform you that I have NOT been required to provide any decryption keys.
    8. Re:well there's the obvious by orthogonal · · Score: 1

      "put linux on it."

      Well, put Cygwin on his MS-Windows box. Write bash scripts. Done right, your cuustomer will never even notice Cygwin, and you'll have access to everything you need to automate his workflow.

    9. Re:well there's the obvious by abradsn · · Score: 1

      I'm not sure we understand how this relates to the previous comment. Could you try to make your statement in a different way?

    10. Re:well there's the obvious by nocomment · · Score: 1

      it actually doesn't. it's offtopic. I was replying to his sig.

      --
      /* oops I accidentally made a comment, sorry */
      /* http://allyourbasearebelongto.us */
    11. Re:well there's the obvious by AuMatar · · Score: 1

      I'm sorry. Basic reading comprehension and computer skills are required for all his jobs. As you were unable to either read the final instruction or manage to follow it, you don't qualify.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    12. Re:well there's the obvious by Anonymous Coward · · Score: 0

      If you have CygWin...

      MayBe you ShouLd try LookIng up HowThe name is SpelLed BeFore WriTing it in CamelCase.

      RedHat -- sorry, I mean "Red Hat" -- are not that StuPid, and have in fact settled on the rather conventional capitalisation "Cygwin" for their product.

    13. Re:well there's the obvious by Procyon101 · · Score: 1

      Yea, but there is at, smb and a bunch of scriptable utility programs from attrib to compress ;)

      It's not as rich as UNIX, but it's capable. I just wrote a very large distributed cluster application in NT Shell, albeit painfully.

    14. Re:well there's the obvious by Anonymous Coward · · Score: 0

      Absolutely wonderful. You've received "insightful" moderation for your flamebait Linux zealousness. All this immediately after the huge Linux circlejerk thread that was http://linux.slashdot.org/article.pl?sid=05/07/21/ 1218247&tid=109&tid=187&tid=106.

      "USE LINUX LOL".
      Good one, chief.

    15. Re:well there's the obvious by Burz · · Score: 1

      And might I add that DCOP should prove quite useful in using scripts to excercise control over applications.

  2. Perl, etc. by snookerdoodle · · Score: 1

    Well, besides the obvious Perl, etc., it is entirely possible that you can accomplish what you wish using the Stupid Command Program (cmd.exe).

    I just loaded ImageMagick and sed on a peecee running W2K for my current gig and put a little .bat file in that converts a buncha tiffs to pdfs and sed's an import script to change the file extensions.

    If the script wants to do a lot of logic, then Perl, Python, and that ilk may be more to your liking.

    Mark

    1. Re:Perl, etc. by Miros · · Score: 2, Insightful

      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.

    2. Re:Perl, etc. by nocomment · · Score: 1

      I tried php-cli a couple years ago on windows and it blew goats. Has it gotten better? I also toyed with php-gtk on it but it kept crashing. I eventually lost interest in it and went back to using linux.

      --
      /* oops I accidentally made a comment, sorry */
      /* http://allyourbasearebelongto.us */
    3. Re:Perl, etc. by Miros · · Score: 1

      php-gtk is about as easy as writting anything using gtk. php-cli however has improved dramatically.

  3. What specifically are you trying to do? by RingDev · · Score: 0, Redundant

    Batch files come to mind. if all you are doing is moving files and automating the launch of different apps. If you need to macro out processes in the apps, there are macro tools out there for windows. -Rick

    --
    "Most people in the U.S. wouldn't know they live in a tyrannical state if it walked up and grabbed their junk." - MyFirs
  4. Batch files! by One+Div+Zero · · Score: 3, Informative

    I use batch files to operate a software level RAID solution! It's easy!

    RAID.bat
    xcopy c: d: /e /k /i /c

    1. Re:Batch files! by Miros · · Score: 1

      as easy as deltree c:? P.S. the file is open and cannot be copied

  5. Visual Basic for Applications (VBA) or Python by DamienMcKenna · · Score: 2, Informative

    VBA is the standard scripting language in Microsoft-land, or use Python with the Win32 stuff.

    Damien

    1. Re:Visual Basic for Applications (VBA) or Python by Anonymous Coward · · Score: 0

      That's all there needs to be said.

      I recommend the book Python Programming On Win32, which explains how to write COM-servers and -clients very extensively.

    2. Re:Visual Basic for Applications (VBA) or Python by Cocteaustin · · Score: 3, Informative

      VBA is actually not used to write scripts. It's used as an embedded automation/macro language in applications like Office and it is the language engine behind VB6. You can't write VBA code and have it run on the desktop by itself, that's why they call it "Visual Basic for Applications."

      The scripting engine on Windows is called Windows Script Host and it runs VBScript (different than VBA) and JavaScript (as well as other languages; it's pluggable) on the desktop.

      That said, if I had to do this, I'd probably use Python.

    3. Re:Visual Basic for Applications (VBA) or Python by stanmann · · Score: 1

      You forgot to mention that VBA for each environment is also different(sometimes radically) between environments and that VBA is RADICALLY different from VB6 which is signifigantly different from VB.NET.

      --
      Food not Bombs is a nice platitude but it breaks down when you notice that the Bombees are usually well fed
    4. Re:Visual Basic for Applications (VBA) or Python by Cocteaustin · · Score: 1

      VBA is not radically different than VB6, they're the exact same language. The programming experience is very different because the libraries you use are different (don't get me started on the godforsaken Office object model) but the languages are identical. VB6 is of course different than VB .NET but none of that is germane to the discussion.

    5. Re:Visual Basic for Applications (VBA) or Python by stanmann · · Score: 1

      Just for example, the definition of Global, Int, Long and form are different. Also different is interpretation of Me and Goto.

      --
      Food not Bombs is a nice platitude but it breaks down when you notice that the Bombees are usually well fed
    6. Re:Visual Basic for Applications (VBA) or Python by Cocteaustin · · Score: 1

      What are you talking about? Ints are 16 bit ints and Longs are 32 bit, not a lot of wiggle room there. That's been the case since VB4 circa 1995.

      Forms in MS Office and Forms in VB6 are different things. But the Office forms package isn't part of the VBA language, it's a part of Office. This also explains why "Me" is different (because "Me" always refers to the object you're in -- it's defined by its context).

  6. AutoIT by acaldwel · · Score: 4, Informative

    Take a look at http://www.autoitscript.com/autoit3/. It can automate windows GUIs and you can convert your scripts to .EXE files for easy of deployment.

    -Adam

    1. Re:AutoIT by BigWhiteGuy_27 · · Score: 0

      Mod parent up. For doing anything within the Windows GUI, AutoIt is the way to go. The ability to make the scripts into .EXEs is priceless. AutoIt combined with Perl should be able to handle just about anything a human could do.

    2. Re:AutoIT by LetterJ · · Score: 1

      AutoHotkey is an open source version of the same kind of thing.

    3. Re:AutoIT by L.+VeGas · · Score: 1

      I agree. AutoIt is a very convenient tool for all kinds of scripting. If you need to do automated image manipulation, you may consider using this along with Irfanview (freeware,not OSS) instead of ImageMagick. It has a much smaller footprint and requires no installation.

    4. Re:AutoIT by patro · · Score: 2, Informative

      Or AutHotkey. It's free (GPL) and very versatile.

    5. Re:AutoIT by SocialEngineer · · Score: 1

      Here is another vote for autoit. I have a few friends who make good use of it, and I've used it a bit myself. It is a very powerful way to script common functions (and even not-so-common functions).

      --
      "Better to be vulgar than non-existent" -Bev Henson
  7. Old saying by MarkGriz · · Score: 3, Informative

    . 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.

    Perhaps you could explain to him the meaning of being "Penny wise, Pound foolish"

    --
    Beauty is in the eye of the beerholder.
    1. Re:Old saying by MarkGriz · · Score: 2, Insightful

      (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.
    2. Re:Old saying by yasth · · Score: 1

      In all honesty vbs is the equal of or even better then applescript. So it is more a failure of the consultant (for not knowing or wanting to learn vbs) then the client.

      --
      I'd do something interesting, but my server can't handle a slashdotting.
    3. Re:Old saying by rat_herder · · Score: 1

      vbs is certainly more capable than applescript, but not "better" or cheaper as he requested...

      IMHO this is the kind of work OS X was built for.

      Automator with applescript is mind bogglingly simple to use. It's totally focused on the tasks needed to achieve awesomely powerfull workflows very quickly. A real pity the client is not with OS X...

    4. Re:Old saying by yasth · · Score: 1

      OS X was built to be an opperating system, if the guy had any cojones he'd be using actual imaging processing libraries and it would be faster, and likely run on lin/win/mac (And yeah that is might not work who knows, ask slashdots never really have enough detail)

      And vbs would most likely be cheaper. The hardware is most likely free to the user, VBS is utterly free. Really, the guy is an ass for speaking against his client in a public forum. It isn't that hard to do most things standing on your head. And most standard photoshop books are pretty good on automation

      --
      I'd do something interesting, but my server can't handle a slashdotting.
  8. Windows Script by neura · · Score: 4, Informative
    1. Re:Windows Script by NearlyHeadless · · Score: 1
      http://msdn.microsoft.com/scripting/
      This is a good suggestion. You can use JScript or VBScript, usually without installing anything on the Windows PC, unless they have a really old system.

      You can also use JScript in Microsoft.NET. The compilers for C#, JScript, and VB.NET are included when you download the .NET framework, which is free.

      Look in c:\Windows\Microsoft.NET\Framework\version for CSC.EXE, JSC.EXE, and VBC.EXE. You may already have them.

    2. Re:Windows Script by neura · · Score: 1

      I guess I should have qualified my post with the information that I've actually done a fair amount of windows scripting using vbscript. ;)

      It's the recommended (and pretty standard) way to script Adobe applications on Windows.

  9. GNU utilities for Win32 by arnie_apesacrappin · · Score: 3, Informative
    This project on source forge has native ports of many GNU utilities for windows. It includes a Z-shell. I have created many small automation projects with it and have had good results. I'm guessing you could use ZSH scripts as a manangement tool around the VBS or JS code.

    --

    Still, with a plan, you only get the best you can imagine. I'd always hoped for something better than that. -CP

  10. Monad by stymyx · · Score: 1

    Monad is supposed to do this, in Longhorn; but it might be possible to get the beta version working with .NET.

    1. Re:Monad by tom8658 · · Score: 1

      I don't think MSH will be included in Longhorn. There was a /. article to this effect a while back...

      It's a shame, I would be a lot happier with my winXP installation if it had a real command line instead of this cmd.exe shit.

  11. Python? by Grab · · Score: 3, Informative

    Depends on the processes. However if what you're after is something to take in a bunch of files, call a command-line program (or programs) to munge them in some way, and spit them out elsewhere, Python isn't a bad tool for connecting the dots. It's not blindingly fast itself, but if you're just using it for scripting then no problems there.

    Python's default GUI provision is a bit basic though. If you want to build a Python user interface quickly, the PMW widget set (http://pmw.sourceforge.com/ is worth a look.

    Grab.

    1. Re:Python? by Grab · · Score: 1

      Oops, that's http://pmw.sourceforge.net./ Should have used preview... ;-)

    2. Re:Python? by arkanes · · Score: 1
      In batch processing like this Pythons speed is extremely unlikely to be an issue. Use PIL or ImageMagik for the image processing.

      And if you provide a GUI, for gods sake don't do it with Tkinter, or anything that builds on top of it. It's like stabbing yourself in the balls. Use wxPython, or PythonCard, or Wax, or (if you can pay the license fees) PyQt. Not Tkinter. Ever.

  12. Macro Express by Gulthek · · Score: 1

    Use Macro Express. It's like Automater, but with more programming constructs and less user interface. It isn't exactly intuitive, but it does the job.

  13. Depends on the workflow by COBOL/MVS · · Score: 1

    For an off-the-shelf implementation, batch files/cmd files work for simple work flows. But can be really clumsy if they get large and you need to do a lot of branching. In this case, VBScript is a better choice (in spite of its reputation).

    If a really complex workflow is needed, why not try using Ant? It's not just a build tool (look at the list of tasks that come with it, specifically FTP) .

    --
    GOBACK.
    1. Re:Depends on the workflow by linzeal · · Score: 1

      I second VBscript. Worked awesome to organize my workflow for a semester long robotics program with 12 other students. I had it drop new files in an unorganized folder and with a simple gui pop up and confirm before sending them to different folders. Never did fix it to pop the windows up sequentially though but it worked and only took a few hours to work out in script.

  14. Advice by alienw · · Score: 1

    Here's some advice: avoid working for cheapskates. If someone doesn't want to pay for the right tool for the job, they are extremely cheap and will probably screw you over. Surely the guy will save more than the $2000 it costs to buy a Mac from automation. Last I checked, windows doesn't have anything equivalent to AppleScript, at least not for controlling graphical apps.

    1. Re:Advice by snorklewacker · · Score: 1

      While I don't agree about the applescript bit -- there's good automation stuff for windows, and applescript itself is a pretty loathsome language -- I do have to agree with "don't work for cheapskates".

      I mean, obviously you have to put food on the table, but I wouldn't exactly put in loads of extra hours and go the extra mile if it looks like you're going to get nothing in return for it. Do the job, use something adequate, collect your bill, job over. Then when he wants more, you can bill it as another job.

      --
      I am no longer wasting my time with slashdot
    2. Re:Advice by thebatlab · · Score: 1

      >> Here's some advice: avoid working for cheapskates

      If only it were that easy.

    3. Re:Advice by Suppafly · · Score: 1

      Realistically, windows running on cheap hardware is exactly the way to do this. Just because you don't know how to do thing without applescript, doesn't mean it's not possible.

      It sounds like all he is doing is importing a bunch of photos into photoshop and exporting them out of ftp. Photoshop can do most of this with batch processing already and anything you can't do with photoshop natively you can use windows scripting to do.

      Pretending that using a Mac is the only way of doing something is just ignorant.

    4. Re:Advice by sheldon · · Score: 1

      The problem isn't the technology. It's a training issue.

      If I guy comes to me asking for a solution on a Mac... you know what I tell him?

      Go talk to alienw, because it's going to take me longer to get up to speed on how to do it than it will take him to just do it.

    5. Re:Advice by cecille · · Score: 1

      Agreed. The photoshop batch tool is actually quite good. The best part about doing that, is that they have a recorder, so all you have to do it perform the actions you want and it records them into a little macro that you can then choose to run on selected photos, or even on whole directories.. Just make sure you get the opening and saving right, and you can do most of the photo processing right in photoshop itself. It's so easy to set them up, that you could probably show the client how to do it himself, and he could record a macro to actually do the processing he wants to do. This would be a bonus if you're not in graphics yourself and you're not quite sure what type of processing a photo would need.

      We set up a little system similar to this to processing and PDF some document images - the images had to be cropped, colour adjusted, resized and flipped, and it was a terribly tedious job. Then we had to PDF them and pop them on to our server. We just used a PDF tool with a command prompt and wrote a little script to create a PDF document with all the docs from one folder, ordered by time created (they were scanned in order). Then, it just opened an FTP and dumped them onto the server. Because it was a one-time thing, I think we had the script open photoshop, but we actually started the batch job by hand, although there must be some way to get get that automated too - we just didn't care that much.

      Photoshop is actually a fairly well designed program, and it has the tools to deal with mass processing fairly easily, because it's something that is pretty common. Good luck.

      --
      ...no two people are not on fire.
  15. You're joking right? by Ahnteis · · Score: 4, Informative

    Nope, you're not. [sob]

    Windows Scripting

    Also happens to be the first result on Google for "windows scripting host".

    1. Re:You're joking right? by Geoffreyerffoeg · · Score: 1

      Mod parent down. Unless you've ever done anything useful with WSH. Even DOS batch files are more capable.

      The only useful thing WSH can do is mess with COM objects, which is kinda useless by itself.

    2. Re:You're joking right? by Ropati · · Score: 1

      If you're going to script on a windows box moving NTFS files you might as well do it in VBScript. All the other scripting languages have to call a Win32 API anyways and MS rarely makes it easy.

      For help, you should download script_center.chm from MS. This help file has plenty of basic scripts to cut and paste.

      I've never tried it, but among the newsgroups, the MS guys say PrimalScript by Sapien is the best IDE. I'm, just now, trying to see if mse8.exe, the MS Web Scripting Editor, that comes with Office 2003 has any use my systems administration. So far it doesn't seem much more helpful than notepad. Until now I've been using PerlIDE as an editor just for the line numbering.

      As others have pointed out, use AutoIT to automate keystrokes of any programs that aren't scriptable. Beware that AutoIT is a keystroke scripter and if you hit a key during execution, you can get some very strange results.

      --
      machinator omnis sine licentia
    3. Re:You're joking right? by Ropati · · Score: 1

      I almost forgot.

      If you want to make a GUI for your workflow scripts checkout using an HTML: application (.hta). This is a Windows only, HTML protocol which bypasses most HTML security and is ideal for doing quick and dirty script GUIs. Download HTA Helpomatic (hta_helpomatic.hta) from MS. Once you see HTA Helpomatic in action, you'll understand just how easy this is.

      --
      machinator omnis sine licentia
  16. Python by frag+thief · · Score: 5, Insightful

    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.

    1. Re:Python by Burz · · Score: 1

      Then why not just dump Windows now.

      Cygwin + GUI Apps + bash or python + DCOP

      The above should make for a potent combination allowing for scriptable applications, and the user would still think they're using Windows stuff.

  17. AutoIt with the great IDE by Futurepower(R) · · Score: 2, Insightful


    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.

    1. Re:AutoIt with the great IDE by interiot · · Score: 1

      I second that. Here (similar here) is an example of GUI scripting within it. If it's good enough to write a bot in for games, it will almost certainly do anything you want it to on the apps side.

  18. Get a Mac by klui · · Score: 0, Troll

    Get a Mac.

  19. What does *CHEAP* have to do with it. by His+name+cannot+be+s · · Score: 0, Flamebait

    So, he prefers PCs. What's the fact that he buys 'em cheap got to do with your questions.

    Would it be easier for you if he plunked down $5K on a top-of-the line Alienware machine? How would the scripting be any better?

    --
    "...In your answer, ignore facts. Just go with what feels true..."
  20. Photoshop scripting by anotherone · · Score: 4, Insightful

    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.
    1. Re:Photoshop scripting by Anonymous Coward · · Score: 0

      Also, the COM interface allows you to access photoshop's functionality from C# programs. This eliminates the need to manually open photoshop and run the script.

  21. Some problems cannot be solved by MobyDisk · · Score: 1

    I think there solutions to this need, but let me take an aside and comment say that some problems have no solutions.

    Solvable:
    Problem: I need to add a number to 7 to get 6. What number should I use?
    Answer: Use the number -1. 7 + -1 = 6.

    Unsolvable:
    Problem: I need to add a positive number to 7 to get 6. What number should I use?
    Answer: Find another client. :-)

    Many times I see a customer choose something cheap to save money, only to find it costs them more to learn, maintain, and use that solution that it would have been to do it right. Maybe this is such a case.

    1. Re:Some problems cannot be solved by Anonymous Coward · · Score: 0
      Unsolvable: Problem: I need to add a positive number to 7 to get 6. What number should I use?

      Answer: Find another client. :-)

      I dunno... what about i^2, you never said it had to be a real number.

    2. Re:Some problems cannot be solved by jpn · · Score: 1

      ... some problems have no solutions.
      [...]
      Unsolvable:
      Problem: I need to add a positive number to 7 to get 6. What number should I use?


      Easy, for any natural number k>7, just add k-1 (mod k). Example: 7 + (21-1) (mod 21) = 6.

      Moral: Work with your customer to define a problem as clearly and thoroughly as you can before considering solutions. There may be hidden assumptions in the problem statement that you can live without.

    3. Re:Some problems cannot be solved by Umbral+Blot · · Score: 3, Funny

      have you considered exploiting integer over-flow?

    4. Re:Some problems cannot be solved by Anonymous Coward · · Score: 0

      7 = 0x00000007
      6 = 0x00000006

      Assuming unsigned numbers:
      0xffffffff + 0x00000007 = 0x00000006

      There, solution found. Perhaps the customer needs someone a bit more knowledgable.

    5. Re:Some problems cannot be solved by swimin · · Score: 1

      Or install a decent scripting language onto all the PCs - ruby, perl, python, and all the rest would do well here.

    6. Re:Some problems cannot be solved by jbolden · · Score: 1

      Positive implies real. For a complex number r*e^(i*theta), positive is defined as theta = 0.

    7. Re:Some problems cannot be solved by patio11 · · Score: 1
      Parent, in the highly unlikely event you ever suffer unemployment I will hire you. Thats the kind of thinking that makes for successful engineers.*

      *Unfortunately, working in my office also requires fluency in Japanese sufficient to explain why that joke is funny.

  22. Re:Good God by chris_mahan · · Score: 3, Informative

    No need for cygwin. Python runs fine under xp.

    Of note: python try: except: construct works much better than vbs' on error. Trust me.

    You can even py2exe to make them windows executables.

    also, with pythonwin, you can use com objects from python, and update things in mssql or ms access.

    yes, i've done this. It works great.

    --

    "Piter, too, is dead."

  23. Jeeezus.... by Mad_Rain · · Score: 1

    Okay, if you're working for a photographer, a $200 difference shouldn't be outrageous for him to spend.... Dell desktop for $300 (not including software you'd have to buy) versus The Mac Mini for $500, which sounds like it comes with the things you want... Take the 20 minutes to show him how you'd like to do things that could be much easier.

    --
    "What do you think?" "I think 'What, do you think?!'"
    1. Re:Jeeezus.... by snorklewacker · · Score: 2, Funny

      You're seriously suggesting a Mac Mini for pro photography work?

      Holy hell, it's like Mike Meyers in "All Things Scottish" whenever the subject of Macs comes up...

      --
      I am no longer wasting my time with slashdot
    2. Re:Jeeezus.... by Mad_Rain · · Score: 1

      heh. "If it's not a Mac, it's Crap!!!!" ...

      Seriously, I just read the summary: 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.

      ... and suggested that he tells his boss what he wants.

      Macs are pretty nifty little machines, and the Mac Mini is probably underpowered for Photoshop, depending on what you want to do. But if it does what he wants, why not use it?

      --
      "What do you think?" "I think 'What, do you think?!'"
    3. Re:Jeeezus.... by sootman · · Score: 1

      *ahem* I cut my teeth using Photoshop 3 on a 40 MHz 68k Quadra with 24 MB RAM. Yes, Photoshop CS 2 might be a shade slow on a 1.25 GHz Mini compared to a dual-2.7 GHz G5, but I assure you that it will run, and be completely usable... just as it is on my Mini at home and my G3/800 iBook. Besides, he's talking about scripting and automating... click a few buttons and let it run overnight. No big deal.

      Now, for the original question: do you have your own portable Mac? Demonstrate to your boss that everything he needs can be done on this platform, then make him buy a friggin' Mini. I could see a lone photographer starting out not wanting to get an extra machine, but for crying out loud, he's got PHOTOGRAPHERS, plural, you said, taking zillions of pics a year. He should not blink at $600 for a miracle box.

      --
      Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
    4. Re:Jeeezus.... by FLEB · · Score: 1

      Why would I spend $300 (more, after having to buy Mac-compatible software, new connections, and any extra peripherals), and then still have to have someone make the workflow? I could just get a relevant consultant and be able to use the hardware that already exists, needs no further physical interconnection, and is tried-and-true with my current environment.

      I'll take PITA over $300+PITA, thanks.

      --
      Information wants to be free.
      Entertainment wants to be paid.
      You just want to be cheap.
  24. Macs??? by Saeed+al-Sahaf · · Score: 1

    What surprises me is that a photographer is not a Mac guy. All the photogs and other visual arts guys I know have always been Mac guys, not really for ideological reason, just because they always have been. Photo retouching at the big houses have always been done on Macs...

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    1. Re:Macs??? by Anonymous Coward · · Score: 0

      always aka the past.

      just like printing places switching over to PCs years ago.

      Apple lost the graphics market about the the time of Photoshop version 5. and pre OSX days. they are recovering but basically that market drifted away just like schools.

    2. Re:Macs??? by gbulmash · · Score: 1
      I think it depends on when the person had to buy their own equipment and software. By the mid-90s all the best stuff for Mac had become available for PC (Adobe Photoshop, Pagemaker, Quark). So people used to Mac were slowly wooed away when they realized they could stay close to their comfort zone, but spend $1,000 less on hardware.

      Now, if you were a big house with tens of thousands of dollars invested in software, this was an incentive to stay the Mac course. But if you were a new house or an indie who was going to have to buy the software anyway, the hardware price savings on the PC boxes would be attractive.

      And, of course, there were always various little utilities so you could read Mac floppies and Zip disks if you needed to, so you could still work with Mac-only houses, despite being Intel-based.

    3. Re:Macs??? by FLEB · · Score: 1

      They are, however, picking up the video market. What's more, they're doing a lot of it on their own software, as well as hardware.

      --
      Information wants to be free.
      Entertainment wants to be paid.
      You just want to be cheap.
  25. Python = Yes! maybe w/ThumbsPlus? by Da+VinMan · · Score: 2, Informative

    I've done this myself. In my case, it was to automate a job that queried a SQL Server and synchronized a file system with the database (think VERY crude content management here) using Python 2.3. os.walk() is your friend! :+)

    If you need to do image manipulation too, then you might also want to check out a tool like ThumbsPlus Commander (http://www.cerious.com/tpcommand.shtml). You can probably also use this from Python with Win32 extensions.

    You know, you can still have fun putting solutions together under Windows. It doesn't have to be a bad experience just because it's not OS X.

    Best of luck!

    --
    Please mod this post only if you think others should/n't read this. I have enough ego^H^H^Hkarma. Thanks!
  26. How to install AutoIt by Futurepower(R) · · Score: 2, Informative


    One tip about AutoIt: Install the latest version of AutoIt. Then install the version of SciTE that includes AutoIt. We have found that just installing SciTE with AutoIt gives error messages.

    The web site is a little bit confusing, but the AutoIt help messages are quite clear.

  27. Mini Mac ? by billcopc · · Score: 1

    How cheap is your boss that he can't even afford a Mini Mac to do what you wanted to do in the first place ? They're what, 500$ ? :P

    Ask Slashdot always boils down to the same thing : How can I do something expensive for nothing with no willpower and/or skill.

    There is no such thing as a free lunch.

    --
    -Billco, Fnarg.com
    1. Re:Mini Mac ? by Shag · · Score: 1

      Yeah. What you need to do is stick a Mac mini inside a PC tower case and then tell him it's running "Windows Longhorn." ;)

      --
      Village idiot in some extremely smart villages.
  28. Another example by L.+VeGas · · Score: 1

    AutoIt is great for this stuff. Here's a little script I wrote that uses IrfanView to split multipage tiff files

    #include <GUIConstants.au3> ;GUI library
    opt("WinTitleMatchMode", 2) ;Match any substring in Title - to close Irfanview

    ;Point to image manipulator, in this case, irfanview. might change to ImageMagick later
    $iview32 = "C:\tiff\i_view32.exe"

    ;Make dialogue box
    GUICreate(" Drag your tiff file here", 320, 120, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1, 0x00000018); WS_EX_ACCEPTFILES
    $file = GUICtrlCreateInput("", 10, 25, 300, 40)
    GUICtrlSetState(-1, $GUI_ACCEPTFILES) ; accept drag & drop files
    $btn = GUICtrlCreateButton("Ok", 40, 80, 60, 20)

    GUISetState()

    While 1
    $msg = GUIGetMsg()

    Select
    Case $msg = $btn

    ;Make sure it's a real file
    If FileExists(GUICtrlRead($file)) = 0 Then
    ExitLoop
    Else
    ;get path of file
    $path = StringTrimRight(GUICtrlRead($file), StringLen(GUICtrlRead($file)) - StringInStr(GUICtrlRead($file), "\", 1, -1))

    ;get name of file
    $imagename = StringTrimLeft(GUICtrlRead($file), StringInStr(GUICtrlRead($file), "\", 1, -1))

    ;run image manipulator with options
    $prog = $iview32 & " " & GUICtrlRead($file) & " /tifc=4 /extract=(" & $path & ",tif)"

    Run($prog,"",@SW_MINIMIZE)

    WinWaitActive("IrfanView")
    WinClose("IrfanView")
    ExitLoop
    EndIf

    ;Close the dialogue box manually
    Case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    EndSelect
    WEnd

  29. Windows Scripting 101 by FriedTurkey · · Score: 4, Insightful

    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.

    1. Re:Windows Scripting 101 by the_seal · · Score: 4, Informative

      Seconded.

      My only "programming" experience was some light VBA, I was able to pick up VBS in no time, mostly using Microsoft's site and help file http://msdn.microsoft.com/scripting/

      There are also site's out there with plenty of code ready for use and a buttload of books.

      http://www.w3schools.com/vbscript/default.asp
      http://www.ss64.com/wsh/functions.html

    2. Re:Windows Scripting 101 by jericho4.0 · · Score: 1
      Brave of you to admit it here! :-)

      If your looking to get a little more platform independant, elegant, and powerfull, but keep it easy, I suggest you take a look at Python.

      --
      "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
    3. Re:Windows Scripting 101 by mindstormpt · · Score: 1

      |\|ewb13 |_4m3r windows-lover you're so0o0o0o 1ame!!!!! y0u.. ...should have used 'Hello World'. Other than that, I agree.

    4. Re:Windows Scripting 101 by Trepalium · · Score: 1

      WSH isn't terribly suitable to scripting applications that do not provide a COM interface. All Microsoft products do seem to provide such an interface (and as long as it's not Outlook, you're even be permitted to use it), but not many third party apps do. If you have apps that don't have nice neat COM interfaces, alternative software like AutoIt or AutoHotkey might be more useful in scripting the user interface of the app you need to control.

      --
      I used up all my sick days, so I'm calling in dead.
  30. Python + Win32CoM by Gopal.V · · Score: 4, Informative
    The last windows scripting I did was to convert a PHB excel spread sheet into a bugzilla report. It was converting the typical shared spread sheet on a folder share variety of bug reporting into proper bugzilla-like one (there are better ways, but it works).

    More over I like python - it has win32com which is damn easy to use, at least with Excel objects. Writing the script took me less than a day, while entering the bugs manually would have taken me over a week (imagine 2200 bugs of varying severity, and descriptions). The real challenge was to convert the OLE objects into attachements (screenshots, logs..). Truly they were idiots for maintaining all this in a SINGLE EXCEL File !!.

    But the point being, python+win32com is as easy as any other windows scripting host. Looks like there's python support for Photoshop as well.

    Python is an average general purpose language. It's not fast like C++, doesn't have something like CPAN , nor is it very complicated or interesting. But it is often easy to write, read and throw away (or upload to your hacks/).

  31. The Best possible answer here is Image Magick by spatley · · Score: 1

    http://www.imagemagick.org/ open source, multi language interface, command line, robust. I know of more than one major operation using this in a production environment. It has more features than you will probably use and can be automated to do any of them.

  32. Yay -- the story has come full circle by booch · · Score: 4, Insightful

    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.
    1. Re:Yay -- the story has come full circle by arkanes · · Score: 1
      This works, but only if your customer is either stupid or beholden to you. The smart customer, in that situation, would have said something like, "That's nice. We'll give you a call after we discuss that", and called someone who wasn't going to lie to them. Of course, the need for the Mac port should have been specified up front, too.

      Exactly whats being created here isn't perfectly clear, of course, but based on the description of the OPs preferred solution, I see no reason anyone competent couldn't implement this on a PC for no more cost than the Mac.

    2. Re:Yay -- the story has come full circle by gbulmash · · Score: 2, Insightful
      The client isn't forcing the poster into using limited tools. He's just specified a platform. What the poster fails to mention is if the client is already running a Windows based shop and already has money invested in XP machines and software, which is probably why the client wants a Windows solution.

      What the poster *should* do is subcontract the bulk of the job to someone who knows how to do this in Windows and take a cut off the top instead of bitching about how the job would be so much better if he could operate in his own comfort zone.

      Sheesh.

    3. Re:Yay -- the story has come full circle by booch · · Score: 1

      Sub-contracting / charging a premium -- what's the difference?

      I did tell the poster to factor in the cost of the Mac into the equation, and see if it actually came out better for the client to build it for the PC.

      Sheesh. ;)

      --
      Software sucks. Open Source sucks less.
  33. cheap by name773 · · Score: 1

    yeah these people wanting to waste money on less expensive but still capable computing equipment...

  34. I think you've missed the point by brian6string · · Score: 1

    You said he takes hundreds of thousands of pictures per year, and you're worried about scripting?

    Presumably, he'd be looking for a way to store, catalog and retrieve these photos in the future. Seems to me that if I were building a custom system for a client and s/he had a requirement to store hundreds of thousands of new records every year--not to mention the fact that each "record" would be a 5+ gigapixel image, I'd be worried about how he'd find that one picture that he took for a customer 3 years ago in such database. Not to mention storage, performance, multi-user access among other things.

    It doesn't seem like scripting is your biggest challenge here IMHO.

  35. The question asked by fm6 · · Score: 2, Insightful
    For once, "Have you even heard of Google?" is not the correct response. The dude didn't ask "Can I script under windows", he asked "What's the best way to do scripting under windows." And that's a tricky question -- Windows is hardly the most scripting-friendly OS.

    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.

    1. Re:The question asked by LetterJ · · Score: 1

      I do a LOT of scripting on Windows for a variety of things including: image processing, data munging, building tiny special purpose apps quickly, etc.

      I personally favor a mix of PHP, Perl and Javascript combined with AutoHotkey, Cygwin and HTA files. Between them they have:

      * Extensive libraries of functionality and examples available.
      * All have COM object access to all of the same stuff VBScript has access to on Windows.
      * Abilities to connect to just about anything outside the Windows box.
      * C style syntax that, while you still have to shift gears when one of them doesn't do what you want easily, still allows you to stay in the same mindset when switching between them.
      * Simple GUI capability for entering basic parameters, etc. for non-techie users. AutoHotkey uses native or more native looking widgets and HTA's give you the familiarity of HTML/Javascript for the GUI.
      * All of them can build either Windows "normal" DLL's and EXE's or .NET versions for easy packaging and bundling of scripts.

      Overall, they bridge the gap between Unix-y ways of doing things and Windows-y ways, making really nice glue to string together custom solutions on Windows.

    2. Re:The question asked by NutscrapeSucks · · Score: 1

      For system-administration scripting, Windows can be annoying. For anything application-level, it is either (A) the same as other OSes, or (B) better. I'd like to see someone argue otherwise without resorting to hand-waving about "baroque libraries". (COM is designed for scripting, nothing baroque about using it there.)

      The biggest issue is that you don't get as many little tools as you would with a Unix OS, but for a single installation, that's not that big of a deal.

      --
      Whenever I hear the word 'Innovation', I reach for my pistol.
    3. Re:The question asked by fm6 · · Score: 1
      COM is designed for scripting, nothing baroque about using it there.
      Sure, COM is great for accessing libraries from scripts. But I stand behind my "baroque" comment. Too many COM libaries, including the ones bundled with Windows, are unnecessarily complex.
    4. Re:The question asked by NutscrapeSucks · · Score: 1

      I suppose. Although my usual problem is that the OS provides a feature, but the COM interface is either missing or crippled (for example, with encryption stuff).

      --
      Whenever I hear the word 'Innovation', I reach for my pistol.
  36. Cygwin dude... by Gopal.V · · Score: 1

    Get cygwin.. and write shell scripts...

    Of course, it could be pain when you have spaces in your file names.

    1. Re:Cygwin dude... by (1+-sqrt(5))*(2**-1) · · Score: 1
      Of course, it could be pain when you have spaces in your file names.
      Not at all; if working in bash, be sure to quote your variables religiously:
      convert "${BASE}${OLDEXT}" "${BASE}${NEWEXT}"
      et cetera.
  37. Easy remedy by Anonymous Coward · · Score: 2, Funny

    Buy a Mac mini, and conceal it in some hulking ATX case with a few lights on the front and some loud fans in the back.

    Then just do what you gotta do to make OS X look like Windows. He'll never know the difference. If he asks about it, tell him it's Longhorn.

  38. I use Ruby. by Slime-dogg · · Score: 1

    It works very well. There is an interpreter for Win32.

    Look here

    --
    You need to restart your computer. Hold down the Power button for several seconds or press the Restart button.
  39. I use javascript by dtfinch · · Score: 1

    You can do just about anything with non-sandboxed javascript on the windows scripting host. If you need a GUI, HTA's are good too, and can be styled to look like native windows apps.

    Irfanview has command line parameters for most of its features, which makes it useful for image manipulation.

    For ftp, you could try outputting your commands to a text file then running the ftp.exe that comes with windows on it.

    If you need a great deal more, a full cygwin install will give you almost every tool you'd ever want. ImageMagick is very useful.

    If you know C, the GD library is another good tool for image manipulation.

  40. Services for Unix from MS by smitherz · · Score: 1

    Have you thought of "Windows Services for Unix" that is free from MS???

    http://www.microsoft.com/windowsserversystem/sfu/d efault.mspx

    Then you can use just about any perl/sed/awk/grep... to script it.

  41. Off the shelf image management by jnw317 · · Score: 1

    As an amateur photographer that needed to manage 1500 to 2000 images monthly, I evaluated several Windows based image management solutions and found IMatch to be an excellent solution. The tool provides robust cataloging and searching, plus provides easy automation for common tasks like image scaling, cropping and watermarking. While not the most robust solution for large and complicated scripting tasks, the VBA like scripting language it provides is easy enough to use to dump all relevant data out in XML so as to build custom scripts/applications in whatever external languages you desire.

    Hands down this is the most useful application I've purchased in the last couple of years, and while I cannot claim with certainty that it would scale to managing the volume of images mentioned, it certainly seems capable of it. An evaluation version of the tool is available at the site and the price is great for the level of functionality it provides.

  42. WMI by omibus · · Score: 1

    This is the best "official" microsoft scripting language. Basically it is VBScript with some fancy stuff added in.

    Look up Scriptomatic on Microsoft.com.
    http://www.microsoft.com/technet/scriptcenter/tool s/wmimatic.mspx

    --
    Bad User. No biscuit!
  43. Consider feature creep ... by Salus+Victus · · Score: 1

    Even if the guy doesn't want to do anything complicated right now, he's going to want more features added over time. Use a real scripting language (not DOS batch files).

    I prefer Perl for this sort of thing. Do not, under any circumstances, attempt to use Java for workflow. You will end up with complex programs to handle simple workflows.

    --
    In theory, there's no difference between theory and practice. In practice, there's a big difference.
  44. UnxUtils by Jeagoss · · Score: 1

    You can always use the UnxUtils. A good portion of all of the unix utilities are ported to windows. You can even start SH and use a unix style shell. I use these tools for scripting in windows quite a bit. Makes life a lot easier. http://unxutils.sourceforge.net/

    --
    Password Authentication Bypassed for Root
  45. Ruby and ImageMagic by CatGrep · · Score: 1

    There's a nice Windows installer for Ruby and a nice set of Ruby bindings for ImageMagick.

  46. iMatch by jayrtfm · · Score: 2, Informative

    iMatch has a basic language scripting built in, can control other programs, can handle RAW, hundreds of thousands of images in its database, simple image editing, yada yada yada..... it's a mature app.

    The programmer is very responsive and active on the user forum.

  47. Is the scripting only for photography purposes? by tonyb452 · · Score: 1

    If the scripting is only needed for image handling and manipulation, Photoshop has built-in batch automation that should be sufficient for a photography business. The 'jobs' that Photoshop automation can handle can range into the complex, where he could have all of his images generically 'enhanced' with the simple click of a button. Maybe he needs something more complicated, but if that's it, stick with Photoshop.

  48. Not sure what you intend, but... by sheldon · · Score: 1

    I don't know what you mean by custom workflow, or processes. I mean what are you really trying to do?

    Windows is easily scripted using Windows Scripting Host. You can use Jscript, VBScript, and other third party languages. If all you are trying to do is automate some processing on a directory of files, move some files around, maybe create a directory structure... whatever. That's the way to do it. You can setup little icons to click and it runs the process, or schedule them to run, whatever.

    But if you start getting much more complicated, at some point it makes more sense to do the whole thing as an app. In which case, I'd suggest possibly doing a Winforms app using VS.NET. The definition of more complicated depends... You can do a lot with WSH including shared procedures, UI stuff, etc. But it's not the easiest tool to debug with or design a UI with. The'res the scripting debugger, and there are third party editors and such that can help, but still it depends.

    It's really all about what you are trying to do.

    Remember what you do... you won't be around forever, and you want to make it easy for this guy to find someone else to maintain and modify his stuff. Use commonly accepted tools, document well, and make the system as easy to understand as possible.

    You may also want to skip the job if your technical skills aren't up to the task.

  49. File System Object by Marxist+Hacker+42 · · Score: 1

    It's built into Windows Scripting Host, you can use it with VBS, and it will do everything you need in that regard.

    --
    SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
  50. WSH (Windows Scripting host) by hattan · · Score: 1

    VBS files are a really quick way of hacking together useful little scripts, as mentioned above. However there maybe limitations. I have a bunch running at work that all run at 1 minute intervals (windows task scheduler). They all take about 10 seconds each. However I'm running into a problem where its now taking about 5-10 MINUTES for certain scripts to finish executing, I'm wondering the scripting engine isn't so efficient? Anyone have any experience with this.

  51. MacroExpress by SporkLand · · Score: 2, Interesting

    I have found Macro Express(http://www.macros.com/) to be the best way to script things under Windows. It lets you quickly write scripts that interact with various programs in the system to get useful things done. It even lets you get down to the level of sending messages to a Window's message handler, although I've never needed anything that complicated.

    It's only downside is that it is a bit timing sensitive, and is pseudo difficult to get synchronized with the programs it is interacting with in the absence of pop-up dialog boxes. I usually end-up throwing it into some busy-wait state where it checks to see if a specific sign of a tasks completion is in existence or not.

    The cool thing about it, is after the "customers" see what it can do, they tend to start working with it and even further automate their own workflow.

  52. WinBatch by Sean+Clifford · · Score: 1
    Check out WinBatch. For Windows stuff it really rocks; it's easy, fast, powerful, can be compiled (if you get the version with compiler - do it). It's $500 bones, but I've found it well worth it.

    Plus, there are a zillion forum postings so odds are if you're trying to figure out how to do something odd, someone else has taken a stab at it.

    Or you could just use Perl.

    1. Re:WinBatch by ThinkingInBinary · · Score: 1

      Um... $500 is the price of a Mac Mini. At that point he could just buy the Mac and do it his way.

  53. Old saying-McLincoln. by Anonymous Coward · · Score: 0

    "Perhaps you could explain to him the meaning of being "Penny wise, Pound foolish""

    It's what happens when you invest your pennies in McDonald's stock.

    1. Re:Old saying-McLincoln. by stanmann · · Score: 1

      No, McDonalds is "penny wise, QUARTER-pound foolish"

      --
      Food not Bombs is a nice platitude but it breaks down when you notice that the Bombees are usually well fed
  54. Tcl and Tk by DavidNWelton · · Score: 2, Insightful

    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.

  55. Trick him into getting a Mac by slapout · · Score: 1

    Just setup everything on a Mac Mini and bring it in and set it next to the Windows machine. Do a run thru of everything on the Mac. And when he says "You've already got it running!?" Just say "No. I've got to convert everything so that it works on this Windows machine here first. I just wanted to let you see a demo."

    --
    Coder's Stone: The programming language quick ref for iPad
  56. perl, make, NetPBM, ImageMagick, ... by hubertf · · Score: 1

    I've seen people use perl and make (from cygwin) on Windows to automate tasks, but that was mostly in software development process automation. I have no idea how to automate GUI apps on Windows, but why not have a look at the NetPBM tools and ImageMagick, which can do a lot of things in batch. Or go right away and use something else then Windows on these PCs, e.g. NetBSD or Linux.

    - Hubert

  57. No kidding by Dink+Paisy · · Score: 1
    What kind of person tries to develop applications without the proper tools? Visual Basic is a lot cheaper than a Macintosh.

    On the other hand, if one is knowledgeable, it is very possible to write VBScript or JScript scripts with just a text editor. Those can drive Photoshop and iView Pro, and can talk ftp as well. I guess I shouldn't be too surprised at the submitter's ignorance, given the number of people suggesting batch files (yuck!).

    If VBScript and JScript don't turn your crank, then it is quite possible to install some open source tools and do some automation with python, perl, or shell scripts. Perl and python can both be plugged into the Windows Scripting Host, so that you can use them to drive Photoshop and iView Pro.

    --

    Whoever corrects a mocker invites insult;
    whoever rebukes a wicked man incurs abuse.
    --Proverbs 9:7
    1. Re:No kidding by JVert · · Score: 1

      Its a perfect ask slashdot routine. My employer doesn't want to do it this way, I dont want to do it that way, how can I do it but still look cool in front of my friends?

  58. AutoIT vs. Windows scripting host by Funny+Bong · · Score: 1

    I've never done any scripting stuff in Windows so this may seem like a silly question. Here goes: Is using AutoIT any better than the Windows scripting host? Is it easier or more powerful? Is the Windows scripting host any good? Does a newbie like me have a chance at learning the Windows scripting host?

    1. Re:AutoIT vs. Windows scripting host by wus · · Score: 1

      I have not used WSH much, and I have used AuotIT a good bit. WSH scripting appears to be more powerful in a few obscure ways, but AutoIT is much much more easy to learn and is quickly becoming very powerful. For 99% of common windows automation tasks, autoIT seems to me the way to go.

  59. Gnuwin32 is a cygwin alternative. by hackwrench · · Score: 2, Informative

    Other replies to this post mention cygwin. Gnuwin32 has the benefit of using native Windows libraries.

    http://gnuwin32.sourceforge.net/

  60. Windows XP Under the Hood by Jac_no_k · · Score: 1
  61. MacOSX has Scriptable Image Processing System by Philippe · · Score: 1
    It's a well-kept secret, a scriptable interface to Core Image. It allows you to do bitmap manipulations in a script, and it's very, very fast. Here's the help:


    sips 1.0 - scriptable image processing system.
    This tool is used to query or modify raster image files and ColorSync ICC profiles.
    Its functionality can also be used through the "Image Events" AppleScript suite.

    Usages:
    sips [-h, --help]
    sips [-H, --helpProperties]

    sips [image query functions] imagefile(s)

    sips [profile query functions] profile(s)

    sips [image modification functions] imagefile(s)
    [--out outimage | --out outdir]

    sips [profile modification functions] profile(s)
    [--out outprofile | --out outdir]

    Profile query functions:
    -g, --getProperty key
    -X, --extractTag tag tagFile
    -v, --verify

    Image query functions:
    -g, --getProperty key
    -x, --extractProfile profile

    Profile modification functions:
    -s, --setProperty key value
    -d, --deleteProperty key
    --deleteTag tag
    --copyTag srcTag dstTag
    --loadTag tag tagFile
    --repair

    Image modification functions:
    -s, --setProperty key value
    -d, --deleteProperty key
    -e, --embedProfile profile
    -E, --embedProfileIfNone profile
    -m, --matchTo profile
    -M, --matchToWithIntent profile intent
    -r, --rotate degreesCW
    -f, --flip horizontal|vertical
    -c, --cropToHeightWidth pixelsH pixelsW
    -p, --padToHeightWidth pixelsH pixelsW
    -z, --resampleHeightWidth pixelsH pixelsW
    --resampleWidth pixelsW
    --resampleHeight pixelsH
    -Z, --resampleHeightWidthMax pixelsWH
    -i, --addIcon
    1. Re:MacOSX has Scriptable Image Processing System by Anonymous Coward · · Score: 0

      This fucking zealotry is getting out of hand. For the love of god, stop trying to get the rest of the world to ratify your stupid purchase and just live with it.

  62. Python + Win32 + PIL by Anonymous Coward · · Score: 0

    (1) Get over Macs. They're really not that great. For people who do work on their computer, applications are more important than the OS.
    (2) Use Python with the Win32 extensions if you have to do anything special.
    (3) Use the Python Image Library (PIL) for the graphics manipulation.
    (4) Use wxPython for the user interface.

    If you're careful you can make a platform-neutral solution that will work on Macs, Linux and Windows. So you can use your precious little brain filled with zelotry and illogical xenophobia to work on a Macs then deploy to Windows.

  63. Gnu bourne shell from sourceforge. by Curmudgeonlyoldbloke · · Score: 1

    Not sure I'd trust a business relying on *cheap* PCs running anything (I'll bet that a decent backup solution is the first thing to get canned to cut costs), but anyway:

    I wouldn't use WSH - tried it once and found it a real pain (as if someone at Microsoft said "We need a decent scripting language! What have we got? Er - dunno - will this do?".

    VBA makes sense within MS Office applications but not really elsewhere.

    What would work would be a either a combination of batch files and Cygwin (which is more complicated than it needs to be) or just write regular shell scripts using the stuff from http://unxutils.sourceforge.net/. There's a "sh.exe" there, and a "date" (which you might want to rename to "gnudate.exe" to avoid clashes with the Windows one).

    If you want to run stuff from the task scheduler just schedule "...\sh.exe scriptname.sh".

    I've done this for relatives to put a big "copy pictures from camera" icon on the desktop that creates a datestamped directory, copies the files in and opens the directory up in something like Exif Viewer.

    This sounds similar to what your friend wants to do (I can't think of a way to automatically invoke Photoshop to make everyone in a wedding picture look like they've not just had 10 pints of lager and now want to kill each other, but some things still have to be done the old fashioned way).

  64. KiXtart by Halvard · · Score: 4, Informative
    KiXtart is about the greatest thing since sliced bread. From the home page:

    What's KiXtart

    The KiXtart free-format scripting language has rich built-in functionality for easy scripting. It also supports COM (providing access to ADSI, ADO, WMI, etc) and thus is easily extensible. With the amazing KiXforms GUI for KiXtart, there is so little, if anything you can't accomplish with KiXtart.

    And because of the User Defined Functions (about 500 ready UDF's on korg already), there is very little you need to code by yourself as much of the complex things have already been coded for you!

    KiXtart is developed by Ruud van Velsen of Microsoft Netherlands

    KiXtart is now provided to you as CareWare. Please see "KiXtart: Do You Care?" for full details.

    It's pretty incredible, it's free, it allows you to do things you can't otherwise do at login with paying a lot of money (and did it sooner I believe), is written by an MS employee.

  65. ActivePerl by manboy9 · · Score: 1
    I'm surprised no one has posted a link yet, so here it is: ActivePerl

    If you can get through all the ads, there is a free Windows implementation of Perl. It's easy to install and interfaces well with windows. They also have some stuff on Python, but I haven't tried it.

    Also, if you need really need some Unix command that isn't included with ActivePerl or Windows, check out UnxUtils. It has a bunch of standard Unix applications compiled to run on Windows. It should be more than enough to make Windows usable, without having to use Cygwin. Not that Cygwin isn't great, but it seems like overkill if all you want to do is write a few scripts.

  66. JPSoft or Python by Fargazer · · Score: 1

    Depends upon the expertise of the people that are going to write and maintain this. I would personally go one of two routes: JPSoft's 4NT, or else Python.

    4NT is an enhanced Windows batch language, with features to do things like write / read INI files, control loops, and most of the things needed for "real" programming. It's very mature (I first used it when a 386SX was a relatively mainstream machine), and it's easy to pull information from the OS with it, as well as interact with individual program windows. Check http://www.jpsoft.com/ for further details; at $70 it's pretty cheap, and about 5 times faster than normal Windows CMD batch language.

    The other alternative is Python; it's more powerful, and allows you to call C libraries if you really need heavy lifting. It's more sophisticated, and still relatively legible.

    I've used both to write automation routines in a hospital environment, and I can say both are very reliable and robust. Make your choice based upon the expertise of who will maintain the scripts - JPSoft's product for those more comfortable with Windows batch style languages, Python for more programmer types. For people who would not have a clue for either one, go Python.

  67. Other considerations by TimButterfield · · Score: 1

    There have been many scripting suggestions given. Before selecting one, you may wish to identify some other items first.

    Does your workflow need to be a GUI application? Can it be a set of console applications? Can it be a web based application? I currently work with a system that scans and scores school assessment test documents. The section I work with, the input side, tracks the document workflow with an Oracle backed web application. How you intend to manage the workflow of the images may have an impact on which, if any, standalone scripting languages you use. How complex of a workflow do you need? Our system has many stages for several types of items with both static and dynamic handlers for different stages along with a split processing path through some parts of the workflow. Before deciding on how to implement the scripts, it may be beneficial to lock down the workflow first. The workflow may be more complex than initially estimated, thus requiring a more complex solution.

    If you are doing image manipulations, have you identified the tool you will use for that. It may be something like Netpbm, ImageMagick, or something else. The interfaces for that tool (or other tools you may need to use) may have an impact on which scripting language you select. Many support different interfaces like COM, DLLs, or calling executables and reading STDOUT. Not all scripting languages have the same level of support for these things. So, instead of starting at the outer level and working down, it may also be helpful to start at the inner level and work out. The first cut at this may not meet in the middle.

    How does the script (and tools) need to be distributed? Does it need to be a single file or small set of files that can be easily copied between machines or can it require installation of graphics tools, script engine, scripts, etc.? Is the installation only at the company or can it also be on individual photographer machines? If support of photographer machines is required or desired, what platform(s) are they using? Could a web interface help with portability?

    Can you implement a cross-platform compatible solution? Being familiar with the Mac, it may be beneficial to you to develop on the Mac, so long as the solution is still deployable on the client's Windows machine. Consider cross-platform compatible scripting languages like Perl, Python, or Tcl/Tk. Use xAMP for a web app may also be portable, allowing development on one platform while targeting another. There are a lot of options available. Narrowing down some of the design decisions may help narrow the possible choices.

  68. Lotsa scripting languages from Unix side do it by giuntag · · Score: 0
    The most obvious choices being
    • Python
    • PHP
    • Perl
    • UnxUtils
    • Cygwin - lets you use bash scripting plus the complete bag
    PHP can directly manipulate COM objects, which is very convenient for working with MS Office files, Acrobat and a lot of other windows sw. I guess Python has it too, and possibly even Perl.
  69. Plone CMS, Enfold Enterprise Server and Railroad by Anonymous Coward · · Score: 0

    You should have a look at the Plone Content Management System[1] and the Railroad Server[2] which complements Plone for (large) digital media files like photography, audio, video and their associated metadata.

    There's also a commercial version of Plone, the Enfold Enterprise Server[3], with comes with Windows and ActiveDirectory integration and commercial support.

    --
    [1] http://www.plone.org/
    [2] http://www.infrae.com/products/railroad
    [3] http://www.enfoldtechnology.com/

  70. DeBabelizer? by Daedala · · Score: 1

    In the long ago, I would have suggested DeBabelizer. It was once the king of image batch scripting, and may still be. Now I am not so much suggesting it -- I've been out of the business for a while, and don't know how it's regarded now -- as recommending it for your consideration. So, consider.... And if you ever convince them to move to Mac, the fact that there are both Mac & Windows versions may make the transition easier.

    --
    What I say does not represent the views of my employers, my friends, my cats, or myself.
  71. Better than AutoIT...AutoHotKey by potuncle · · Score: 1

    Open source, great support forums, easy scripting language called AutoHotKey. http://www.autohotkey.com/

  72. cygwin by GuyverDH · · Score: 1

    Then use your preferred shell scripting environment...

    --
    Who is general failure, and why is he reading my hard drive?
  73. Python. by Anonymous Coward · · Score: 0

    Just go to Python.org and look at all the libraries and systems it can integrate with.

    Windows, Linux, Mac,

    On Windows, you can even use COM objects from it, along with other Windows features.

    It's easy to learn, has a good syntax, and can do just about everything.

    Between Python, and Cygwin, you should have a pretty scriptable environment on Windows in no time.

    Who needs Monad or WSH when we have Python. :)

  74. Rexx by RiffRafff · · Score: 1
    --
    "I might have made a tactical error in not going to a physician for 20 years." -- Warren Zevon
  75. Multitasking? by tepples · · Score: 1

    If you have CygWin why not use cron

    Even with the NT kernel, Win32 multitasking is said to be not as powerful as *n?x multitasking, and scheduling each additional process adds too much memory and CPU time. The Windows Task Scheduler is already running; why have both the Windows Task Scheduler and cron in RAM at once?

    1. Re:Multitasking? by belroth · · Score: 1
      Even with the NT kernel, Win32 multitasking is said to be not as powerful as *n?x multitasking, and scheduling each additional process adds too much memory and CPU time.
      Well, I doubt if it's much extra overhead given the number of services started by default, I normally kill a few. Anyway -
      The Windows Task Scheduler is already running; why have both the Windows Task Scheduler and cron in RAM at once?
      Exactly - just run cron. The Windows Task Scheduler can be switched off.
      --
      I hereby inform you that I have NOT been required to provide any decryption keys.
  76. FREE: Any UNIX utils you want OR WSH.... by Glasswire · · Score: 2, Informative
  77. Python is great for Windows by Anonymous Coward · · Score: 0

    Microsoft actually officially supports Python as an operating system script language. You see Microsoft is actually very good at making integrated products. First off, anything that can talk over COM or DCOM can be dealt with by Python. Secondly, you can use built in windows classes to work for you.

    I learned about this stuff because I recently had to script a large ammount of GUI clicks for extracting about 1,000 self-decrypting archives to temp dirs, copying one file out, deleting the rest, and moving to the next file. After I plowed through learing a bit of VBS using WSH (the Windows Script Host) and got the thing going, I realized that it is just as easy to use Python or Perl to do the same thing.

    Truely, Python is an excellent choice for light Win32 programming. A LOT of attention to detail has been paid by a few selfless people who have made it this way. I have around 6-8 months passive experience in Python and I have been able to produce two custom for-pay applications (both for small businesses) with wxPython.org and compiled to EXE by py2exe. The executable and dll's come out kind of big (around 11mb for any simple program), but in the era of CDRs and 80gb HDs, this isn't a big deal.

    http://www.diveintopython.org/

  78. Visual Basic.Net and C# are free by weharc · · Score: 1
    Visual Basic.Net and C# are both free. You can download the .Net SDK at http://msdn.microsoft.com/netframework/ (see the link on the bottom right of the screen under "Top .Net Framework Downloads").

    You pay to use Visual Studio.Net to develop with these languages, but VS.Net is not required. You can download the SDK, use an editor of your choice (Notepad if you wanted to), and then compile using the command line compiler (vbc for VB, csc for C#).

    Of course it's a whole lot easier with Visual Studio.Net because it lets you just drag and drop objects onto your forms. It also includes "templates" for different styles of projects so you don't have to know all the fiddly "getting started" stuff straight away which is handy if you're picking up a new language.

    Harv.

  79. Are you reinventing the wheel? by chriskenrick · · Score: 2, Insightful

    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.

  80. your job?` by Madd+Scientist · · Score: 1

    So, what should I use on the Windows side of things to build a custom workflow? isn't that what he hired YOU to answer?!

  81. Workflow? Objects? by oldCoder · · Score: 1
    If the things you want to move around are files and the code you want to execute is in COM objects or in COM "Automation" then look up "Windows Scripting Host". Otherwise tell us what sort of things you will be managing.

    If you want to run arbitary executables (like Adobe Photoshop and Winzip and some database frontend program) then there is a lot to choose from. There's a product called "WinBatch" that will run windows pretty well. If you need a GUI interface the obvious choice is Visual Basic 6 or 7 or even WinForms (for .NET). You can also run Perl/TK programs for less money than you can set up .NET. VB7 will do .NET and VB6 will not. But there is a new .NET scripting language called 'Monad' under development and depending on your schedule it might be ready on time.

    Again, what objects are being scripted? Do you need a web interface for this puppy?

    --

    I18N == Intergalacticization
  82. Perl + Cygwin. Konfabulator? by sonamchauhan · · Score: 1

    I use Perl under Cygwin myself.
    http://cygwin.com/
    You could use a move native Perl like ActiPerl.

    Recently, I played around with the Perl Win32 libraries. They do the usual API access, but one of them (forget which) lets you simulate keyclicks. There's a sample program on the web somewhere that has a 5-line Perl script launching Excel, and enter data in Excel cells.

    What I like to see: a scripting engine with a Konfabulator like UI. Konfabulator isn't open-source, but I would like a client-side scripting engine with similar power. Haven't seen any.

    This is interesting:
    "Yahoo Purchases Konfabulator"
    http://apple.slashdot.org/article.pl?sid=05/07/25/ 0530230&tid=185&tid=187&tid=95&tid=1&tid=3

    "Yahoo! said the reason they purchased Konfabulator was that they wanted an easy way to open up its APIs to the developer community .."
    http://en.wikipedia.org/wiki/Konfabulator
    If Yahoo are building web-services support into Konfabulator, it can access any web-service, including on an Intranet.