SC inputfile - How to suppress create file alerts

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
jaywalker32
Posts: 214
Joined: 27 May 2014 05:24

SC inputfile - How to suppress create file alerts

Post 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?

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

Post by admin »

Could you post your script, please?

jaywalker32
Posts: 214
Joined: 27 May 2014 05:24

Re: SC inputfile - How to suppress create file alerts

Post 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);

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

Post by admin »

"Do you want to create this file" ... what is the exact wording?

jaywalker32
Posts: 214
Joined: 27 May 2014 05:24

Re: SC inputfile - How to suppress create file alerts

Post by jaywalker32 »

If I type in the filename as playlist.m3u8

I get this pop-up:
Clipboard-20190827.png
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

Post by admin »

SC inputfile is for opening files that exist. Why use this interface for a new file?

jaywalker32
Posts: 214
Joined: 27 May 2014 05:24

Re: SC inputfile - How to suppress create file alerts

Post 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.

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

Post by admin »

I think a "Save File As..." Dialog is what you want?

jaywalker32
Posts: 214
Joined: 27 May 2014 05:24

Re: SC inputfile - How to suppress create file alerts

Post by jaywalker32 »

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

Post by admin »

Next beta will have SC outputfile... :)

jaywalker32
Posts: 214
Joined: 27 May 2014 05:24

Re: SC inputfile - How to suppress create file alerts

Post by jaywalker32 »

Thanks!

Edit: Tested and working great. :tup:

Post Reply