[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Send Character to photoshop

Posted on 2006-07-07
7
Medium Priority
?
268 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month19 days, 22 hours left to enroll

873 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