How to save to local file via native file dialogue?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to save to local file via native file dialogue?

J. Landman Gay via use-livecode
Hi Folks,
I’m building a little utility to parse a regular html report file I get into CSV form to slice & dice with Excel.

Input & transformation phases are sorted.
Input processing uses 'answer file' to select a source file via the native file dialogue, set the defaultFolder and load the HTML content via put URL
Transform to structured tabular form is neatly handled via chunk replace & filter functions and iteration.

However, I’m struggling to find the syntax needed to save the contents of the output variable / field into a local file via the OS file save dialogue for flexibility. I’m guessing it’s a variant of 'put theContent into URL “file:” & theFolderPathAndName’ but this seems hard-wired.

What trick am I missing here?
Thanks,
Keith..      
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: How to save to local file via native file dialogue?

J. Landman Gay via use-livecode
Keith,

'Ask File' will do the trick.
'ask file' is the "save file" complement to 'answer file'

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]

-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf Of Keith Clarke via use-livecode
Sent: Friday, March 10, 2017 11:50 AM
To: How to use LiveCode
Cc: Keith Clarke
Subject: How to save to local file via native file dialogue?

Hi Folks,
I’m building a little utility to parse a regular html report file I get into CSV form to slice & dice with Excel.

Input & transformation phases are sorted.
Input processing uses 'answer file' to select a source file via the native file dialogue, set the defaultFolder and load the HTML content via put URL Transform to structured tabular form is neatly handled via chunk replace & filter functions and iteration.

However, I’m struggling to find the syntax needed to save the contents of the output variable / field into a local file via the OS file save dialogue for flexibility. I’m guessing it’s a variant of 'put theContent into URL “file:” & theFolderPathAndName’ but this seems hard-wired.

What trick am I missing here?
Thanks,
Keith..      
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to save to local file via native file dialogue?

J. Landman Gay via use-livecode
In reply to this post by J. Landman Gay via use-livecode
Didn't someone go insane once trying to do something similar?

Bob S


> On Mar 10, 2017, at 08:50 , Keith Clarke via use-livecode <[hidden email]> wrote:
>
> Hi Folks,
> I’m building a little utility to parse a regular html report file I get into CSV form to slice & dice with Excel.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to save to local file via native file dialogue?

J. Landman Gay via use-livecode
If one definition of insanity is to repeat the same behaviour and expect a different outcome - then that was definitely me, as this isn’t my first 'little CSV utility' ! :-)
Best,
Keith..

> On 10 Mar 2017, at 17:05, Bob Sneidar via use-livecode <[hidden email]> wrote:
>
> Didn't someone go insane once trying to do something similar?
>
> Bob S
>
>
>> On Mar 10, 2017, at 08:50 , Keith Clarke via use-livecode <[hidden email]> wrote:
>>
>> Hi Folks,
>> I’m building a little utility to parse a regular html report file I get into CSV form to slice & dice with Excel.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode