AutoControl Control your browser your way Forum               Install now from theChrome Web Store

Script location


A script's source code can optionally be located in a local file or URL. This is known as the script's location.

Upon execution, the script is read directly from its location, so any changes made to the file or URL up to that point will take effect.
This allows you, for example, to keep your scripts in your hard drive and edit them with any external code editor or IDE instead of using AutoControl's integrated code editor.
Also, when a script has a location, any ACtl function that takes as argument an absolute file or folder path/URL can also accept relative paths/URLs. Among those functions are ACtl.include, ACtl.import, ACtl.getFile, ACtl.saveFile and a few others.
For example, in the case shown in the image above, the script's source code is located in C:\Projects\Test\script.js.
So, inside that script we can call ACtl.getFile('data.json', 'json') to load the file C:\Projects\Test\data.json.
Scripting API Script Isolation Asynchronicity Backgrnd Scripts GUI vs API ACtl.include ACtl.import ACtl.getFile ACtl.saveFile ACtl.saveURL ACtl.openURL ACtl.closeTab ACtl.runInTab ACtl.runInFrames ACtl.runInPageCtx ACtl.getTabInfo ACtl.getTabIds ACtl.TAB_ID ACtl.setTabState ACtl.captureTab ACtl.execAction ACtl.runCommand ACtl.getClipboard ACtl.setClipboard ACtl.expand ACtl.switchState ACtl.var ACtl.pubVar ACtl.on ACtl.off ACtl.sleep ACtl.STOP_CHAIN ACtl.STOP_FULL_SEQ