-- Modem Static Remover - to avoid the iMac's modem static bug -- Copyright (C) 2001 John F. Whitehead -- -- This program is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public License -- as published by the Free Software Foundation; either version 2 -- of the License, or (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- -- The GNU GPL is available at . -- -- Modem Static Remover, version 1.0, 25 Sep 2001 -- This AppleScript avoids the iMac modem static bug as described -- in Apple KB article ID 88055. I have provided more information at -- . set dialog_timeout to 5 display dialog "Dialing modem in " & dialog_timeout & , " seconds..." buttons {"Cancel", "Dial"} default button "Dial" with icon caution giving up after dialog_timeout tell application "Sound Scripting" set previous_sound_input_source to current sound input source end tell try set the transaction_id to "" tell application "Network Setup Scripting" -- dial active connection open database set the current_config to , (every Remote Access configuration whose active is true) set the current_config to item 1 of the current_config set the current_config to the name of the current_config connect Remote Access configuration current_config -- uncomment following line to hear status via Speech -- say "Connecting to " & current_config try close database end try end tell on error error_message try -- uncomment following line to hear status via Speech --say "Could not connect to " & current_config display dialog error_message , buttons {"OK"} default button 1 tell application "Network Setup Scripting" if the transaction_id is not "" then abort transaction try close database end try end tell end try end try -- display status tell application "Remote Access Status" activate end tell -- reset sound input away from internal modem (the whole reason for this script) tell application "Sound Scripting" -- uncomment following line to return to state before modem was dialed set current sound input source to previous_sound_input_source -- uncomment following line instead of previous one to force input to a good default -- set current sound input source to "Built-in Mic" end tell