Dialectic Icon

Before Dialing AppleScript Format

Just before Dialectic begins to dial, after a number has been processed by the Dialing Rules, Dialectic can run an AppleScript. This can be used to pause a media player not natively supported by Dialectic (such as VLC, an Internet radio application, etc.), to create your own call log or add the call to a database, open a database record associated with the called party, cancel the call based on some specific criteria such as time of day, etc. or just about anything else. AppleScript is powerful!

To specify that this should be done, create and save your script, and then, in the Dialing preferences, check “Launch Application or AppleScript Before Dialing” and choose the script file. You can also drag and drop your script onto the script path area to specify it as the script to use. For example scripts that can be used with Dialectic as a before dialing script (and other items), see the Dialectic Online Resources at:

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

The Before Dialing AppleScript must contain the handle_predial_action handler using the following format:

script icon
on handle_predial_action(contact_number, contact_name, call_type, dial_method, transformed_number)
     try
 
          -- do something here...
 
     on error the_error
          activate
          display dialog "Error: " & the_error buttons {"OK"} default button 1 with icon 0 giving up after 20
          return false --returning false cancels the call
     end try
     return true --return true to proceed with the call
end handle_predial_action

The parameters of the handle_predial_action handler will be passed by Dialectic to your script just before the number is actually dialed. These parameters are:

Your script should return true if the call should be dialed; return false if the call should be cancelled.

Open

Open Preferences

Related Topics

Dialing Preferences

Online Resources

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.