Sha256: 903cf9d14f31c5c8b89869ab37aaeca1257688352153396de98d65c320dde0cf

Contents?: true

Size: 384 Bytes

Versions: 4

Compression:

Stored size: 384 Bytes

Contents

on run argv
	set toAddress to first item of argv
	set theFilePath to second item of argv
	set theFile to POSIX file theFilePath
	
	tell application "System Events"
		if exists file theFilePath then
			tell application "Messages"
				send theFile to buddy toAddress of (service 1 whose service type is iMessage)
			end tell
		else
			error "File not exist."
		end if
	end tell
end run

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
imessage-0.4.0 lib/imessage/apple_scripts/send_attachment.applescript
imessage-0.3.2 lib/imessage/apple_scripts/send_attachment.applescript
imessage-0.1.1 lib/imessage/scripts/send_attachment.applescript
imessage-0.1.0 lib/imessage/scripts/send_attachment.applescript