Target / location / script

I have a script. Script works fine only problem is I need to bring up the “selector” to choose where I should put the item.

“set theGroup to display group selector
end tell” ?

What do I need to put in. I tried a few lines but hasn’t work.

on run argv
	if (count of argv) is greater than 0 then
		repeat with theItem in argv
			tell application id "DNtp" to launch
				set thePath to theItem as text
				tell application id "DNtp"
					set theRecord to ocr file thePath to incoming group
					end tell
				end tell
			end try
		end repeat
	end if
end run
  • Why are you using on run argv ?
  • You are using two tell blocks for DEVONthink. This is unnecessary as you’re already talking to the application.

Here is a simple example of using the group selector

property thePath : "/Users/Me/Desktop/new file.png"

tell application id "DNtp"
	set importDestination to display group selector
	set theRecord to ocr file thePath to importDestination
end tell

Got it from someone.

Thank you. it worked now. :slight_smile: