Dialectic Icon

Dialing

Using AppleScript, it is very easy to command Dialectic to dial a number. Below you will find the basic commands for dialing and then several examples for how to write more complex scripts using variable data for the number to dial. For all of the example scripts provided below, click the small script icon in the top left corner of the example box to open the example code as a new script in the Script Editor application.

For more scripts and other items, see the Dialectic Online Resources at:

http://www.jonn8.com/dialectic/resources/

Here are the three basic dialing commands:

script icon
--basic dialing of a number:
tell application "Dialectic" to dial number "212-555-1212"
 
--dialing a number with an associated name for the Call Log:
tell application "Dialectic" to dial number "212-555-1212" name "NYC Information"
 
--dialing a number with an associated name literally without the current Dialing Rules modifying it:
tell application "Dialectic" to dial number "9,12125551212" name "NYC Information" with literal

Using the basic dial command, you can get use more complex scripts to identify the number to actually dial. Here are a few examples. Prompt the user for the number to dial:

script icon
set the_number to "(212) 555-1212"
set the_number to text returned of (display dialog "What number shall I dial?" default answer the_number)
tell application "Dialectic" to dial number the_number

Dial the contents of the clipboard:

script icon
set the_number to (the clipboard)
tell application "Dialectic" to dial number the_number

Dial the contents of a cell in a FileMaker Pro database:

script icon
property cell_name : ""
repeat while cell_name = ""
     try
          set cell_name to text returned of (display dialog "What cell name should I use?" default answer cell_name buttons {"Cancel", "OK"} default button 2 with icon 1)
     on error
          return --user cancelled
     end try
end repeat
try
     tell application "FileMaker Pro" to set the_number to cellValue of cell cell_name of current record of document 1
on error the_error
     set cell_name to ""
     beep
     return display dialog the_error buttons {"OK"} default button 1 with icon 0 giving up after 10
end try
tell application "Dialectic" to dial number the_number

Dial the currently selected text in Safari 3.x with tabs enabled:

script icon
tell application "Safari"
     activate
     delay 1
     set the_number to do JavaScript "getSelection();" in current tab of (item 1 of (windows whose document of it is not missing value))
end tell
tell application "Dialectic" to dial number the_number

Open

Open Script Editor

Open Dialectic's AppleScript Dictionary

Related Topics

Online Resources

AppleScript

Configuring with AppleScript

Other AppleScript Commands

Internal Script Formats

Was this page helpful? Were there errors, inaccuracies, or typos?
Could something have been explained better? If so, please let us know. 

Copyright © 2017 JNSoftware LLC. All Rights Reserved.
All other products mentioned are copyright of their respective owners.
No endorsement of or affiliation with any third-party product or service is implied.