Hi, is it posible to open a file (path/url) with GP? So GP would be able to open a website with the users standard browser or open a text file with the default editor. If not, it would be nice if you could add it to your task list. This would be very helpful.
Thank you very much.
open file/url externally
Moderator: MSandro
Re: open file/url externally
Nice idea, but I think I've already submitted a similar idea, which, to my knowledge, did not quite match the ideas of John. It was something like a "run code" block that would allow opening files / URLs and much more. I've already seen something like this in some scratch 1.4 modifications. An "open file / url" block would make it possible to execute written scripts, at least under Windows, under Linux and probably also Mac this is probably rather unfortunate to realize, because the files would have to be made executable.
Re: open file/url externally
There is no way to do this in GP right now.
The general case of running an executable file is a big security hole that I'd rather not put into GP. That includes opening a file, too, since "opening" an exe or shell script file might execute it.
It might be worth considering a command that is limited to opening a browser on a given URL. I believe such a command could work in the browser version of GP, as well as in the stand-alone version (although it probably could not open local files for security reasons).
Are you more interested in opening local files or remote URL's?
The general case of running an executable file is a big security hole that I'd rather not put into GP. That includes opening a file, too, since "opening" an exe or shell script file might execute it.
It might be worth considering a command that is limited to opening a browser on a given URL. I believe such a command could work in the browser version of GP, as well as in the stand-alone version (although it probably could not open local files for security reasons).
Are you more interested in opening local files or remote URL's?
- Picochilla
- Posts: 28
- Joined: Sep 23rd, '17, 17:44
Re: open file/url externally
Honestly both, but of course I can understand your concerns about safety. Opening files would greatly improve the interaction with the operating system and would give us many new opportunities. I do not know any reasonable programming language that does not allow the external opening of files.
Re: open file/url externally
It would be very useful, but of course you should not neglect safety. Nevertheless, I support the statement of Picochilla because GP should be used as professionally as other programming languages, in contrast to Scratch and other block-based languages which are mostly aimed at learning. So you should not restrict the programming that the tool GP because of the security aspect. Many programming languages value security without sacrificing functions that restrict the programmer / user.