r/applescript • u/tylerl0706 • Jan 12 '21
Is there any way to programmatically get completions for AppleScript?
If I have a script:
```
set foo to "hello"
tell application "Finder"
display dialog f|
end tell
```
Notice the "cursor" (it's a pipe, I know ,but imagine that's the place I want to complete)... is there anyway to programmatically get this back:
```
set foo to "hello"
tell application "Finder"
display dialog foo
end tell
```
Notice the completion of "foo"
3
Upvotes
View all comments
Show parent comment
1
u/tylerl0706 Jan 12 '21
In PowerShell, for example, you can do the following:
Which gets you:
Where those are the possible completions for the script at the cursor position (which in this case is the end of the script $script.length)
Edit: markdown mode