Skip to content

Instantly share code, notes, and snippets.

@lacostej
Created October 10, 2012 20:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lacostej/3868129 to your computer and use it in GitHub Desktop.
Save lacostej/3868129 to your computer and use it in GitHub Desktop.
Script Application loader to send a bundle (draft)
#!/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
#!/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
@dperetti
Copy link

There is iTMSTransporter for that :-)

@maciekish
Copy link

@dperetti Actually, nope. iTMSTransporter won't upload apps, only metadata

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment