Actually it’s done.:D:D I want to rewrite the plugins that I have right now though and eliminate the help command. So you would have “time help” instead of “help time”. Plus I wanted to go through and clean things up a bit.
property plugin : "PandoraBoy" -- Replace 'missing' with exact name of plugin. No spaces. Example if I saved this plugin as time.scpt I would put the word time in place of "missing."
on AAIR(theMessage, staticCommand, dynamicCommand, weatherLoc)
try
if dynamicCommand is "/?" then -- This is for returning extra information about plugin.
set theResponse to plugin & " [next station, previous station, next track, pp, thumbs]
Allows control of PandoraBoy.
PandoraBoy Options:
next station switches to next station
pretious station switches to previous station
next track switches to next track
pp play/pause
thumbs [up,down] rate up or down (PandoraBoy thumbs up)"
else if dynamicCommand is "next station" then
tell application "PandoraBoy" to set current station to next station
set theResponse to "Next station selected."
else if dynamicCommand is "previous station" then
tell application "PandoraBoy" to set current station to previous station
set theResponse to "Previous station selected."
else if dynamicCommand is "next track" then
tell application "PandoraBoy" to next track
set theResponse to "Playing next track."
else if dynamicCommand is "pp" then
tell application "PandoraBoy" to playpause
set theResponse to "PandoraBoy Play/Pause."
else if dynamicCommand is "thumbs up" then
tell application "PandoraBoy" to thumbs up
set theResponse to "Track rated thumbs up!"
else if dynamicCommand is "thumbs down" then
tell application "PandoraBoy" to thumbs down
set theResponse to "Track rated thumbs down!"
else
set theResponse to "Unknown command " & dynamicCommand & "."
end if
on error error_message
set theResponse to (plugin & " Control. " & error_message)
end try
return theResponse
end AAIR
(*add additional handlers here if needed*)
set screenShotFile to (path to desktop as text) & "screenshot_" & (do shell script "date +%Y%m%d%H%M%S") & ".png"
do shell script "screencapture -m " & quoted form of POSIX path of screenShotFile
tell application "iChat"
send file screenShotFile to theChat
end tell
delay 6
tell application "Finder"
delete screenShotFile
end tell
The 6 second delay is enough for me to accept the transfer. How do I make this into a plugin since I can only return text, not images?
Sorry, this might not really help and Im just stabbing in the dark. (REEEAAAALLLLYYYYYY SICK) try to return the image. You have the location saved in screenshotfile. If no one helps when I am better (6-8 days is what I am told) I will give you a hand.