AutoLoading from a CF Card - Windows XP

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

Andrew

AutoLoading from a CF Card - Windows XP

Post by Andrew »

Since this thread started Mike Hale has writen an excellent tutorial on this.

CS2 users go here: autoplay/autoplay_CS2_intro.htm

CS users go here: autoplay/autoplay_CS_intro.htm

This thread arrives at a method on Windows XP for autoloading a script when an external drive such as a compact flash card is connected to your PC. This means users of XP can automatically kick-start their image management process just by connecting their card reader.

Here I will summarise the solution, read the whole thread for more info.

You will need to install Microsoft’s TweakUI utility. This can be downloaded from here

For an example of using TweakUI read this:

http://www.alanlight.com/dim/DIMAutorun.htm

Mike Hale provided the following instructions on how to then set things up.

Here is what I did to get it working. It turns out that the reason I was having trouble with the command line is that Andrew and Xbytor drilled into my head to use / in path names. So I was using / instead of \ in the arg field.

1. I clicked on a .jsx file in window explorer to hightlight it.
2. I held down the shift key and right-clicked on the hightlighted script
3. From the pop-up menu, click on open with.
4. Even if Photoshop is in the list of programs to use go to choose program at the bottom of the list.
5. From the next dialog choose Photoshop and make sure 'always use..' is checked.
6. Photoshop should have run the script. so swith back to explorer
7. Confrim that photoshop is now set up to open .jsx files by double-clicking on one. It doesn't matter if the script throws an error, just as long as photoshop tried to run it.

All of the above is needed for the command line to work. If photoshop is already set up to run .jsx files on your system you can skip them. On my system extendsripts was setup and I had to change that.

8 install the tweakUI if you haven't already
9 Follow the instructions at the link Andrew gave except in the args field type /C "full pathname of script". For example I used /C "C:\auto.jsx". I set up both 'pictures' and 'mixed content'
10. Back to windows explorer and right click on the drive letter for your card. Choose properties at the bottom then the autoplay tab. If you always want the script to run click on 'Select an action...' and choose the new handler. I left mine at 'Prompt me...' so that I could choose when I insterted the card.

I have set up my SD, SM, and CF card drives.

Mike

Andrew

PLEASE NOTE - the next two pages of this thread are the lead-up to what is summarised in this first post.

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

Norbert

AutoLoading from a CF Card - Windows XP

Post by Norbert »

It is possible that you can do this with Events and CS2 - I don't know - it cannot be done with CS.

Do you mean: It can be done in CS2 and you do not know if it can be done in CS. If it can be done in CS2 I will upgrade.

Set it to 0 and it works.
This is needed if in a series of 3 pictures for a composite one of them has to be retaken.
Thursday it will run in a production environment.
Thanks
xbytor

AutoLoading from a CF Card - Windows XP

Post by xbytor »

Andrew wrote:'Next would be when inserting the compact Flash card it runs the script automatically.'

It is possible that you can do this with Events and CS2 - I don't know - it cannot be done with CS.

Andrew

Neither CS or CS2 can do this for you directly, AFAIK. It would be an OS thing. Kinda like when it automatically launches (or tries to launch) a DVD player when you pop a DVD movie into your drive. Or, whenever I insert a disk full of images, it tries to open some image processing app or slideshow viewing sofware. You could use this machinery to launch a droplet that would kick off your CF processing code. This is more of an XP configuration problem than a programming problem.
Mike Hale

AutoLoading from a CF Card - Windows XP

Post by Mike Hale »

You could use this machinery to launch a droplet that would kick off your CF processing code. This is more of an XP configuration problem than a programming problem.

I thought of doing this a while back. On XP, it seems that the auto-play feature is in the windows registry. So I couldn't come up with a generic card launcher that would run Photoshop from any card.

But you can place autoplay files on the card that will take the place of the ones the XP wants to use. That was as far as I went with it as I couldn't think of a way for the autorun to launch a JS script. I didn't think of droplets. Thanks X

Mike
xbytor

AutoLoading from a CF Card - Windows XP

Post by xbytor »

But you can place autoplay files on the card that will take the place of the ones the XP wants to use

Like one of those 'autorun.inf' files? That sounds like a possible solution.
Mike Hale

AutoLoading from a CF Card - Windows XP

Post by Mike Hale »

X,

It seems that the droplet wants a file to process or it doesn't open Photoshop.

Do you know how to feed a droplet a file using the command line?

Mike
Andrew

AutoLoading from a CF Card - Windows XP

Post by Andrew »

On XP perhaps this technique could be useful.

http://www.alanlight.com/dim/DIMAutorun.htm

Also, can you not make a JSX file launch PS, thereby having the target script run on the target app?

This would be a great functionality to add - not to the script but to image processing in general.

Andrew
xbytor

AutoLoading from a CF Card - Windows XP

Post by xbytor »

Mike Hale wrote:Do you know how to feed a droplet a file using the command line?


Nope. You could pass it a 'blank.gif' in situations where you don't have a target image to process.
Norbert

AutoLoading from a CF Card - Windows XP

Post by Norbert »

On XP perhaps this technique could be useful.

Downloaded this Power Toy and will set it up to see.
xbytor

AutoLoading from a CF Card - Windows XP

Post by xbytor »

Mike Hale wrote:Do you know how to feed a droplet a file using the command line?


Actually, yes I do. I misread the question (again). You have to pass the droplet the full filesystem path to the image on the command line to the droplet. Something like:

Code: Select allC:>c:\bin\mydroplet.exe c:\images\blank.gif

You can only feed it one file at a time this way. If I remember correctly, you have to pass it an image whether you are going to process the image or not. I'm on the road right now so I can't test any of this out at the moment.

Sorry about the confusion.