Hi all,
I have Xcode AS project and want to share variable “imageURLs” (list of dropped items) between drag’n’drop module and other script.
script DragAndDrop
property parent: class "NSBox"
-- property imageURLsView : missing value
on draggingEntered_(info)
log "Enter Dragging"
return current application's NSDragOperationCopy
end draggingEntered_
on performDragOperation_(sender)
-- Get the file path
set pb to sender's draggingPasteboard()
set theOptions to {NSPasteboardURLReadingFileURLsOnlyKey:1}
set imageURLs to pb's readObjectsForClasses_options_({current application's |NSURL|}, theOptions)
set draggedURL to item 1 of (imageURLs as list)
set filePath to draggedURL's |path|()
log imageURLs
-- log filePath as string
return true -- otherwise it doesn't happen
end performDragOperation_
end script
For example: from app delegate script i can get value with
set currentVariable to current application's NSApp's delegate()'s currentVariable() as Integer
and how i can get value from other script?