G
GrantS
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();
}
}
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();
}
}