Created
October 10, 2012 20:16
-
-
Save lacostej/3868129 to your computer and use it in GitHub Desktop.
Script Application loader to send a bundle (draft)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/osascript | |
# a applescript app to use Application Loader to send the specified bundle to the first eligible | |
# application in state waiting for upload to use carefully :) | |
# contains a few delays because of VNC incurred delays | |
on run argv | |
set filepath to item 1 of argv | |
activate application "Application Loader" | |
tell application "System Events" | |
tell process "Application Loader" | |
tell radio group 1 of window 1 | |
click button "Deliver Your App" | |
delay 1 | |
end tell | |
tell window 1 | |
if (exists static text "No eligible applications were found.") is true then | |
click button "Cancel" | |
return | |
end | |
tell pop up button 1 | |
delay 1 | |
key code 49 | |
# keystroke (ASCII character 30) | |
keystroke (ASCII character 12) | |
keystroke return | |
end tell | |
click button "Next" | |
delay 1 | |
click button "Choose..." | |
tell application "System Events" | |
keystroke "g" using {shift down, command down} | |
keystroke filepath | |
delay 3 | |
keystroke return | |
delay 3 | |
keystroke return | |
end tell | |
delay 2 | |
click button "Send" | |
# we should wait until text changes or button appears? | |
delay 300 | |
click button "Next" | |
click button "Done" | |
end tell | |
end tell | |
end tell | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# script to allow scripting apple gui from the command line | |
# | |
#http://hints.macworld.com/article.php?story=20060203225241914 | |
# | |
sudo sh -c "/bin/echo -n \"a\" > /private/var/db/.AccessibilityAPIEnabled" | |
sudo chmod 444 /private/var/db/.AccessibilityAPIEnabled |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is iTMSTransporter for that :-)