d0k3 / GodMode9

GodMode9 Explorer - A full access file browser for the Nintendo 3DS console :godmode:
GNU General Public License v3.0
2.07k stars 192 forks source link

[FEATURE REQUEST] A documentation with full Syntax for scripting #825

Closed GeAd23 closed 11 months ago

GeAd23 commented 11 months ago

Got a great idea on how to improve GodMode9? Manny people needs a document with the full syntax of the script language gm9.

Describe the feature you'd like I can’t see how I can use math operations (+ - * /) or if I can read the size of an file or folder. Also I need to move a folder and rename it. Can I use a variable to store an int or only strings/chars. Can I use an array or a while/for loop. The goto loop is normally only a workaround. Also I want to create a file (txt) and want to read and write to it. This makes a full syntax documentation for scripting necessary.

Describe alternatives you've considered Read existing scripts. But that is dangerous and really hard without a documentation.

Thank you for your help and time.

danny8376 commented 11 months ago

resources/sample is pretty much the document for scripting for arithmetic operations and array, that simply doesn't exist

GeAd23 commented 11 months ago

I read now the scripts on GitHub. This my open questions : So i can’t use integer only string or char as variable data type. What are the parms and switches for „for-next“ loop ? What did labelsel do ? Did it also run all script in the label sections ? How can I get the size of a folder or file ? Can I create a dummy file without size ? I only need the name. And can I split a string at Newlines (\n) ?

Yours Sincerely

Am 31.07.2023 um 16:10 schrieb Danny Tsai @.***>:

 resources/sample is pretty much the document for scription for arithmetic operations and array, that simply doesn't exist

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

d0k3 commented 11 months ago

@GeAd23 - if you want a full scripting documentation, make one, and do a pull request. I think most of the questions you have can be answered via the sample script, and then there's also the Discord and the discussion forum here on Github. Here's the wrong place for asking all those questions, and I guess you will also need to be a little more specific.

Here's some answers: Using newlines in strings works (why didn't you just try?) You always need to specify a size when creating a file, but that size can be zero Getting the size of a folder doesn't work - folders don't have a "size", and even modern OSes need to traverse the full folder structure to give you the combined size of all included items, this would take very long on a 3DS Getting the size of a file has no command (afaik it wasn't useful for anything so far).

Closing this because wrong place. If you're interested in doing a proper documentation, I would still take pull request.

GeAd23 commented 11 months ago

I would try it at the next weekend. I don’t have time for testing in the moment. Thank you.

Am 01.08.2023 um 10:01 schrieb d0k3 @.***>:

 Closed #825 as completed.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.