Drag and drop a Bookmark

Marty Knapp martyknapp at comcast.net
Mon Feb 28 01:08:34 EST 2011


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 
> 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 "/"
>    put item -1 of the dragData & cr into me
>    put url("file:" & the dragdata) into tData
>    get lineOffset("<string>",tData)
>    put char 10 to -10 of line it of tData after me
> end dragdrop
>
> Marty Knapp
>> Hi
>> I'd like to drag a bookmark off a browser and drop it in a field in 
>> LiveCode. So far I get only the titel of the bookmark in the field 
>> but not the URL. For instance, I get "iGoogle" but I would like to 
>> get "http://www.google.com/ig". Or even better, I want to retrieve 
>> both chunks. How do I do this?
>>
>> Thanks
>> Thomas
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>





More information about the Use-livecode mailing list