This can be done by Using JavaScript extensions (runs from JavaScript Editor), for example, for the opening of a file –

 fh = fopen(getScriptPath(), 0);