-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsync_bento.applescript
53 lines (33 loc) · 1.32 KB
/
sync_bento.applescript
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
# Script Name : sync_bento
# Author : Craig Richards
# Created : 13th February 2013
# Last Modified : 21st June 2013
# Version : 1.1
# Modifications : 1.1 - 21/06/13 - CR - added a coouple of lines for it to hide bento, wait while I sync then close bento and switch off the wifi again
# Description : This turns on my Airport Card, then loads bento and enters my password
-- Turn the wifi airport card on
do shell script "networksetup -setairportpower en1 on"
--Set the Variable to hold my Bento Password, with the password it didn't seem to like the Capital M so I have put it in twice as it ignores the first one
set pword to "password"
--open Bento
tell application "Bento" to activate
--Sleep while the application loads
delay 5
--Then Enter the password and tab through to the Submit button and click on it
tell application "System Events"
keystroke pword
keystroke tab
keystroke tab
keystroke tab
keystroke space
end tell
-- Hide the Bento Screen - 1.1
tell application "System Events"
set visible of every process whose visible is true and name is "Bento" to false
end tell
-- Wait for one minute - 1.1
delay 60
-- Quit Bento -1.1
tell application "Bento" to quit
-- Turn the wifi off - 1.1
do shell script "networksetup -setairportpower en1 off"