Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2007

Tip: Looking for answers? Try searching our database.

Need Help in Photoshop

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
KAMAL - 27 Jan 2007 05:54 GMT
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.
RobinS - 27 Jan 2007 08:21 GMT
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.
-----------------------------------
> We need some help in photoshop Add-in.
> Here  i am sending the problem. Please do in favour in solving the
[quoted text clipped - 59 lines]
> adjustment
> tool to be opened automatically.
KAMAL - 31 Jan 2007 04:41 GMT
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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.