Page 1 of 1
SC inputfile - How to suppress create file alerts
Posted: 05 Jul 2019 07:49
by jaywalker32
I'm trying to use the inputfile command as a Save File dialog. It works but I am getting the "Do you want to create this file" alerts. Is there an option to suppress these alerts?
Or is there a better way to pop up a "Save file" dialog instead of using the inputfile SC?
Re: SC inputfile - How to suppress create file alerts
Posted: 26 Aug 2019 10:13
by admin
Could you post your script, please?
Re: SC inputfile - How to suppress create file alerts
Posted: 26 Aug 2019 22:02
by jaywalker32
It's a script I wrote to save current paper folder into a .m3u8 file to use on my phone.
Code: Select all
$a = <allitems <crlf>>;
$file = inputfile("J:\PhoneSync\Playlists", "m3u8", "Select Playlist File");
$a = regexreplace($a, ".+\\(Music)\\","/storage/emulated/0/Music/");
$a = replace($a, "\", "/");
writefile($file, $a);
Re: SC inputfile - How to suppress create file alerts
Posted: 27 Aug 2019 12:52
by admin
"Do you want to create this file" ... what is the exact wording?
Re: SC inputfile - How to suppress create file alerts
Posted: 27 Aug 2019 13:12
by jaywalker32
If I type in the filename as
playlist.m3u8
I get this pop-up:
Clipboard-20190827.png
Re: SC inputfile - How to suppress create file alerts
Posted: 27 Aug 2019 13:30
by admin
SC inputfile is for opening files that exist. Why use this interface for a new file?
Re: SC inputfile - How to suppress create file alerts
Posted: 27 Aug 2019 13:35
by jaywalker32
Actually, that was my original query. Is there an alternative to this? Something like a Save File Dialog (instead of SC inputfile, which is like a Open File Dialog)?
Or even a flag to specify "if the file doesn't exit, create" by default or "if it exists, overwrite by default"
I am using the SC inputfile because it provides the the explorer-like interface where I can browse and choose the save location and filename via the gui.
Re: SC inputfile - How to suppress create file alerts
Posted: 27 Aug 2019 17:43
by admin
I think a "Save File As..." Dialog is what you want?
Re: SC inputfile - How to suppress create file alerts
Posted: 27 Aug 2019 18:11
by jaywalker32
Yes, exactly.
Re: SC inputfile - How to suppress create file alerts
Posted: 28 Aug 2019 14:37
by admin
Next beta will have SC outputfile...

Re: SC inputfile - How to suppress create file alerts
Posted: 28 Aug 2019 15:17
by jaywalker32
Thanks!
Edit: Tested and working great.
