473,386 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Send Keystrokes to Client Side Application

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 (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #1
5 2715
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" <RE********@rogers.com> wrote in message
news:Xn***************************@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 (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 18 '05 #2
"WizyDig" <so*****@microsoft.com> wrote in
news:u2**************@TK2MSFTNGP10.phx.gbl:
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 (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #3
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" <RE********@rogers.com> wrote in message
news:Xn***************************@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 (RE********@rogers.com)
| Please delete "REMOVE" from the e-mail address when replying.
| http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #4
"bruce barker" <no***********@safeco.com> 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 (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #5
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" <RE********@rogers.com> wrote in message
news:Xn***************************@140.99.99.130.. .
"WizyDig" <so*****@microsoft.com> wrote in
news:u2**************@TK2MSFTNGP10.phx.gbl:
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 (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: GoogleGroups | last post by:
How do I use Python to send keystrokes to a console window in Windows XP? Or perhaps there is an application that I can call to do this? Thank you for your help.
5
by: nate heaton | last post by:
I would like to do the following with C# in my asp.net app: Open the default email client of the user (just like a mailto: link would). Supply the subject line and put some HTML (including an...
5
by: zorhel | last post by:
Hi. My clients will be IE, Mozilla and Opera in a Windows and *nix OS. So, my web app need to, from a server, send messages to a specific client (browser), send messages for all clients,...
0
by: srinathava | last post by:
Hi, I am trying to send keystrokes to the NES emulator nester. The idea was to be able to use a standard NES controller whose "state" I can read in using Python and then conveying that to the...
9
by: Mahernoz | last post by:
Can i send an email from JavaScript? Is it possible? If yes please the code to send email using javascript...
5
by: Blurbint | last post by:
is there someway to etc, send keys to another running application with vb 6.0?
4
by: Joseph Geretz | last post by:
We use a Soap Header to pass a token class (m_Token) back and forth with authenticated session information. Given the following implementation for our Logout method, I vastly prefer to simply code...
3
by: =?Utf-8?B?QmVybmFyZG8gU2FsYXphciBuZXdi?= | last post by:
Hi everybody... i need help with this issue: i have a textbox control with the focus. at side, i have a datagridview control populated with some data. i need to control behavior of dgv control...
4
by: shailendra deshpande | last post by:
right now i have only pain html page.and i want to send email through it using javascript plz. anybody tell me how to send email from plain html page using javascript. thanks in advance ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.