By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,501 Members | 1,678 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,501 IT Pros & Developers. It's quick & easy.

Sendkeys.send key combinations for 'Alt T'

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.