Sign in to follow this  
Followers 0
autoiscool

howto toggle remote desktop window?

9 posts in this topic

Hello script people

Frequently times i have to switch between a remote desktop and i found away to minimize

the open maximized window connection using the folowing keyboard shortcuts.

The ctrlbreak part does not seems to working? should be CTRL+ALT+BREAK

Is there another way to achieve minimizing and maximizing a remote desktop connection using autoit?

regards dennis

;Send("^v")                ;CTRL+V
Send("{LALT}{CTRLBREAK}")  ;Toggles the Terminal Services client display from window to full screen
Send("{LALT}{SPACE}n")  ;Minimize window

Share this post


Link to post
Share on other sites



I am using window xp to make a connection

%SystemRoot%\system32\mstsc.exe

Share this post


Link to post
Share on other sites

This code works, however just in one "direction". You can change the Remote Desktop to full screen, however you cannot change it back, as it seems the registered hotkeys are not reconized any longer. The send command works in general, even in full screen mode. Just uncomment the two lines.

So, what can you do. Actually I don't know, as I did not spend much time to investigate. I guess there should be a way to keep Hotkeys enabled even if the Remote Desktop run in full screen mode. Try to figure that out and you'll have what you want.

HotKeySet("!t","_Toggle")
HotKeySet("!x","_Exit")

Func _Toggle ()
    send("^!{CTRLBREAK}")
    ;sleep(2000)
    ;send("^!{CTRLBREAK}")
EndFunc

Func _Exit ()
    exit
EndFunc

while 1
    sleep(500)  
WEnd

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

I got this from the remote file:

To configure Windows shortcut keys in a session

In the Remote Desktop Connection window, click Options.

On the Local Resources tab, under Keyboard, click the Apply Windows key combinations list, and then click the option you want. This option affects the behavior of Windows shortcut key combinations (such as ALT+TAB) when you are connected to a remote computer.

To configure your connection so that Windows shortcut keys always apply to your local desktop, choose On the local computer.

To configure your connection so that all Windows shortcut keys always apply to the desktop of the remote computer, choose On the remote computer.

To configure your connection so that Windows shortcut keys apply to the remote computer only when the connection is in full screen mode, choose In full screen mode only.

Click Connect.

Notes

To open Remote Desktop Connection, click Start, point to Programs or All Programs, point to Accessories, point to Communications, and then click Remote Desktop Connection.

When you click Connect, the information you have entered in Options becomes the default setting for all Remote Desktop connections and is saved in a file called Default.rdp. To create connections with different or connection-specific options, see Save your connection settings to a file.

CTRL+ALT+DEL always defaults to the local desktop.

If you use a smart card with a portable computer, you must use CTRL+ALT+END to log on to a remote computer, instead of CTRL+ALT+DEL.

To toggle between full screen and non-full screen mode during a Terminal Services session, use CTRL+ALT+BREAK. For a list of Terminal server-specific shortcut keys, see Use Terminal server shortcut keys.

Related Topics

Use Terminal server shortcut keys

Save your connection settings to a file

Share this post


Link to post
Share on other sites

First thanks for the great explanation i learned a bit more about remote desktop :whistle:

To toggle between full screen and non-full screen mode during a Terminal Services session, use CTRL+ALT+BREAK.

This what i actually intend to do jumping back to the local computer using one single keypress

calling the toggleremote.exe for instance. (Now i still have to click the tab - above locating above in the screen)

send("^!{CTRLBREAK}")

or

send("!{CTRLBREAK}")

i have run this directly from the remote desktop computer but the window doesn't get toggeld it stayed maximumzized when i press ctrl+alt+break at the keyboard it works.

i think it has to do something with CTRLBREAK because this sequence does not work

holding ALT -> holing BREAK -> press ctrl

i think ctrlbreak first sends break followed by ctrl ;)

Share this post


Link to post
Share on other sites

I did notice the window info tool would not work right on the remote screen....In that you could not freeze it to capture the settings. Not sure on that one.

Thanks i gonna try if can find another workaround.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0