Syntax for opening newly created files?
-
Megalith
- Posts: 87
- Joined: 24 Jan 2015 16:53
Syntax for opening newly created files?
Sorry, this is probably obvious, but what syntax should I add to a script so a file is not only created but immediately opened?
-
highend
- Posts: 14994
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Syntax for opening newly created files?
open / openwith / run?
One of my scripts helped you out? Please donate via Paypal
-
Megalith
- Posts: 87
- Joined: 24 Jan 2015 16:53
Re: Syntax for opening newly created files?
Yeah, but I can't figure out how to integrate the open command with, say, new("info.txt");.
-
highend
- Posts: 14994
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Syntax for opening newly created files?
Code: Select all
open new("info.txt", "file"), "w";One of my scripts helped you out? Please donate via Paypal
-
Megalith
- Posts: 87
- Joined: 24 Jan 2015 16:53
Re: Syntax for opening newly created files?
Oh, duh, so it was just a matter of adding "open" at the beginning. I played around with it and
seems to work fine; what does "file" and "w" do in your version?
Code: Select all
open new("info.txt");-
highend
- Posts: 14994
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Syntax for opening newly created files?
"file" is the default for type in new() so it's not a necessity but I'm used to it (auto completion in my editor)
"w" = Use Window's associated application instead of preferring XY's PFA (and I use a script for all my PFAs...)
"w" = Use Window's associated application instead of preferring XY's PFA (and I use a script for all my PFAs...)
One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club