[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Re: Dialing with MacPerl?



FYI, I did get this to work, though the documentation was pretty light
(none that I could find).  So there are still some questions about things,
specifically how to specify which tool to use... I've only got the Serial
Tool installed, so that's the default, but I'd like to be able to specify
it specifically should another tool be installed in the future.

This is a snippet of code of a larger program that dials my pager should
our website go down.  Works quite nicely in conjunciton with SiteWatcher
from biap communications
(http://www.biap.com/DataPig/mrwheat/software.html).  Should anyone want
the full stuff, let me know.

    require "CommConnect.pl";
    MacPerl::LoadExternals('CommConnect.pl');
    $status = &CommConnect::Prepare();         #prep the default
driver(serial tool)

    $settings = 'Baud 57600 DataBits 8 Parity None StopBits 1 Port "Modem
Port" Handshake None HoldConnection False RemindDisconnect False';

    $status = &CommConnect'ChangeSettings($settings);

    $settings = &CommConnect'GetSettings();

    $status = &CommConnect'OpenConnection();

    $status = &CommConnect'Send("atdt 9,366-1524,,,351-0911\nath0\n");

    $status =  &CommConnect'Send("");

    $status = &CommConnect'CloseConnection();

    $status = &CommConnect'Cleanup();

>From the FAQ:
>3.2.1) How can I get MacPERL to dial my modem?
>
>  Look at CommConnect.t in the :t:mac folder. One note: currently it seems
>to be
>  impossible to use the Apple Modem Tool successfully, so you have to rely on
>  sending a line like
>
>   ATDT 1-900-MACPERL
>
>  to the Serial Tool.

childress@news-gazette.com
http://www.news-gazette.com/



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch