SOLVED
I swear I’m going to get this right eventually.
This is the error I’m getting:
And this is my script.
property scriptLoc : missing value
property timeCommand : missing value
property externalIPCommand : missing value
property processCommand : missing value
property emailCommand : missing value
property GoogleCommand : missing value
property helpCommand : missing value
property iTunesCommand : missing value
property sayCommand : missing value
property volumeCommand : missing value
property weatherCommand : missing value
property WikiCommand : missing value
property activateCommand : missing value
property echoCommand : missing value
property killCommand : missing value
property sendCommand : missing value
property TinyURLCommand : missing value
property uptimeCommand : missing value
property creditsCommand : missing value
on run
set scriptLoc to ((path to home folder) & "Library:Scripts:iChat:Plugins:")
set timeCommand to load script file (scriptLoc & "time.scpt")
set externalIPCommand to load script file (scriptLoc & "external IP.scpt")
set processCommand to load script file (scriptLoc & "process.scpt")
set emailCommand to load script file (scriptLoc & "email.scpt")
set GoogleCommand to load script file (scriptLoc & "Google.scpt")
set helpCommand to load script file (scriptLoc & "help.scpt")
set iTunesCommand to load script file (scriptLoc & "iTunes.scpt")
set sayCommand to load script file (scriptLoc & "say.scpt")
set volumeCommand to load script file (scriptLoc & "volume.scpt")
set weatherCommand to load script file (scriptLoc & "weather.scpt")
set WikiCommand to load script file (scriptLoc & "Wiki.scpt")
set activateCommand to load script file (scriptLoc & "activate.scpt")
set echoCommand to load script file (scriptLoc & "echo.scpt")
set killCommand to load script file (scriptLoc & "kill.scpt")
set sendCommand to load script file (scriptLoc & "send.scpt")
set TinyURLCommand to load script file (scriptLoc & "TinyURL.scpt")
set uptimeCommand to load script file (scriptLoc & "uptime.scpt")
set creditsCommand to load script file (scriptLoc & "credits.scpt")
display dialog "Command to test: " default answer ""
set theMessage to the text returned of the result
set theResponse to load(theMessage)
display dialog theResponse
end run
on load(theMessage)
set staticCommand to text 1 thru ((offset of " " in theMessage) - 1) of theMessage
set dynamicCommand to text ((offset of " " in theMessage) + 1) thru -1 of theMessage
set theResponse to ""
if theMessage is "external IP" then
set theResponse to externalIPCommand's AAIR()
xa
else if staticCommand is "time" then
set theResponse to timeCommand's AAIR()
else if staticCommand is "process" then
set theResponse to processCommand's AAIR()
else if staticCommand is "uptime" then
set theResponse to uptimeCommand's AAIR()
else if staticCommand is "credits" then
set theResponse to creditsCommand's AAIR()
else if staticCommand is "email" then
set theResponse to emailCommand's AAIR(dynamicCommand)
else if staticCommand is "Google" then
set theResponse to GoogleCommand's AAIR(dynamicCommand)
else if staticCommand is "help" then
set theResponse to helpCommand's AAIR(dynamicCommand)
else if staticCommand is "iTunes" then
set theResponse to iTunesCommand's AAIR(dynamicCommand)
else if staticCommand is "say" then
set theResponse to sayCommand's AAIR(dynamicCommand)
else if staticCommand is "volume" then
set theResponse to volumeCommand's AAIR(dynamicCommand)
else if staticCommand is "weather" then
set theResponse to weatherCommand's AAIR(dynamicCommand)
else if staticCommand is "Wiki" then
set theResponse to WikiCommand's AAIR(dynamicCommand)
else if staticCommand is "activate" then
set theResponse to activateCommand's AAIR(dynamicCommand)
else if staticCommand is "echo" then
set theResponse to echoCommand's AAIR(dynamicCommand)
else if staticCommand is "kill" then
set theResponse to killCommand's AAIR(dynamicCommand)
else if staticCommand is "send" then
set theResponse to sendCommands's AAIR(dynamicCommand)
else if staticCommand is "TinyURL" then
set theResponse to TinyURLCommand's AAIR(dynamicCommand)
else if theResponse is "" then
set theResponse to "Invalid Command!"
end if
return theResponse
end load
using terms from application "iChat"
on message received theMessage from theBudy for theChat
set theResponse to load(theMessage)
send theResponse to theChat
end message received
end using terms from
I’m so excited because after this fix, This script is officially done! Everything it just a matter of adding more plugins! Any thoughts?