Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Send Keystrokes to Client Side Application

Reply
Thread Tools

Send Keystrokes to Client Side Application

 
 
Lucas Tam
Guest
Posts: n/a
 
      12-01-2004
Hi all,

Has anyone done this before? Send client side keystrokes to an application
from a webpapge? This maybe more of a Javascript question.


In short, I have an application on the client's desktop that needs to
communicate with an ASP.NET application. The only interface into the
application are keystrokes and DDE.

Is there anyway to raise client side keystrokes or DDE via javascript?
Perhaps the Win32 PostMessage function might work?

Or could a Winforms control hosted in IE work?


Any ideas?

--
Lucas Tam ((E-Mail Removed))
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
 
Reply With Quote
 
 
 
 
WizyDig
Guest
Posts: n/a
 
      12-01-2004
your problem is really capturing the key strokes on the web app. it will be
getting those into the program. You will have to get a handle to the window
the keystrokes need to be entered on. I would suggest going over to the
windows side and get help there on how to get wnhnd pointer. Once you have
your handle to the window you will need to walk the windows child stack to
find the text box you want the strokes entered in. Once you have that part
solve there are a number of ways you can caputure the keystrokes. DDE isn't
bad either it begins with DDEInitiated and the command would be given with
DDEExecute. It might actually be easier to use DDE than getting a window
handle. It depends on your skill set. I've done bothe the DDE and the
windows handle back in the day but's been awhile since I have needed to do
either.

- wiz


"Lucas Tam" <(E-Mail Removed)> wrote in message
news:Xns95B2AF5214AE0nntprogerscom@140.99.99.130.. .
> Hi all,
>
> Has anyone done this before? Send client side keystrokes to an application
> from a webpapge? This maybe more of a Javascript question.
>
>
> In short, I have an application on the client's desktop that needs to
> communicate with an ASP.NET application. The only interface into the
> application are keystrokes and DDE.
>
> Is there anyway to raise client side keystrokes or DDE via javascript?
> Perhaps the Win32 PostMessage function might work?
>
> Or could a Winforms control hosted in IE work?
>
>
> Any ideas?
>
> --
> Lucas Tam ((E-Mail Removed))
> Please delete "REMOVE" from the e-mail address when replying.
> http://members.ebay.com/aboutme/coolspot18/



 
Reply With Quote
 
 
 
 
Lucas Tam
Guest
Posts: n/a
 
      12-01-2004
"WizyDig" <(E-Mail Removed)> wrote in
news:u2I$AU$(E-Mail Removed):

> DDE isn't
> bad either it begins with DDEInitiated and the command would be given
> with DDEExecute. It might actually be easier to use DDE than getting
> a window handle. It depends on your skill set. I've done bothe the
> DDE and the windows handle back in the day but's been awhile since I
> have needed to do either.
>


From what I read DDE seems to have been taken out of .NET. And I'm not sure
how to instantiate a DDE Client through scripting.

Now that I think about this more, I might have to post this question in a
scripting group too.

--
Lucas Tam ((E-Mail Removed))
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      12-02-2004
it can not be done in native javascript (think of the security holes this
would allow). you will have to supply an active/x control to do the dde.

-- bruce (sqlwork.com)

"Lucas Tam" <(E-Mail Removed)> wrote in message
news:Xns95B2AF5214AE0nntprogerscom@140.99.99.130.. .
| Hi all,
|
| Has anyone done this before? Send client side keystrokes to an application
| from a webpapge? This maybe more of a Javascript question.
|
|
| In short, I have an application on the client's desktop that needs to
| communicate with an ASP.NET application. The only interface into the
| application are keystrokes and DDE.
|
| Is there anyway to raise client side keystrokes or DDE via javascript?
| Perhaps the Win32 PostMessage function might work?
|
| Or could a Winforms control hosted in IE work?
|
|
| Any ideas?
|
| --
| Lucas Tam ((E-Mail Removed))
| Please delete "REMOVE" from the e-mail address when replying.
| http://members.ebay.com/aboutme/coolspot18/


 
Reply With Quote
 
Lucas Tam
Guest
Posts: n/a
 
      12-02-2004
"bruce barker" <(E-Mail Removed)> wrote in news:u#faHjA2EHA.2156
@TK2MSFTNGP10.phx.gbl:

> it can not be done in native javascript (think of the security holes this
> would allow). you will have to supply an active/x control to do the dde.


I was digging through some posts on Google Groups... seems like Windows
Scripting Host can be used to send key strokes. I wrote a small sample
script it seemed to work OK - not very reliable tho (the keys are just
sent... and if there is anything blocking the receiving app, the keys will
be lost).

But it's a start...

--
Lucas Tam ((E-Mail Removed))
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
 
Reply With Quote
 
WizyDig
Guest
Posts: n/a
 
      12-02-2004
Here's the link to it in your integrated MSDN. It comes with the platform
SDK. DDE is the basis of OLE both are an integral parts of the OS.
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/winui/winui/windowsuserinterf
ace/dataexchange/dynamicdataexchangemanagementlibrary/dynamicdataexchangeman
agementreference/dynamicdataexchangemanagementfunctions/ddeinitialize.htm



"Lucas Tam" <(E-Mail Removed)> wrote in message
news:Xns95B2B5709C982nntprogerscom@140.99.99.130.. .
> "WizyDig" <(E-Mail Removed)> wrote in
> news:u2I$AU$(E-Mail Removed):
>
> > DDE isn't
> > bad either it begins with DDEInitiated and the command would be given
> > with DDEExecute. It might actually be easier to use DDE than getting
> > a window handle. It depends on your skill set. I've done bothe the
> > DDE and the windows handle back in the day but's been awhile since I
> > have needed to do either.
> >

>
> From what I read DDE seems to have been taken out of .NET. And I'm not

sure
> how to instantiate a DDE Client through scripting.
>
> Now that I think about this more, I might have to post this question in a
> scripting group too.
>
> --
> Lucas Tam ((E-Mail Removed))
> Please delete "REMOVE" from the e-mail address when replying.
> http://members.ebay.com/aboutme/coolspot18/



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Net::Telnet - How to send keystrokes like ESC Babu Raj Ruby 2 11-26-2009 08:46 PM
Send keystrokes to Firefox or Safari? Stedwick Ruby 8 12-25-2008 12:30 PM
USB device that can send keystrokes? Saqib Ali Computer Security 6 10-30-2008 05:52 PM
Trying to send keystrokes to NES emulator srinathava@gmail.com Python 0 12-01-2006 02:41 AM
How do I send keystrokes to a console window in Windows XP? GoogleGroups@garringer.net Python 6 07-20-2005 01:53 PM



Advertisments