simulate mouse clicks, drags, drops in a external application?

N

nhmark64

Hi,

What is the best way to simulate mouse clicks, drags, and drops in
a external application (started by Process.Start)?

Thanks,
Mark
 
D

Derrick Coetzee [MSFT]

What is the best way to simulate mouse clicks, drags, and drops in
a external application (started by Process.Start)?

Hi Mark. I'll start by noting that you should consider all other possible
options before this one - mouse automation is extremely error-prone and
sensitive to UI changes, even things as simple as dynamic menus or toolbar
customization. The general exception is when you're actually doing some kind
of UI testing for your own application.

To answer the question, there are various ways of doing this, but most
involve invoking the underlying Win32 API to send Windows messages to the
external application. You can read more about the details at this older
thread from this newsgroup:

mouse_event() in C#? How do I simulate a mouse click?
http://groups.google.com/group/micr...csharp/browse_thread/thread/b49cac9b18943e5c/
 
N

nhmark64

I need to take scanned hand-written signatures output from
Photoshop (for now i am using a BMP) and turn it into a PCL5 softfont
(it's the only way to be fast enough for the 160 page/minute printer).

http://www.fontlab.com/Font-tools/ScanFont/ turns the BMPs into a
TrueType font, that is one place where i need the clicks and drag and
drops.

I add the font to Windows.

Word sends the font characters to a LaserJet 4 printer driver that
has been set to print to disk - office automation to start a VBA macro

I wrote a small program to fish out the softfont from the PCL5 print
stream.

My customer wants to remove me from dealing with their signatures,
they want as automated as possible procedure for adding/replacing new
signatures. I don't know of any other way of going from Photoshop to
a PCL5 softfont.

Thanks for the link!

Mark
 
D

Derrick Coetzee [MSFT]

I need to take scanned hand-written signatures output from
Photoshop (for now i am using a BMP) and turn it into a PCL5 softfont
http://www.fontlab.com/Font-tools/ScanFont/ turns the BMPs into a
TrueType font, that is one place where i need the clicks and drag and
drops.

I see now. If you're interested in reusing their technology, the sort of
automation you describe is one way of doing it. However, it'd probably be
much easier to do this automation in an automation scripting language rather
than C#. This Google search lists some of the best ones:

http://www.google.com/search?hl=en&lr=&rls=GGLG,GGLG:2005-26,GGLG:en&q=windows+automation+scripting

Alternatively, you might contact ScanFont's people to talk about wrapping
the functionality you need in a library. You'd have to pay them more of
course, but it might save you a lot of grief. Good luck.
 
N

nhmark64

Thanks for tips!
Mark



I see now. If you're interested in reusing their technology, the sort of
automation you describe is one way of doing it. However, it'd probably be
much easier to do this automation in an automation scripting language rather
than C#. This Google search lists some of the best ones:

http://www.google.com/search?hl=en&lr=&rls=GGLG,GGLG:2005-26,GGLG:en&q=windows+automation+scripting

Alternatively, you might contact ScanFont's people to talk about wrapping
the functionality you need in a library. You'd have to pay them more of
course, but it might save you a lot of grief. Good luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top