473,739 Members | 4,265 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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********@rog ers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #1
5 2727
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********@rog ers.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********@rog ers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 18 '05 #2
"WizyDig" <so*****@micros oft.com> wrote in
news:u2******** ******@TK2MSFTN GP10.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********@rog ers.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********@rog ers.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********@rog ers.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#faHjA2EH A.2156
@TK2MSFTNGP10.p hx.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********@rog ers.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.2003 FEB.1033/winui/winui/windowsuserinte rf
ace/dataexchange/dynamicdataexch angemanagementl ibrary/dynamicdataexch angeman
agementreferenc e/dynamicdataexch angemanagementf unctions/ddeinitialize.h tm

"Lucas Tam" <RE********@rog ers.com> wrote in message
news:Xn******** *************** ****@140.99.99. 130...
"WizyDig" <so*****@micros oft.com> wrote in
news:u2******** ******@TK2MSFTN GP10.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********@rog ers.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
3303
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
4410
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 image) into the body of the email. Any help would be greatly appreciated. -- Nate Heaton
5
4854
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, redirect a client to another page. In other way, a client will be able to send messages to another client, throw the server. These are the first funcionalities.
0
1753
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 emulator. Unfortunately, all the attempts I have made so far have failed. It looks like the emulator is using some extremely low-level function to read keystrokes and I cannot get in before it. So far, I have tried the following functions from...
9
77440
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
2068
by: Blurbint | last post by:
is there someway to etc, send keys to another running application with vb 6.0?
4
2484
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 m_Token = null in order to destroy the session token when the user logs out. However, I'm finding that setting class instance to null results in no header being sent back to the client, with the result that the client actually remains with an...
3
2893
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 from textbox. when i press pagedown/pageup key (in textbox), i need to send that key to dgw, to move the data up/down, but, without loss the focus in textbox. i already studied the sendkeys.send, but i dont know how to send a key to control, the...
4
1955
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 Shailendra Deshpande
0
8792
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9479
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9266
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9209
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8215
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6054
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3280
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.