TIP: Click on subject to list as thread! ANSI
echo: qedit
to: ALL
from: `Y.T.LIM - ERICSSON`
date: 1997-07-15 02:58:00
subject: TSE Dialer

From: "Y.T.Lim - Ericsson" 
This is a simple dialer for TSE running under Win95. Now you can make
phone calls even from TSE. Have fun!
/Y.T.
/***************************************************************************
 *
 *    File     :  Dialer.S
 *
 *    Author   :  Y.T.Lim
 *    Date     :  07/14/97 (02:10 pm)
 *
 * Description :  A TSE dialer using TAPI32.DLL.
 *
 *                With this macro, you can put your cursor at the
 *                telephone number and run the macro. It'll then
 *                dial the number for you automatically. By default,
 *                it uses space as delimiters. So if you have spaces
 *                between the digits, mark the number first and then
 *                run the macro.
 *
 *                The standard for writing a telephone number is to
 *                have a plus(+) preceding the country code and a pair
 *                of brackets around the area code, e.g.
 *                +61(3)123-4567, +1(512)234-5678.
 *
 *                This macro will also map phone keypad letters to numbers,
 *                e.g. it'll work with numbers like 1800-CALL-ATT, it gets
 *                converted to 1800-2255-288 before the call is made.
 *
 * 
 * Revision    :  1.0
 *
 **************************************************************************/
dll ""
        integer proc tapiRequestMakeCall(
          string lpszDestAddress : cstrval,
          string lpszAppName : cstrval,
          string lpszCalledParty : cstrval,
          string lpszComment : cstrval
        )
end
proc Dialer(string DestAddress,
            string AppName,
            string CalledParty,
            string Comment)
        tapiRequestMakeCall(DestAddress,
                            AppName,
                            CalledParty,
                            Comment)
end
// translate letters to numbers
// note that there is no "Q" or "Z"
string proc Alpha2Num(string t)
        integer i = 0
        string s[50] = t
        while (i <= length(s))
                case s[i]
                        when 'A','B','C'
                                s[i] = "2"
                        when 'D','E','F'
                                s[i] = "3"
                        when 'G','H','I'
                                s[i] = "4"
                        when 'J','K','L'
                                s[i] = "5"
                        when 'M','N','O'
                                s[i] = "6"
                        when 'P','R','S'
                                s[i] = "7"
                        when 'T','U','V'
                                s[i] = "8"
                        when 'W','X','Y'
                                s[i] = "9"
                endcase
                i = i + 1
        endwhile
        return(s)
end
proc main()
//proc TseDialer()
        string s[50], saved_wordset[32]
        if (isCursorInBlock() == _INCLUSIVE_)
                s = Alpha2Num(upper(GetMarkedText()))
        else
                saved_wordset = set(WordSet,ChrSet("+a-pr-yA-PR-Y0-9()-"))
                s = Alpha2Num(upper(GetWord()))
                set(WordSet,saved_wordset)  // restore character set
        endif
        if (length(s))
                Dialer(s,"TSE Dialer","","")
        endif
end
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.