Invoke macOS 10.14 Continuity Camera feature for image import
Important: 2.0.0
breaks compatibility.
new status
object:
- status.success: boolean
- status.document: picture (PDF document, if available)
- status.images[]: collection of TIFF pictures, typically in 3 resolutions
$options:=New object
$options.window:=Current form window
GET MOUSE($x;$y;$buttonDown)
$options.x:=$x
$options.y:=$y
$status:=Continuity camera menu ($options)
var $image : Picture
Form.image:=$image*0
If ($status.success)
For each ($image; $status.images)
Form.image:=Form.image/$image
End for each
If ($status.document#Null)
$folder:=Folder(Temporary folder; fk platform path).folder(Generate UUID)
$folder.create()
$file:=$folder.file("scan.pdf")
PICTURE TO BLOB($status.document; $data; ".pdf")
$file.setContent($data)
SHOW ON DISK($file.platformPath)
End if
End if
A context menu for image import is displayed.
If there is an iOS device nearby with the same Apple ID, it will switch to Continuity Camera mode.
When you tap "Done", the command returns the image edited on iOS.