Skip to content

Instantly share code, notes, and snippets.

@undees
Created February 3, 2010 21:07
Show Gist options
  • Save undees/294019 to your computer and use it in GitHub Desktop.
Save undees/294019 to your computer and use it in GitHub Desktop.
#!/bin/sh
curl --url http://localhost:50000 -d \
"<plist version=\"1.0\"> \
<dict> \
<key>command</key> \
<string>simulateTouch</string> \
<key>viewXPath</key> \
<string>//UIToolbarButton[1]</string> \
</dict> \
</plist>"
<plist version="1.0">
<array>
<dict>
<key>command</key>
<string>simulateTouch</string>
<key>viewXPath</key>
<string>//UIToolbarButton[1]</string>
</dict>
</array>
</plist>
require 'tagz'
command = Tagz.tagz do
plist_(:version => 1.0) do
dict_ do
key_ 'command'
string_ 'simulateTouch'
key_ 'viewXPath'
string_ '//UIToolbarButton[1]</string>'
end
end
end
Net::HTTP.post_quick \
'http://localhost:50000/', command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment