<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Hi Peter, in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Send-CTRL-ALT-END-over-RDP/m-p/69482#M22087</link>
    <description>Hi Peter,
The RDP windows was attached and activated to so is in focus. 
-Tom</description>
    <pubDate>Tue, 10 May 2016 13:06:00 GMT</pubDate>
    <dc:creator>TomBlackburn1</dc:creator>
    <dc:date>2016-05-10T13:06:00Z</dc:date>
    <item>
      <title>Send CTRL+ALT+END over RDP</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Send-CTRL-ALT-END-over-RDP/m-p/69479#M22084</link>
      <description>Does anyone know a way of acheiving this?

So far i have the following code:

[DllImport("user32.dll", SetLastError = true)]
static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);

public const int VK_MENU = 0x12;
public const int VK_CONTROL = 0x11;
public const int VK_END = 0x23;
public const int KEYEVENTF_EXTENDEDKEY = 0x0001; 
public const int KEYEVENTF_KEYUP = 0x0002;

public static void ctrlAltEnd()
{
keybd_event(VK_MENU,0xb8,0 , 0); //Alt Press
keybd_event(VK_CONTROL,0x9d,0 , 0); // Ctrl Press
keybd_event(VK_END, 0x4f,0,0); //press end
keybd_event(VK_END, 0x4f,KEYEVENTF_KEYUP,0); //release end
keybd_event(VK_CONTROL,0x9d,KEYEVENTF_KEYUP,0); // Ctrl Release
keybd_event(VK_MENU,0xb8,KEYEVENTF_KEYUP,0); // Alt Release
}</description>
      <pubDate>Mon, 09 May 2016 16:40:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Send-CTRL-ALT-END-over-RDP/m-p/69479#M22084</guid>
      <dc:creator>TomBlackburn1</dc:creator>
      <dc:date>2016-05-09T16:40:00Z</dc:date>
    </item>
    <item>
      <title>I would usually use Global</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Send-CTRL-ALT-END-over-RDP/m-p/69480#M22085</link>
      <description>I would usually use Global Send Keys Event in a navigate stage instead. Using:
""{CTRL}""
But I'm guessing you started developing a code stage due to the fact that a navigate stage didn't work - but what exactly is the problem? - does it not compile?</description>
      <pubDate>Mon, 09 May 2016 17:17:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Send-CTRL-ALT-END-over-RDP/m-p/69480#M22085</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-09T17:17:00Z</dc:date>
    </item>
    <item>
      <title>Hi Timmorthorst,</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Send-CTRL-ALT-END-over-RDP/m-p/69481#M22086</link>
      <description>Hi Timmorthorst,
It compiles fine, but it doesn't sending the key strokes as expected (Nothing happens)
I've created a method that presses CTRL+ALT which works fine. I can then manually press the END button and it works. 
I've tried to use the method that presses CTRL+ALT, then use Global Send Key Events ""{END}"" before release CTRL+END, but this doesn't work either.
-Tom</description>
      <pubDate>Mon, 09 May 2016 17:55:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Send-CTRL-ALT-END-over-RDP/m-p/69481#M22086</guid>
      <dc:creator>TomBlackburn1</dc:creator>
      <dc:date>2016-05-09T17:55:00Z</dc:date>
    </item>
    <item>
      <title>Hi Peter,</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Send-CTRL-ALT-END-over-RDP/m-p/69482#M22087</link>
      <description>Hi Peter,
The RDP windows was attached and activated to so is in focus. 
-Tom</description>
      <pubDate>Tue, 10 May 2016 13:06:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Send-CTRL-ALT-END-over-RDP/m-p/69482#M22087</guid>
      <dc:creator>TomBlackburn1</dc:creator>
      <dc:date>2016-05-10T13:06:00Z</dc:date>
    </item>
    <item>
      <title>OK - I've figured it out:</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Send-CTRL-ALT-END-over-RDP/m-p/69483#M22088</link>
      <description>OK - I've figured it out:
public static void ctrlAltEnd(){
         keybd_event(VK_MENU, 0xb8, 0, 0); //Holds down the ALT key
         keybd_event(VK_CONTROL, 0x9d, 0, 0); //Holds down the CTRL key
         keybd_event(VK_END, 0x4f, KEYEVENTF_EXTENDEDKEY | 0, 0); //Holds down the END key
         keybd_event(VK_END, 0x4f, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0); //Releases the END key
         keybd_event(VK_CONTROL, 0x9d, KEYEVENTF_KEYUP, 0); //Releases the CTRL key
         keybd_event(VK_MENU, 0xb8, KEYEVENTF_KEYUP, 0); //Releases the ALT key
}</description>
      <pubDate>Tue, 10 May 2016 14:09:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Send-CTRL-ALT-END-over-RDP/m-p/69483#M22088</guid>
      <dc:creator>TomBlackburn1</dc:creator>
      <dc:date>2016-05-10T14:09:00Z</dc:date>
    </item>
    <item>
      <title>I think timmorthorst's answer</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Send-CTRL-ALT-END-over-RDP/m-p/69484#M22089</link>
      <description>I think timmorthorst's answer was the correct one.  Is there a reason you are implementing bespoke code rather than using the standard SendKey or SendKeyEvents actions already exposed by the Blue Prism navigate stage?</description>
      <pubDate>Thu, 12 May 2016 14:18:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Send-CTRL-ALT-END-over-RDP/m-p/69484#M22089</guid>
      <dc:creator>Denis__Dennehy</dc:creator>
      <dc:date>2016-05-12T14:18:00Z</dc:date>
    </item>
    <item>
      <title>Hi Denis,</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Send-CTRL-ALT-END-over-RDP/m-p/69485#M22090</link>
      <description>Hi Denis,
A few reasons really; the main being that the standard SendKeyEvents did not work over and RDP connection to a terminal server and I wasn't able to figure out why.
The second is that this bespoke code solution was developed as a quick extension to of one of our Virtual Key utility object. 
The initial purpose of this object was to hold a particular key down, then carry on processing, then release the key (e.g hold down shift, press down button until certain image is shown in a region, then release shift). The other purpose was that it allows me to drag and drop via Surface Automation by sending virtual mouse clicks down, setting a new cursor position and releasing the mouse button. As far as I am aware this functionality not available natively within Blue Prism.
I am however curious to find out if other users require this level of functionality or if Blue Prism is looking to implement into the product. I always find myself in need of these type of actions on various projects.
- Tom.</description>
      <pubDate>Thu, 12 May 2016 15:31:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Send-CTRL-ALT-END-over-RDP/m-p/69485#M22090</guid>
      <dc:creator>TomBlackburn1</dc:creator>
      <dc:date>2016-05-12T15:31:00Z</dc:date>
    </item>
  </channel>
</rss>

