with

Used with several commands, usually to specify a default setting or send a callback when the operation of the command is complete.

# Metadata

Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:

# Syntax

with

# Examples

open socket to "www.example.net" with message "mySocketOpened"

ask file "Please name the file:" with the short name of me

click at 100,100 with shiftKey

# Description

Use the with keyword to complete a command that requires it.

The with keyword is used with the following commands:

* accept, load, open socket, read from socket, write to socket: specifies a callback. * answer : specifies names of buttons. * answer color, answer file, answer folder, ask, ask file, ask password: specifies a default setting. * click, drag, type : specifies keys to be pressed. * export, import : specifies a mask file to use. * hide, show, unlock screen, visual effect: specifies a visual effect or sound effect. * combine, split : specifies delimiters to use for array entries. * create stack: specifies a group name to include in the new stack. * filter : specifies the wildcard. * intersect, union : specifies which array to use. * launch : specifies the application to use when opening a document with an application. * open printing: specifies whether to show the Print dialog box. * replace : specifies the replacement string. * reply, request : includes an AppleEvent keyword. * send to program: specifies whether to wait for a response. * wait : allows messages to be sent during the wait.

When used with the combine or split command, the with keyword is a synonym for using.

# Tags

# See