|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Need help in accessing photoshop with c#.netWe 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. 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. ----------------------------------- Show quote "KAMAL" <kamal***@nannacomputers.com> wrote in message news:O3JkkgdQHHA.1200@TK2MSFTNGP02.phx.gbl... > Sir, > > 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. > > > > > Robin,
I see persons who post in the way like this as Trolls and don't even take the effort of answering those. Cor Show quote "RobinS" <RobinS@NoSpam.yah.none> schreef in bericht news:0o2dnVkVqZd_mibYnZ2dnUVZ_sudnZ2d@comcast.com... > 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. > ----------------------------------- > "KAMAL" <kamal***@nannacomputers.com> wrote in message > news:O3JkkgdQHHA.1200@TK2MSFTNGP02.phx.gbl... >> Sir, >> >> 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. >> >> >> >> >> > > > I think of them as uninformed. If I see the same post in one or two .Net
newsgroups, it doesn't bother me as much as some idiot (like this one) who posts in all of them whether they are relevant or not. A lot of people apparently don't know any better. When I've posted here as long as you have, I will probably have a different point of view. ;-) I think that like me, you read most, if not all, of the more active dotnet newsgroups, and thus see the multi-posts. Robin S. -------------------------------------------- Show quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:ue0W2dsQHHA.4744@TK2MSFTNGP02.phx.gbl... > Robin, > > I see persons who post in the way like this as Trolls and don't even take > the effort of answering those. > > Cor > > "RobinS" <RobinS@NoSpam.yah.none> schreef in bericht > news:0o2dnVkVqZd_mibYnZ2dnUVZ_sudnZ2d@comcast.com... >> 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. >> ----------------------------------- >> "KAMAL" <kamal***@nannacomputers.com> wrote in message >> news:O3JkkgdQHHA.1200@TK2MSFTNGP02.phx.gbl... >>> Sir, >>> >>> 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. >>> >>> >>> >>> >>> >> >> >> > > |
|||||||||||||||||||||||