creating a new file?

42 views
Skip to first unread message

Tony Kerz

unread,
Nov 27, 2012, 11:02:32 PM11/27/12
to script...@googlegroups.com
just getting started with scripted, and i have what is probably a ridiculous question for the endoctrinated:

how do i create a new file?

currently attempting this on win-7-x64

so, i:
- created an empty folder
- created an empty dot-scripted file in that folder
- cd'd to that folder
- ran 'scr'

scripted starts in browser:

buffer says: Error: Error: UNKNOWN, read

tried ctrl-shift-f with a new file name, but that didn't seem to work.

i'm a bit baffled from the get go, any guidance appreciated ;)

Kris De Volder

unread,
Nov 28, 2012, 1:52:53 PM11/28/12
to script...@googlegroups.com
Hi Tony,

Making some context menus to create files from within scripted is an
issue someone is currently working on.

Right now to create a file you should do it from the commandline. On
Unix you can do 'touch <filename>'. Not sure what you do on Windows.
After you create the file, launch scripted with 'scr <filename>'.

BTW, how to create new files in scripted is really not obvious, in
fact arguably it isn't possible (yet), unless you hack the url.
Several people have already complained about this (no surprise there
really :-) so we are going to address this for the next release (0.3).

Kris

Andrew Clement

unread,
Nov 28, 2012, 1:56:32 PM11/28/12
to script...@googlegroups.com
If you are running from master, the menus Kris mentions are already available.

Andy

Andrew Clement

unread,
Nov 28, 2012, 2:40:28 PM11/28/12
to script...@googlegroups.com
Hi Tony,

Just trying out the other thing you mentioned, about windows:

> - created an empty folder
> - created an empty dot-scripted file in that folder
> - cd'd to that folder
> - ran 'scr'
>
> scripted starts in browser:
> buffer says: Error: Error: UNKNOWN, read

I didn't see that error, the browser started ok for me and I saw just a navigator just showing .scripted and scripted.log.

I presume you did see the navigator it was just the unusual message in the editor window that surprised you?  When opened on a folder the editor window should be getting hidden (as there is nothing for it to show) - can I ask what web browser (and version) you were using?

cheers,
Andy

Marc

unread,
Dec 19, 2012, 2:32:39 PM12/19/12
to script...@googlegroups.com
Even with the new context menu to create files you get the error so maybe Scripted should detect that it was opened w/o a file and just hide the editor until a script is created or selected. I often just start scr from a folder and then select a file and the error message ''Error: Error: UNKNOWN, read is unnecessary.

Andrew Clement

unread,
Dec 19, 2012, 2:48:47 PM12/19/12
to script...@googlegroups.com
Hi Marc

I only observed today that you still see that on windows (I'm bug bashing on windows today).  On unix you get a 'welcome page' indicating how to get started. I'll fix windows so it does the same.

Andy

Anthony Kerz

unread,
Apr 23, 2013, 10:15:45 PM4/23/13
to script...@googlegroups.com
new file option in menu looks great in 0.4.0!

any thoughts on integrating find and new like emacs such that if you go to look for a file and it doesn't exist, but you hit return or something, the file would be created?

Andrew Clement

unread,
Apr 24, 2013, 1:15:19 PM4/24/13
to script...@googlegroups.com
I think we can certainly make that experience of building up your app smoother, by doing things like you suggest (creating files you can't find) or even one keypress to create a file/module you refer to in a 'require' clause that we can't find, etc.

Andy
Reply all
Reply to author
Forward
0 new messages