Avatar of danz67
danz67Flag for Italy

asked on 

DELPHI 7 - AsyncPro SMS

hi,
use components AsyncPro to send sms via GSM phone.
Can i send a sms to many recipients, and use a custom from?
Thanks
Delphi

Avatar of undefined
Last Comment
Ferruccio Accalai
Avatar of danz67
danz67
Flag of Italy image

ASKER

Today all is quiet :(
Avatar of Ferruccio Accalai
From the reference guide (http://tpapro.sourceforge.net/docs/APRO_ReferenceGuide.pdf page 870 (877 of the pdf))

Use OnNextMessage event to send another message
Set there the new Address and Message values and set NextMessageReady to true.
When the last message is sent then set there NextMessageReady to False.
The OnSessionFinish event then is fired (where you can show any finished message or do any other kind of stuff)

Avatar of danz67
danz67
Flag of Italy image

ASKER

I tried and successfully sends the message to multiple addresses, when I finish I can not set to send "OnGSMComplete event" NextMessageReady to False.

Finally, if you use a memo addressed to read as I browse through the items?

Thankx
Avatar of danz67
danz67
Flag of Italy image

ASKER

"Finally, if you use a memo addressed to read as I browse through the items?"

not respond to this, I know but forgot to do
ASKER CERTIFIED SOLUTION
Avatar of Ferruccio Accalai
Ferruccio Accalai
Flag of Italy image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Assuming the "i" start at 0 and finish at Memo1.Lines.Count, you can simplify a bit

I'll also call "i" CurrentMessage and assume MessageSendTo is a TStrings where the adress are , as these are probably global variables (or global to the form/datamodule) they'd better have a good name

Yet the idea is the same, good work Ferruccio !
NextMessageReady:= CurrentMessage < MessageSendTo.Count;
if NextMessageReady Then
 begin
  SMSAddress := MessageSendTo [CurrentMessage]; 
  Inc(CurrentMessage);
 end;

Open in new window

Avatar of danz67
danz67
Flag of Italy image

ASKER

through Ferruccio68 everything works fine, but lacks the other response, that
Can I use a custom from?
If you never change it, it remains assigned as you did the first time.
Avatar of danz67
danz67
Flag of Italy image

ASKER

how can I change it?
Maybe I'm misunderstanding the q.

In TADPGSMPhone there's not such FROM value, as it uses the GSM Phone interface, so the "From" is always stored by the phone
Delphi
Delphi

Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.

60K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo