On 1/03/11 9:02 AM, "Thomas Bähler" wrote:
>> Is this under Windows? Because on OSX I get the URL and not the title when
>> dragging bookmarks from both Safari and Firefox into a Livecode field. In
>> fact from memory, to get the title on a Mac you need to grab the url, load
>> it and then parse
> Is this under Windows? Because on OSX I get the URL and not the title when
> dragging bookmarks from both Safari and Firefox into a Livecode field. In
> fact from memory, to get the title on a Mac you need to grab the url, load
> it and then parse the text between the title tags.
Hi Terry
It's o
I just realized I forgot to insert the script (time to go to bed!) This
is to drag right from the browser to a field:
on dragdrop
put url (the dragData) into theHTML
put offset("",theHTML)+7 into b
put offset("",theHTML)-1 into z
put char b to z of theHTML into me
put cr & the dra
My script assumes that you've saved the webloc to disk. If you drag and
drop right off the browser window it will just get the url. In that
case, you could then grab the url and parse it for the Title tag.
Marty
Hey Thomas,
You need to get the contents of the dragData. Here's a quick a dirty
Hey Thomas,
You need to get the contents of the dragData. Here's a quick a dirty
script that will put the name of the bookmark on line 1 and the url on
line 2. Put this in the field script:
on dragenter
set the acceptdrop to true
end dragenter
on dragdrop
set the itemDelimiter to "/"
Is this under Windows? Because on OSX I get the URL and not the title when
dragging bookmarks from both Safari and Firefox into a Livecode field. In
fact from memory, to get the title on a Mac you need to grab the url, load
it and then parse the text between the title tags.
Terry...
On 28/02/11