I have written a small software that automates a few functions in PS CS2.
Till now it was working just fine with PS CS2. Now due to some unknow reasons the client has installed CS 4 and CS 5.
Now my clinet want that the software should be able to detect all installed version of PS and allow him as user to choose as to with which version of PS my software should automate.
Is this possible?
If yes and how to achieve it?
Oh! I have also abserved an unusual behaviour. I don't know whether it is because of my software or because of PS.
By default when my software executs this automation script (generated using Script listner)
Set objApp = CreateObject("Photoshop.Application")
Rem Use dialog mode 3 for show no dialogs
dialogMode = 3
id11 = objApp.CharIDToTypeID("setd")
Set desc3 = CreateObject("Photoshop.ActionDescriptor")
id12 = objApp.CharIDToTypeID("null")
Set ref2 = CreateObject("Photoshop.ActionReference")
id13 = objApp.CharIDToTypeID("Prpr")
id14 = objApp.CharIDToTypeID("GnrP")
Call ref2.PutProperty(id13, id14)
id15 = objApp.CharIDToTypeID("capp")
id16 = objApp.CharIDToTypeID("Ordn")
id17 = objApp.CharIDToTypeID("Trgt")
Call ref2.PutEnumerated(id15, id16, id17)
Call desc3.PutReference(id12, ref2)
id18 = objApp.CharIDToTypeID("T ")
Set desc4 = CreateObject("Photoshop.ActionDescriptor")
id19 = objApp.CharIDToTypeID("HsSt")
Call desc4.PutInteger(id19, 1)
id20 = objApp.CharIDToTypeID("GnrP")
Call desc3.PutObject(id18, id20, desc4)
Call objApp.ExecuteAction(id11, desc3, dialogMode)
It will automatically start that version of PS which was last running before the system was shut down.
Let me try an explain this in a different way:
To get my software to talk to a particular version of PS I have to perform the following steps:
- Start that version of PS in I am interested
- Open a file and save is under a different name
- Close PS
- Restart my PC
After performing all these steps when my software automates PS that version of PS will start which was last run.
Any idea as to what is going on?
Please help me solve this problem.