473,508 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 27164
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
1446
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
6263
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
8739
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
6231
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
30988
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
11588
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
9353
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
14797
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
1531
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
7123
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
7326
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,...
0
7383
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
7046
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...
1
5053
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
4707
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...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1557
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 ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.