473,406 Members | 2,343 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,406 software developers and data experts.

Sendkeys.send key combinations for 'Alt T'

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 a
Winforms C# application.

I have tried a number of code segment combinations for ALT T
combination without success. The combinations might be correct but it
might be failing for some other reason.

My Attempts:
System.Windows.Forms.SendKeys.Send("{%}+T");

System.Windows.Forms.SendKeys.Send("{%}"+"T");

System.Windows.Forms.SendKeys.Send("{%}"+"(T)");

Is any of these correct or is my syntax incorrect?

My Routines code for where my system has been notified that someone
wants to send me a file:

public void InvitedToReceiveFileTransfer (Messenger.IMsgrUser User,
int intVal , string fileName, int intVal2, ref bool IsBool)
{//Method to handle the Messenger event fired when reviewer invited to
receive an event.

if (fileName.ToString ()== txtNHI.Text + ".zip")
{
IsBool = false;
msn = new MessengerAPI.MessengerNativeClass();
MessengerAPI.IMessengerConversationWnd InstmessengerWindow =null;
InstmessengerWindow = (MessengerAPI.IMessengerConversationWnd)
msn.InstantMessage(m_user.EmailAddress) ;
//might need to get a handle on the messenger conversation window and
set focus to the conversation window first [Not required when
'Sending' files].

System.Windows.Forms.SendKeys.Send("{%}+T"); //CODE FAILS HERE AND
the Chat window appears (Which I am trying to prevent).
//System.Windows.Forms.SendKeys.Send("{%}"+"T");
//System.Windows.Forms.SendKeys.Send("{%}"+"(T)");
InstmessengerWindow.Close();
}
}

-------------------------------------------------------
Hope someone can help.
Cheers
Grant
Nov 16 '05 #1
1 27136
On 7 Dec 2004 11:40:54 -0800, GrantS wrote:
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 a
Winforms C# application.

I have tried a number of code segment combinations for ALT T
combination without success. The combinations might be correct but it
might be failing for some other reason.

My Attempts:
System.Windows.Forms.SendKeys.Send("{%}+T");

System.Windows.Forms.SendKeys.Send("{%}"+"T");

System.Windows.Forms.SendKeys.Send("{%}"+"(T)");


You would use "%T". Placing the % in {} tells SendKeys to send the actual
% key rather than alt.
--
Tom Porterfield
Nov 16 '05 #2

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

Similar topics

0
by: David Kanter | last post by:
Hello, I have a question regarding SendKeys(). I am working on a small VB .Net script that manipulates/automates programs through SendKeys(). Unfortunately, I have run into several problems. ...
5
by: Mike | last post by:
I want to be able to open the printer popup screen while a report is on the screen. I would like to have a button on one of the menus that sends the "control P" combination. In the past, I...
5
by: Wayne Gibson | last post by:
Hi, Was wondering if somebody could help.. I'm trying to use Sendkeys on a Windows forms. I have entered the following command to simulate a CTRL+ALT+1.. ...
2
by: Gary | last post by:
I am trying to use the "System.Windows.Forms.SendKeys" class for triggering the Ctrl+P key. Syntax: System.Windows.Forms.SendKeys.Send("^(P)"); This is not working ..what could be the...
6
by: Gary | last post by:
Hi, I am trying to use the "System.Windows.Forms.SendKeys" class for triggering the Ctrl+P key. Syntax: System.Windows.Forms.SendKeys.Send("^(P)") This is not working ..what could be the...
2
by: David Kanter | last post by:
Hi, I am relatively inexperienced with VB.Net, but I am familiar with many concepts from programming; I have some basic level of competence with C/C++ and Perl, but I just started using VB this...
1
by: Max | last post by:
Hi, I am trying to paste text in a console window using SendKeys and the Clipboard (I am using Windows XP SP2 and .NET 1.1). Here is the code (I have a form with two edit boxes, DosTitle in...
5
by: Daniel N. | last post by:
I am trying have an application hold down the Shift key (+) and the Alt key (%) simultaneously for a given period of time, or until a condition is met. I tried this but it doesn't work:...
0
DOSrelic
by: DOSrelic | last post by:
I have read this page http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys(VS.71).aspx but try as I might I cannot figure out how to do it. I tried many combinations but none of...
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: 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...
0
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
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,...
0
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...

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.