Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Get Working Dir ?

3dnoob
Registered User
Quote
2018-08-18 13:56:44

How can I get the current working directory via javascript?

I would need this variable path for a JS Plugin.


3dnoob
Registered User
Quote
2018-08-18 20:40:51

Hello ?


pmax
Registered User
Quote
2018-08-18 20:46:00

What path do you need to know?


pmax
Registered User
Quote
2018-08-18 20:52:17

function opendir()
{

system(" explorer C:\\Users\\pntmassimo\\Documents\\CopperCube\\plugins " );

}

editorRegisterMenuEntry("opendir()","Open plugins folder \tShift+O");


Here is an example of how to use the path.
you have to replace pntmassimo= <your username>.
so the plugin once started will open the Coppercube Plugin folder.


3dnoob
Registered User
Quote
2018-08-18 21:57:00

The path where the JavaScript file resides.
(This is a relatively variable path)

Similar to this:

window.location.pathname


pmax
Registered User
Quote
2018-08-18 22:42:15

If you want to put your plugin in the Copperube menu you have to put it in that path, if you go to see in the directory there are the various scripts that you use in Coppercube.


3dnoob
Registered User
Quote
2018-08-18 23:16:20

Here is my JavaScript-Editor-Plugin:

https://workupload.com/file/gYNa... (Update)

Anyone who needs the editor may use it in free and report any Errors.

And here's the Scintilla license:

https://www.scintilla.org/Licens...


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Interna?ional" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact