Solved

Send Character to photoshop

Posted on 2006-07-07
7
261 Views
Last Modified: 2013-12-03
hi
how i can send character code such as #132 or #186 ( no key code ) to other application ( Adobe Photoshop ) when user is in type mode?
0
Comment
Question by:mahdiparak
  • 3
  • 2
  • 2
7 Comments
 
LVL 11

Expert Comment

by:calinutz
ID: 17057763
0
 
LVL 11

Expert Comment

by:calinutz
ID: 17057779
0
 
LVL 1

Author Comment

by:mahdiparak
ID: 17059002
dear calinutz i have a problem yet.
this code only send key Code but i want Send Character code as Ascii. for example i use this

  SendMessage(h,WM_CHAR,112,0);

This Function Work in Notepad but not Work in Photoshop.

i want a Source Code For send Charachter Code as ascii not keyCode
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 10

Expert Comment

by:atul_parmar
ID: 17059525
var
 Key : char;
begin
  Key := #132
  SendMessage(h,WM_CHAR,Ord(Key),0);
end;
0
 
LVL 1

Author Comment

by:mahdiparak
ID: 17060869
dear Atul_Parmer thanks
but i say this code not work for send character to photoshop
0
 
LVL 10

Accepted Solution

by:
atul_parmar earned 500 total points
ID: 17070953
Yep, I think you need to attach with that process. e.g.

var
  hAdobe, Pid1, Pid2 : THandle;
  Key : char;
begin
  hAdobe := FindWindow(nil, PChar(AdobeTitle)); // get the handle of adobe photoshop
  if hAdobe = 0 then Exit;
  Pid1 := GetWindowThreadProcessId(hAdobe, nil);
  Pid2 := GetCurrentThreadId;
  AttachThreadInput(Pid1, Pid2, True);
  Key := #132;
  SendMessage(h,WM_CHAR,Ord(Key),0);
end;

0
 
LVL 1

Author Comment

by:mahdiparak
ID: 17109803
very thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Run video youtube webbrowse 10 58
select query - oracle 16 95
Delphi inherited method 6 63
How do I add a client SSL certificate to a SOAP client in Rad Studio Delphi? 2 47
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now