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:
<desktop> The current user's desktop folder
<documents> The current user's "My Documents" folder
<profile> The current user's profile folder. e.g. C:\Users\John
<appdata> The current user's Appplication data folder.
e.g. C:\Users\John\AppData\Local
<windir> The OS's installation directory. e.g. C:\Windows
<progFilesX86> The Program Files folder for 32-bit programs.
e.g. C:\Program Files (x86)
<recent> The current user's "Recent items" folder
<startup> The current user's startup folder

Additionally, all environment variables such as TEMP, USERNAME or SYSTEMDRIVE 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 environment variables for the current user, open a command window and enter 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