Created
February 26, 2019 13:55
-
-
Save wesleyit/78c99272179cc8d68cbfbe4456ca6455 to your computer and use it in GitHub Desktop.
This python script will call a PCOIP client window and give all necessary parameters for a connection.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip install pyuserinput | |
import subprocess | |
import sys | |
import time | |
import pykeyboard | |
if len(sys.argv) > 1: | |
ubiqui = sys.argv[1] | |
else: | |
ubiqui = input('Touch the ubiqui device: ') | |
user = 'youruser' | |
password = 'YourVerySecurePassword' | |
pin = 'YourP1n' | |
workspace = 'RegCodeOfYourWorkSpace' | |
k = pykeyboard.PyKeyboard() | |
TAB = k.tab_key | |
ENTER = k.enter_key | |
subprocess.Popen(['pcoip-client', '-h', workspace]) | |
time.sleep(3) | |
k.type_string(user) | |
k.tap_key(TAB) | |
k.type_string(password) | |
k.tap_key(TAB) | |
k.type_string(pin) | |
k.type_string(ubiqui) | |
k.tap_key(ENTER) | |
time.sleep(5) | |
k.type_string(password) | |
k.tap_key(ENTER) | |
print('Finished!') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment