473,288 Members | 1,693 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,288 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 27090
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: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.