How to manage file name containing a date with /

André Bisseret andre.bisseret at wanadoo.fr
Mon Jul 22 17:24:38 EDT 2013


Le 22 juil. 2013 à 19:40, J. Landman Gay a écrit :

> On 7/22/13 7:50 AM, André Bisseret wrote:
>> Since your posts I made a number of trials during the weekend,
>> following your suggestions but with no success.
> 
> I'm still not sure why you need to translate the file paths. I've never needed to do that. This always works:
> 
> answer file "Choose a file:"
> if it = "" then exit to top
> put url ("file:" & it) into tVar
> 
> The special characters used by both MacOS and Windows are translated by the OS itself, so I never need to worry about what comes back from the "answer file" command. I just use whatever it gives me and the OS manages it.
> 
> Can't you just get "the files" and use whatever it sends back to the script?
> 
Thank you much Jacque for this suggestion. 

At first glance, not sure I understand it well (seems to me that the user should choose the file in a dialog (?)

But in my case the reader can't choose the file;
In a field, on the main stack, s(he) may read laconic informations about the patient. 
One information can be completed by a document that give the details. In such a case at the end of the line of information the doctor has created a button with an icon (DOC) : clicking the button open the right document 
Ex.the cholesterol is not normal see > (DOC)

That's why I seem to have to use launch document with the fileName 

(when a button is created, I keep the name of the document it corresponds to in a custom property)

This works very well on Mac

I will give more attention to your suggestion to morrow: here it is a bit too late now, for my age ;-))

André



More information about the use-livecode mailing list