Need Help in Photoshop

K

KAMAL

We need some help in photoshop Add-in.
Here i am sending the problem. Please do in favour in solving the problem.
Through the .Net application we are activating the photoshop and sending
the short cut keys to photoshop for activating the adjustment dialog boxes.

in C#.net

Interaction.AppActivate("Adobe Photoshop");
SendKeys.Send("^l");

//^l -- is the shortcut key for opening levels
//^m -- is the shortcut key for opening cureves
//^b -- is the shortcut key for opening colorbalance
//^u -- is the shortcut key for opening Hue/Saturation

===>>> It can be done by using sendkeys function in use32.dll also <<<====
//in the process p it will contains the adobe photoshop
//Importing user32.dll for usage of PostMessage which is used for sending
the messages to a process
[System.Runtime.InteropServices.DllImport("user32.dll")]

static extern bool PostMessage(HandleRef hWnd, uint Msg, IntPtr
wParam,IntPtr lParam);

ProcessStartInfo pinfo = new ProcessStartInfo("Photoshop");
Process[] p1 = System.Diagnostics.Process.GetProcessesByName("Photoshop");

Process p = p1[0];
System.IntPtr ptr = p.MainWindowHandle;
System.IntPtr ptr1 = p.Handle;
IntPtr hwnd = ptr;
Const WM_COMMAND = &H111;
int err;
err = PostMessage(hwnd, WM_COMMAND, 1801, 0); //1801 is the address of

It will activates the levels adjustment in photoshop application. After
doing need ful adjustments
in the levels dialog box "ok" button or "cancel" button will be clicked.
That button which is clicked
in levels dialog box that response is to be sended back to the .Net
application .
With that received response from the photoshop i have to send the next
adjustment tool code
which is to be activated.

This is the first adjustment tool opened after sending the short cut key.




After clicking the Ok button of the levels dialog box the next adjustment
tool "cures" has to be active automatically.




After clicking the Ok button of the "curves" dialog box the next adjustment
tool "Color Balance" has to be active automatically.




The every thing opening of the adjustment tools to be automated after
clicking "OK" or "Cancle" button in active dialog box the next adjustment
tool to be opened automatically.
 
R

RobinS

You posted this to a bunch of different dotnet newsgroups.
In the future if you want to do that, post the message in all
the newsgroups at one time. This way, if anyone has a response
in one newsgroup, it is displayed in all the groups where
the message was posted.

Robin S.
 
K

KAMAL

Hi all,
we got the solution. We have to use javascript for that one. The thing is i
don't know how to use the script enginges in photoshop for execution of java
script ( in that java script i will write the necessary code for making
adjustments for the opened photoshop images). Its very urgent. If any code
given to directly use in my project will be very help ful.

Thanks in advance.

Regards,
kamal.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top