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

Location Placeholders


A number of functions in the ACtl API can take file or folder paths as arguments. On those arguments you can insert placeholders in between the characters < >.
For example, ACtl.getFile('<desktop>/todo.txt') will get the file todo.txt located in the desktop.
The following placeholders are always available:
<profile> The current user's profile folder. e.g. C:\Users\John
<desktop> The current user's desktop folder
<documents> The current user's "My Documents" folder
<recent> The current user's "Recent items" folder
<startup> The current user's startup folder

Additionally, environment variables such as temp and windir can also be used as placeholders.
For example, ACtl.saveFile('<temp>/userData.json', {name: 'John', age: 29}) will save the file userData.json to the user's temporary folder.
To see all existing variables for the current user, open a command window and type the set command.
Placeholders are not case-sensitive.
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