I am still having the most horrific time working with the phone dialer (although I am still delighted that parts of it are working just fine).
It may help to know that my (10-digit) telephone numbers are formatted (on element exit) as (123) 123-1234.
I am currently using the following code:
Var vReturn as Int
if @lt(home,5) = "(813)" or @lt(home,5) = "(727)" then
Vreturn = @shell(@chr(34) + "C:\Program Files\sesame\utilities\dialer.exe" + @Chr(34) + Home)
if not @lt(home,5) = "(813)" or @lt(home,5) = "(727)" then
Vreturn = @shell(@chr(34) + "C:\Program Files\sesame\utilities\dialer.exe" + @Chr(34) + Home)
If not vReturn = 0 then
@msgbox ("Problem!!! Dialer did not work.", "", "")
If the number I am dialing begins with area code (813) or (727) it works just fine.
I am making some assumptions based on this:
1) FOR AREA CODE 813: The utility program itself must know to ignore the symbols ( ) and - because it shows that the number I am dialing as (123) 123-1234 ... and dials it properly. It does NOT dial the area code and this, perhaps, is because of my windows settings.
(In the control panel under Phones & Modems, the Dialing Rules reflect that the area code from which I am dialing is 813).2) FOR AREA CODE 727: I
MUST first dial the area code but must
NOT dial the 1 first. In this case, my programming is apparently accepted "as is."
3) FOR ALL OTHER AREA CODES: Naturally, I have to dial a 1 first and apparently the utility program does not know to automatically do this because - using the above code - I get a "wrong number" each and every time.
I have tried DOZENS and DOZENS of code variations to get the 1 prefix added to the number. I have tried the following code:
Var vReturn as Int
if @lt(home,5) = "(813)" or @lt(home,5) = "(727)" then
Vreturn = @shell(@chr(34) + "C:\Program Files\sesame\utilities\dialer.exe" + @Chr(34) + Home)
if not @lt(home,5) = "(813)" or @lt(home,5) = "(727)" then
Vreturn = @shell(@chr(34) + "C:\Program Files\sesame\utilities\dialer.exe" + @Chr(34) + 1 + Home)
If not vReturn = 0 then
@msgbox ("Problem!!! Dialer did not work.", "", "")
In this case, the msgbox appeared.
I have also tried many variations of the code Bharat recommended and nothing has worked.
In one case (which unfortunately I can't replicate at present) I got a message that windows could not find: C:\Program Files\Sesame\Utilities\Dialer.exe11232331234.
Woe is me!!!