Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't make application into type application. (-1700) #14

Closed
reteps opened this issue Jul 6, 2017 · 2 comments
Closed

Can't make application into type application. (-1700) #14

reteps opened this issue Jul 6, 2017 · 2 comments

Comments

@reteps
Copy link

reteps commented Jul 6, 2017

I am trying to run a modified Jared.scpt, and I am debugging myresult. It keeps giving me this error: Can't make application into type application. (-1700)

using terms from application 'Messages'
	on message sent theMessage with eventDescription
	end message sent
	
	on message received theText from theBuddy with eventDescription
	end message received
	
	on chat room message received theText with eventDescription from theBuddy for theChat
                set getname to name of theBuddy as text
		try
			set myresult to get id of theBuddy
		on error errMsg
			set errMsgParts to splitText(errMsg, "\"")
			set errCount to count of errMsgParts
			set myresult to item (errCount - 1) of errMsgParts
		end try
                display dialog ((class of myresult) as string)
	end chat room message received
	
	on active chat message received theText with eventDescription from theBuddy for theChat
		try
			set myresult to get id of theBuddy
		on error errMsg
			set errMsgParts to splitText(errMsg, "\"")
			set errCount to count of errMsgParts
			set myresult to item (errCount - 1) of errMsgParts
		end try
                display dialog ((class of myresult) as string)

	end active chat message received
	
	on addressed message received theText with eventDescription from theBuddy for theChat
                set getname to name of theBuddy as text
		try
			set myresult to get id of theBuddy
		on error errMsg
			set errMsgParts to splitText(errMsg, "\"")
			set errCount to count of errMsgParts
			set myresult to item (errCount - 1) of errMsgParts
		end try
                display dialog ((class of myresult) as string)
	end addressed message received
	
	on received text invitation with eventDescription
	end received text invitation
	
	on received audio invitation theText from theBuddy for theChat with eventDescription
	end received audio invitation
	
	on received video invitation theText from theBuddy for theChat with eventDescription
	end received video invitation
	
	on buddy authorization requested with eventDescription
	end buddy authorization requested
	
	on addressed chat room message received with eventDescription
	end addressed chat room message received
	
	on login finished with eventDescription
	end login finished
	
	on logout finished with eventDescription
	end logout finished
	
	on buddy became available with eventDescription
	end buddy became available
	
	on buddy became unavailable with eventDescription
	end buddy became unavailable
	
	on received file transfer invitation theFileTransfer with eventDescription
	end received file transfer invitation
	
	on av chat started with eventDescription
	end av chat started
	
	on av chat ended with eventDescription
	end av chat ended
	
	on completed file transfer with eventDescription
	end completed file transfer
	
end using terms from


on splitText(sourceText, textDelimiter)
	set AppleScript's text item delimiters to {textDelimiter}
	set messageParts to (every text item in sourceText) as list
	set AppleScript's text item delimiters to ""
	return messageParts
end splitText
@ZekeSnider
Copy link
Owner

Use double quotes around "Messages", not single quotes.

@reteps
Copy link
Author

reteps commented Jul 6, 2017

Thanks

@reteps reteps closed this as completed Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants