Theoretical Script Question

Is there any way an API script could simulate a drag from the Compendium to a character sheet, or is that out of their touch? It seems like it would be a way to quickly distribute treasure. My suspicion is that it is either too finicky (where on the sheet are you dragging it to?) or just impossible (that part of the interface is unscriptable). But it was a passing thought...
1512680139
The Aaron
Pro
API Scripter
That's basically what the import scripts do, except that the API does not have access to the compendium, so they are generally driven off of javascript data files, or text pasted into chat or a token's GM Notes.
1512680258
If I recall correctly, there is an intentional disconnect between the API and the compendium. But if you were to have a database built into the API, you could simulate a 'drop' by simply setting/creating the required attributes and using the appropriate sheet workers.
I suspected that it would work something like that. Re-entering all the SRD data would not be worth the effort. Oh well, drag and drop isn't that hard. :)
1512947173
But that means that you could make a database of treasures etc and use an API to import directly to selected characters? Would take some time setting up, but might speed up the actual game. 
1512959606

Edited 1512963682
I already do something similar to that for character classes not in the SRD—importing features from a database I created, via ChatSetAttr. This would have been something a bit more limited, but direct from information already available and formatted/parsed. Also, some sheets do extensive behind-the-scenes work when you drag in a Compendium item. My hope was that if a drag could be simulated, you could bypass worrying about all that.