- Source:
Module for interacting with the command line / system
Methods
(static) call(windows, macopt, argopt) → {string}
- Source:
Call a command-line/system command.
Example
aeq.command.call('Explorer /select,', 'open -R', '"' + file.fsName + '"' )
aeq.command.call({
windows: 'Explorer /select,',
mac: 'open -R',
arg: '"' + file.fsName + '"'
})
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
windows |
string | object | Command to call if OS is windows, or an object with options. Properties
|
|||||||||||||||||||||
mac |
string |
<optional> |
Command to call if OS is MacOS. |
||||||||||||||||||||
arg |
string |
<optional> |
Argument to give the command. |
Returns:
The value returned from the command.
- Type
- string
(static) copyToClipboard(text)
- Source:
Copies a string to the users clipboard.
Example
aeq.command.copyToClipboard( 'Hello World!' )
Parameters:
Name | Type | Description |
---|---|---|
text |
string | The string to copy. |
(static) openURL(URL)
- Source:
Opens the given URL in the default web browser.
Example
aeq.command.openURL('https://bitbucket.org/motiondesign/aequery')
Parameters:
Name | Type | Description |
---|---|---|
URL |
string | The URL to open. |
(static) revealFile(filePath) → {string}
- Source:
Reveals the given file path or file object in Finder/Explorer.
Example
aeq.command.revealFile( $.fileName )
Parameters:
Name | Type | Description |
---|---|---|
filePath |
string | File | The path to the file that should be revealed, or a file object to reveal. |
Returns:
The value returned when calling the reveal command in the command line. Mostly empty, holds error info if not empty.
- Type
- string