Get only Pathname of a dragdropped Object

Sannyasin Brahmanathaswami brahma at hindu.org
Sun Apr 22 16:15:11 EDT 2018


 Richard, here is what I use.

On the UI I have addition button 
1) get files only 
2) Go to web page  (working a mirror of there we site locally_)


This script in a field.

on dragEnter
  set the acceptDrop to true
  end dragEnter

on dragDrop
  put  dragData["files"] into me
  getList 
end dragDrop

on getList
   put  me into tInput
     switch
    
    case (the hilite of btn "File Names Only")
      set the itemdel to "/"
      repeat for each line x in tInput
        put item -1 of x & cr after tList
      end repeat
      delete char -1 of tList
      break
      case (the hilite of btn "Absolute Web Paths")
        put 1 into tURLFlag
      set the itemdel to "/"
      repeat for each line x in tInput
        delete item 1 to 5 of x
        replace "/public_html/" with "/" in x
        put "http://" & x & cr after tList
      end repeat
       delete char -1 of tList
      break
    default
     put tInput into tList
end switch

  
  sort tList

  set the clipboarddata["text"] to tList
  
   if tURLFlag=1 then
    answer "Go to the first web page?" with "No" or "Yes"
    if it is "Yes" then revGoURL (line 1 of tList)
    end if
   
end getList


    I´m looking for a solution to get the path to a Folder by dragdropping it into my (macOS)app without that the whole Folder is copied  in the drgdrop-process.
    
    



More information about the use-livecode mailing list