Page 1 of 1

TouchScreen Dial Keypad

Posted: Mon Sep 28, 2026 4:42 pm
by daddytims_tims
Hi

Good morning

I am having a small problem with, figuring out how can I get my keypad to dial 7-digit numbers then initialized a call

In my current program;
If I press "#" ALONE it sends off and makes a call
If I dial any 1 or up to 6-digit numbers, it sends off and makes a call

What I want is Only when I Reach 7 digits Then that's the time it should make a call.

Any Help? Please and thank you.

Regards

Re: TouchScreen Dial Keypad

Posted: Mon Sep 28, 2026 8:19 pm
by mnfisher
Assuming '#' is widget 12 - you have if widgetpressesd = 12 ... cmd = ATD876 + tmpstr.+ "\r\n" - which I'd guess does dial.

You perhaps want to add a check that tmpstr contains sufficient digits for a valid number (if (widgetpressed == 12) && (Length$(tempstr) == 7))) then dial...

or Length$(tempstr) >= 7 - to allow for longer strings - although you might want to truncate - or throw an error if tempstr has more than 7 digits?

Martin

Re: TouchScreen Dial Keypad

Posted: Tue Sep 29, 2026 4:07 pm
by daddytims_tims
Hi Martin,

Goodmorning.

Thanks for your help.
The first one works great for me..

I prefer for it to be exact 7 as i already have the area code inside the prgramm already...

So how do I set it to be. If greater than 7. Throw in an error ?

Regards

Re: TouchScreen Dial Keypad

Posted: Tue Sep 29, 2026 4:15 pm
by mnfisher
Glad it worked.

As to an error - depends how you want to handle it - for example you could ignore digits after 7 have been entered.

Or - better:

You could alert the user - display an error message (invalid phone number?) - similarly - if the user presses '#' before sufficient digits - display - "invalid number please enter 7 digits"

Martin

Re: TouchScreen Dial Keypad

Posted: Tue Sep 29, 2026 4:34 pm
by daddytims_tims
Thats awsome. I would prefer the second option.
How can I set that up?.


Regards

Re: TouchScreen Dial Keypad

Posted: Thu Oct 01, 2026 7:08 am
by mnfisher
I'm not at a computer - but.

Something like:

Add a macro Dial(string number)

Then in your loop - if (widgetoressed ==12) Dial(tmpstr)

In Dial (number)
.len = LengthStr$(.number)
if(.len != 7) Message("Invalid number - please enter 7 digits)
else
.msg = "Dialling " + .number
Message(.msg)
.... do the call ATD....
Message("Hanging up")

etc