In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Mark Wheeler) wrote:
> The script will open Internet Connect, dial a number (given by the > script). I don't know if you can do that with Internet Connect. This sorta works: my $ic = new Mac::Glue 'Internet Connect'; my $conn = $ic->prop('BlueTooth configuration')->get; my $status = $conn->prop('status'); my $state = $status->prop('state'); my $number = '*99#'; $conn->connect(to_telephone_number => $number) if $state->get == 0; while (1) { last if $state->get == 8; sleep 1; } (That works for my Bluetooth modem, you can try it with 'PPP configuration' too, I'm sure it should work the same.) But in my test, it dials the main configuration no matter what the value of $number. And I cannot select multiple configurations. (These are apparent limitations in Internet Config itself, not Mac::Glue.) > When a connection is established, a sound file will be played > 5 X (or what ever number of repetitions). You can do this to some degree with Mac::Sound. I think you can't do it with any old sound, that you need to have it in a resource file. The Sound.t file shows an example. Another option is to use SysBeep(30) or somesuch, to just get the system beep. > After the connection is lost > (phone is hung up after listening to the sound file), the connection is > closed, Internet Connect quits and the script ends. Just keep checking $state->get until it is false, apparently. I didn't look too hard to get an accurate and complete list of $state values. It's 0 when not connected, 8 when connected, and 1-7 while in different connection phases (dialing, authentication, etc.). -- Chris Nandor [EMAIL PROTECTED] http://pudge.net/ Open Source Technology Group [EMAIL PROTECTED] http://ostg.com/