A Question about Ask File

Roger Guay irog at mac.com
Wed Mar 20 22:37:48 EDT 2019


Yes, you are so right!  I found my problem: Some of my filenames had slashes in them which created confusion for the filePath. Once I got rid of the slashes, everything worked as one would expect. BTW, it’s not really my fault . . . I didn’t put the slashes in the names . . .  my customer did. Swine customer!!

Roger

> On Mar 20, 2019, at 7:22 PM, Brian Milby via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> You are providing a path and a file name.  They are just not provided as separate parameters.  The suggested file name must be placed at the end of the path location.
> On Mar 20, 2019, 9:42 PM -0400, Roger Guay via use-livecode <use-livecode at lists.runrev.com>, wrote:
>> Thank you, Herman, but by providing this solution, are you saying that one cannot specify BOTH a defaultName and a defaultFilePathin a standard ask file prompt???
>> 
>> Roger
>> 
>>> On Mar 20, 2019, at 2:21 PM, hh via use-livecode <use-livecode at lists.runrev.com> wrote:
>>> 
>>> Create a *full* filePath. For example:
>>> 
>>> ask file "Save as:" with imagePath("export",".png")
>>> 
>>> function imagePath f,x
>>> put the effective filename of this stack into p
>>> set itemdel to slash
>>> put 0 into z
>>> put f&z&x into last item of p
>>> repeat while there is a file p
>>> add 1 to z
>>> put f&z&x into last item of p
>>> end repeat
>>> return p
>>> end imagePath
>>> 
>>>> Roger G. wrote:
>>>> Now how do I also add a default name to the mix?
>>>> 
>>>>> Alex T. wrote:
>>>>> ask file prompt [with *defaultFilePath*] [with filter *types*] [as sheet]
>>>>> 
>>>>>> Roger G. wrote:
>>>>>> In the Ask File prompt, is there a way to make the “Where” field to
>>>>>> always default to a specific folder?
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> 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
> _______________________________________________
> 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