-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopen_arcmap.py
34 lines (25 loc) · 927 Bytes
/
open_arcmap.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# --> open_arcmap.py <--
# A set of clicks and keystrokes that opens arcmap and signs into AGOL with credentials privided in the form of command line arguments.
# Uses plaintext for passwords, use at your own risk.
import pyautogui
from time import sleep
import sys
def open_and_login(username, password):
# Pause for one second in between movements
pyautogui.PAUSE = 1
# open arcmap
pyautogui.click(25, 1060)
pyautogui.typewrite("arcmap")
pyautogui.click(50, 500)
sleep(20)
# close out of the screen that prompts you to open a file, go to file > sign in.
pyautogui.click(1200, 700)
pyautogui.click(20, 25)
pyautogui.click(20, 225)
# put in username and password and click "enter"
pyautogui.typewrite(username)
pyautogui.typewrite(['tab'])
pyautogui.typewrite(password)
pyautogui.typewrite(['enter'])
def main():
open_and_login(sys.argv[1], sys.argv)