getting File Name
Scott Rossi
scott at tactilemedia.com
Mon Aug 11 02:15:35 EDT 2014
Hi John:
Does the following also do what you want?
answer file "Select a file:"
set itemDel to "/"
ask "File Name" with last item of it
Regards,
Scott Rossi
Creative Director
Tactile Media, UX/UI Design
On 8/10/14 10:00 PM, "JB" <sundown at pacifier.com> wrote:
>Here is a handler I wrote that will return the file name.
>
>on mouseUp
> answer files "Select the file you want the Name of:"
> put the longFilePath of line 1 of it into filePath
> set the itemDelimiter to tab
> put number of chars in filePath into n
> repeat for n times
> if char n of filePath = ":" then put "/" before fileName
> else put char n of filePath before fileName
> if char n - 1 of filePath = "/" then exit repeat
> put n - 1 into n
> end repeat
> ask "File Name" with fileName
>end mouseUp
>
>John Balgenorth
>
>_______________________________________________
>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