-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-unity.au3
60 lines (43 loc) · 1.38 KB
/
install-unity.au3
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.14.5
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
#include <AutoItConstants.au3>
#include <ScreenCapture.au3>
; Script Start - Add your code below here
Run("C:\Program Files\Unity\Editor\Unity.exe")
; Wait for Unity to Start
WinWaitActive("[Chrome_WidgetWin_0]", "", 60)
; Give Unity some time to load
Sleep(15 * 1000)
; Get the position of the Unity Window
$unityPos = WinGetPos("[Active]")
; User name is selected by default
; **Send User Name**
; Advance to password
Send("{TAB}")
; Password is now selected
; **Send Password**
; Press Enter to advance to the next page
Send("{ENTER}")
; Wait for the next page to load
Sleep(15 * 1000)
; Click on the Free License
MouseMove($unityPos[0] + 700, $unityPos[1] + 300)
MouseClick($MOUSE_CLICK_LEFT)
; Click Next
MouseMove($unityPos[0] + 700, $unityPos[1] + 450)
MouseClick($MOUSE_CLICK_LEFT)
; Click on the bottom bullet point
MouseMove($unityPos[0] + 500, $unityPos[1] + 375)
MouseClick($MOUSE_CLICK_LEFT)
; Click Next
MouseMove($unityPos[0] + 700, $unityPos[1] + 425)
MouseClick($MOUSE_CLICK_LEFT)
; Wait for next page to load
Sleep(15 * 1000)
_ScreenCapture_Capture(@WorkingDir & "\GDIPlus_Image1.jpg")
; Close the Window
WinClose("[Active]")