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