Skip to content

Commit

Permalink
fire in the hole! CI again!
Browse files Browse the repository at this point in the history
  • Loading branch information
llafuente committed Jan 13, 2017
1 parent d1261f8 commit 153a7b4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ install:

script:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then ./Scripts/ci-osx-test.sh; fi;
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then ./Scripts/ci-linux-test.sh; fi;
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./Scripts/ci-linux-test.sh; fi;
2 changes: 2 additions & 0 deletions Scripts/ci-linux-test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

set -ex

/opt/Unity/Editor/Unity \
-batchmode \
-nographics \
Expand Down
28 changes: 26 additions & 2 deletions Scripts/unity.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,33 @@ SetBatchLines -1

Macro1:
Run, C:\Program Files\Unity\Editor\Unity.exe, , , PID
; swap places, App window in CI never get active...
Sleep, 5000
WinActivate, ahk_pid %PID%
; App window in CI never get active...

; method 1, activate by name
SetTitleMatchMode 2
WinActivate Unity, , 2
if ErrorLevel <> 0
{
; method 2, activate by PID
WinActivate, ahk_pid %PID%, , 2
if ErrorLevel <> 0
{
; method 3, activate last
Send !{ESC}
WinActivate, ahk_pid %PID%, , 2
if ErrorLevel <> 0
{
; method 4, position in the center of the screen and click
CoordMode, Mouse, Screen
;MouseMove, (A_ScreenWidth / 2), (A_ScreenHeight / 2)
Click, (A_ScreenWidth / 2), (A_ScreenHeight / 2)
}
}
}


SetTitleMatchMode 1
Sleep, 1000
WinWaitActive, ahk_pid %PID%
Sleep, 2500
Expand Down

0 comments on commit 153a7b4

Please sign in to comment.