command

aeq. command

Source:

Module for interacting with the command line / system

Methods

(static) call(windows, macopt, argopt) → {string}

Source:

Call a command-line/system command.

Example

Open file in Finder/Explorer. (aeq.command.revealFile)

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
Name Type Attributes Description
win string <optional>

Command to call if OS is windows.

windows string <optional>

Command to call if OS is windows.

mac string <optional>

Argument to give the command.

arg string <optional>

Command to call if OS is MacOS.

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

Opens AEQuery bitbucket project.

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

Reveals the rurnning script in Finder/Explorer

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