So I've been researching this problem and it seems that there is no sane way to re-select a text. The problem is that `(do-applescript ..)' only interacts with AppleScript well if the return type of the string is either a number or a string. If I try to convert the selection object (which is not really an object but a list of specifiers) it just returns the selected text. There is also `selection bounds' but it only covers rectangle selections. It's possible to save the selected text and try to `find' it later, but that won't work well (e.g.: there are several repetitions of the same text on one page). I've also tried to implement an auto-scrolling to the selected text, but to no avail. The option that seems to me the most reasonable is to add a highlight note to the selected text (which is actually possible). What do you think? For now, the patch to the problem mentioned by Ivan. I have actually fixed a small bug in the code for getting links from Firefox: Prior to the fix the firefox link grabber won't work correctly if a cursor has been already positioned in the URL field. The fix works by adding an additional keystore for selecting all the text in that field. The problem is that I've committed it before committing the stuff that Ivan told us about, so I am not sure what to do in this case. Thanks -- Daniil