473,509 Members | 2,963 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I send ALT + A to a window?

Hi Gang,
I am trying to accomplish something that should be terribly simple. I just
want to send ALT+A to another window. What SendMessage Parameters should I
send?
Thanks,
Christian Blackburn
Nov 20 '05 #1
6 9325
have you looked at SendKeys?
per MSDN "Provides methods for sending keystrokes to an application"

AFAIK it send the strokes to the active application though

http://msdn.microsoft.com/library/de...classtopic.asp

HTH
Rahul
"Christian Blackburn" <Christian_Blackburn@Damn@Sp**@Hotmail.com> wrote in
message news:OL**************@TK2MSFTNGP11.phx.gbl...
Hi Gang,
I am trying to accomplish something that should be terribly simple. I just want to send ALT+A to another window. What SendMessage Parameters should I send?
Thanks,
Christian Blackburn

Nov 20 '05 #2
* "Christian Blackburn" <Christian_Blackburn@Damn@Sp**@Hotmail.com> scripsit:
I am trying to accomplish something that should be terribly simple. I just
want to send ALT+A to another window. What SendMessage Parameters should I
send?


Activate the application with 'AppActivate', then you can use
'SendKeys.Send("%A")' to send the combination.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #3
Hi Guys,
Actually SendKeys is a sloppy and risky way of doing automation. There's
nothing to keep me from clicking on some other form and having SendKeys
deliver to the wrong destination. That's why I was trying to use
SendMessage.
Thanks all the same though,
Christian Blackburn

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bo*************@ID-208219.news.uni-berlin.de...
* "Christian Blackburn" <Christian_Blackburn@Damn@Sp**@Hotmail.com>

scripsit:
I am trying to accomplish something that should be terribly simple. I just want to send ALT+A to another window. What SendMessage Parameters should I send?


Activate the application with 'AppActivate', then you can use
'SendKeys.Send("%A")' to send the combination.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>

Nov 20 '05 #4
"Christian Blackburn" <Ch*****************@Damn.Spam@Hotmail.com>
schrieb
Hi Guys,
Actually SendKeys is a sloppy and risky way of doing automation.
There's nothing to keep me from clicking on some other form and
having SendKeys deliver to the wrong destination.


I tolly agree.
--
Armin

Nov 20 '05 #5
Hi Armin,
They should really add the window handle, caption, and or classname as
optional parameters.
Cheers,
Christian Blackburn

"Armin Zingler" <az*******@freenet.de> wrote in message
news:O4**************@TK2MSFTNGP10.phx.gbl...
"Christian Blackburn" <Ch*****************@Damn.Spam@Hotmail.com>
schrieb
Hi Guys,
Actually SendKeys is a sloppy and risky way of doing automation.
There's nothing to keep me from clicking on some other form and
having SendKeys deliver to the wrong destination.


I tolly agree.
--
Armin

Nov 20 '05 #6
Hi Gang,
An Inno Setup (www.InnoSetup.com) programmer told me about this kick ass
open-source application called AutoIt. I will be learning that real soon
here for fun. If you'd like to check it out you can download a copy here
http://www.hiddensoft.com/AutoIt/. Be sure to take a look at the sample
scripts. I looked over the scripts and the syntax is simple and totally
doable. Since version 2 doesn't come with an IDE you might want to take a
look at http://www.lkei.com/products/scriptwriter.asp. Version 3 now in
beta might though.
Cheers,
Christian Blackburn

"Armin Zingler" <az*******@freenet.de> wrote in message
news:O4**************@TK2MSFTNGP10.phx.gbl...
"Christian Blackburn" <Ch*****************@Damn.Spam@Hotmail.com>
schrieb
Hi Guys,
Actually SendKeys is a sloppy and risky way of doing automation.
There's nothing to keep me from clicking on some other form and
having SendKeys deliver to the wrong destination.


I tolly agree.
--
Armin

Nov 20 '05 #7

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

Similar topics

10
32599
by: BadOmen | last post by:
I want my program to send a mouse click to the window at the current mouse position, how do I do that? Example: I have my mouse over a button in Word and then my program is sending the left...
0
9857
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
9
10185
by: Etienne Charland | last post by:
Hi, there is an application running on a remote desktop (under Citrix ICA, but the same problem applies for RDC or PC Anywhere). Now, I want to send keys to the remote application from a local app....
15
3271
by: Steve Horrillo | last post by:
I can't figure out why this script won't insert the subject in the email and why can't I control the font and size being used? I'm not sure where to post this. Let me know where if this is OT. ...
6
2472
by: Usman | last post by:
Hi I have a window service written in C#. I have another application that requires a lengthy process to be performed like taking backup. How can I make this lengthy process be performed by...
1
27165
by: GrantS | last post by:
I need to use a sendkeys key combination to automate the "accept files" that a remote user wants to send to me via Windows messenger. I am using automation to work with Windows Messenger client in...
6
11125
by: harvie wang | last post by:
Hi, How to send a message to every window(include child window), I use SendMessage ,but It can't do that. class frmA { public const int WM_test = 0x400 + 1; protected override void...
2
2784
by: iloveprincess | last post by:
Hi, I'm developing windows application using VB.Net 2005. I would like to send 'save' message using 'SendMessage' API to the excel appication. I've already got a handle of the excel window with...
1
1427
by: kojy | last post by:
Hi, I have .ssi window with button that open new window like that: OpenWindow =...
3
99954
digicrowd
by: digicrowd | last post by:
http://bytes.com/images/howtos/applemail_sig_icon.jpg You can make your emails fancy in Mail.app by using Rich Text formatting or even included Stationery. But, a simple way to send your own HTML...
0
7234
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
7136
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...
0
7412
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...
1
7069
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...
0
7505
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...
0
5652
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,...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3216
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1570
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 ...

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.