This little script will create a link, then put the doc that you linked from as an internal reference in the doc you link to. There have been some obstacles, so this not very elegant, but reasonably quick on my Mac. Any improvements welcomed!
activate application “Scrivener”
tell application “System Events”
tell process “Scrivener”
keystroke “b” using {control down, option down, command down}
key code 123 using {control down, command down}
keystroke “e” using {control down, option down, command down}
keystroke “l” using {command down}
click menu button “dummy” of group 1 of group 1 of splitter group 1 of splitter group 1 of window 1
click menu item “Add Internal Reference” of menu 1 of menu button “dummy” of group 1 of group 1 of splitter group 1 of splitter group 1 of window 1
click menu item 3 of menu 1 of menu item “Add Internal Reference” of menu 1 of menu button “dummy” of group 1 of group 1 of splitter group 1 of splitter group 1 of window 1
keystroke “b” using {control down, option down, command down}
key code 124 using {control down, command down}
keystroke “r” using {control down, option down, command down}
delay 0.1
click button 3 of splitter group 1 of splitter group 1 of splitter group 1 of window 1
end tell
end tell