Skip to content

Instantly share code, notes, and snippets.

@raldred
Created October 5, 2010 16:28
Show Gist options
  • Save raldred/611841 to your computer and use it in GitHub Desktop.
Save raldred/611841 to your computer and use it in GitHub Desktop.
-- ssh-to-test-slaves.applescript
--
-- Created by Rob Aldred on 2010-05-21.
-- Copyright (c) 2010 . All rights reserved.
--
-- Usage:
-- osascript -ss ssh-to-slaves.applescript
on run
tell application "AppleScript Runner"
-- set theUser to "hudson"
--
-- display dialog "Please enter a slave user:" default answer theUser
-- set theUser to text returned of result
tell application "System Events"
tell process "Finder"
keystroke "6" using control down --switches to space 6
end tell
end tell
tell application "Terminal"
do script "ssh test-slave1 -t 'tail -f /var/ramdisk/testjour.log'; ssh test-slave1"
set winBounds to bounds of front window
set height to (item 4 of winBounds) - (item 2 of winBounds)
set bounds of front window to {0, 0 + height, 900, 350 + height}
do script "ssh test-slave2 -t 'tail -f /var/ramdisk/testjour.log'; ssh test-slave2"
set winBounds to bounds of front window
set height to (item 4 of winBounds) - (item 2 of winBounds)
set bounds of front window to {900, 0 + height, 1800, 350 + height}
do script "ssh test-slave3 -t 'tail -f /var/ramdisk/testjour.log'; ssh test-slave3"
set winBounds to bounds of front window
set height to (item 4 of winBounds) - (item 2 of winBounds)
set bounds of front window to {0, 362 + height, 900, 700 + height}
do script "ssh test-slave4 -t 'tail -f /var/ramdisk/testjour.log'; ssh test-slave4"
set winBounds to bounds of front window
set height to (item 4 of winBounds) - (item 2 of winBounds)
set bounds of front window to {900, 362 + height, 1800, 700 + height}
do script "ssh test-slave5 -t 'tail -f /var/ramdisk/testjour.log'; ssh test-slave5"
set winBounds to bounds of front window
set height to (item 4 of winBounds) - (item 2 of winBounds)
set bounds of front window to {0, 707 + height, 900, 1050 + height}
do script "ssh test-slave6 -t 'tail -f /var/ramdisk/testjour.log'; ssh test-slave6"
set winBounds to bounds of front window
set height to (item 4 of winBounds) - (item 2 of winBounds)
set bounds of front window to {900, 707 + height, 1800, 1050 + height}
do script "ssh test-slave7 -t 'tail -f /var/ramdisk/testjour.log'; ssh test-slave7"
set winBounds to bounds of front window
set height to (item 4 of winBounds) - (item 2 of winBounds)
set bounds of front window to {-1800, 0 + height, -901, 350 + height}
do script "ssh test-slave8 -t 'tail -f /var/ramdisk/testjour.log'; ssh test-slave8"
set winBounds to bounds of front window
set height to (item 4 of winBounds) - (item 2 of winBounds)
set bounds of front window to {-900, 0 + height, 0, 350 + height}
do script "ssh test-slave9 -t 'tail -f /var/ramdisk/testjour.log'; ssh test-slave9"
set winBounds to bounds of front window
set height to (item 4 of winBounds) - (item 2 of winBounds)
set bounds of front window to {-1800, 350 + height, -901, 700 + height}
do script "ssh test-slave10 -t 'tail -f /var/ramdisk/testjour.log'; ssh test-slave10"
set winBounds to bounds of front window
set height to (item 4 of winBounds) - (item 2 of winBounds)
set bounds of front window to {-900, 350 + height, 0, 700 + height}
end tell
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment