I have the file in Dropbox selected in Finder.
I have this form in GMail to paste some description into the upper field and the actual dropbox link into the bottom field.
For some reason that I can't understand for a whole day, it pastes the description ( the file name)
correctly and absolutely random stuff instead of the dropbox link into the bottom field.
Please help.
I'm not certain, and I can't test it since I don't use DropBox, but you are setting the value of local_DropLink to the System Clipboard after waiting only 0.2 seconds after you press Return. That may not be enough time. Try waiting a longer time to see if that fixes it. In fact, you shouldn't even be waiting for a fixed time, I think maybe you should replace your "Pause 0.2 seconds" action (the third one) with:
There are other people here who use DropBox and they may be able to give you a better answer.
It might help if you show an example of what you mean when you say "absolutely random stuff." If you show an example of the random stuff, you may get a quicker correct answer.
@Airy's got it -- increase the delay between the Return keystroke and setting local_DropLink.
Your Mac has to ask the Dropbox server to generate the link and it will take longer than 0.2s to respond. You can use "Pause Until..." the value of `CLIPBOARDSEED() changes, but it seems the Clipboard gets set twice so you'll have to pause twice...
That was a surprise to me too. I learn from Nige every day.
In case you're wondering what causes that, I suspect it's the javascript running on that page which changes the system clipboard twice. In theory, javascript on a page in a browser could run, literally, forever and constantly change the clipboard forever.