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?
SC inputfile - How to suppress create file alerts
-
jaywalker32
- Posts: 214
- Joined: 27 May 2014 05:24
-
admin
- Site Admin
- Posts: 67258
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SC inputfile - How to suppress create file alerts
Could you post your script, please?
FAQ | XY News RSS | XY X
-
jaywalker32
- Posts: 214
- Joined: 27 May 2014 05:24
Re: SC inputfile - How to suppress create file alerts
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);
-
admin
- Site Admin
- Posts: 67258
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SC inputfile - How to suppress create file alerts
"Do you want to create this file" ... what is the exact wording?
FAQ | XY News RSS | XY X
-
jaywalker32
- Posts: 214
- Joined: 27 May 2014 05:24
Re: SC inputfile - How to suppress create file alerts
If I type in the filename as playlist.m3u8
I get this pop-up:
I get this pop-up:
To see the attached files, you need to log into the forum.
-
admin
- Site Admin
- Posts: 67258
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SC inputfile - How to suppress create file alerts
SC inputfile is for opening files that exist. Why use this interface for a new file?
FAQ | XY News RSS | XY X
-
jaywalker32
- Posts: 214
- Joined: 27 May 2014 05:24
Re: SC inputfile - How to suppress create file alerts
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.
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.
-
admin
- Site Admin
- Posts: 67258
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SC inputfile - How to suppress create file alerts
I think a "Save File As..." Dialog is what you want?
FAQ | XY News RSS | XY X
-
jaywalker32
- Posts: 214
- Joined: 27 May 2014 05:24
Re: SC inputfile - How to suppress create file alerts
Yes, exactly.
-
admin
- Site Admin
- Posts: 67258
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SC inputfile - How to suppress create file alerts
Next beta will have SC outputfile... 
FAQ | XY News RSS | XY X
-
jaywalker32
- Posts: 214
- Joined: 27 May 2014 05:24
Re: SC inputfile - How to suppress create file alerts
Thanks!
Edit: Tested and working great.
Edit: Tested and working great.
XYplorer Beta Club