SMS for PB ?

Just starting out? Need help? Post your questions and find answers here.
PWS32
User
User
Posts: 85
Joined: Sat May 10, 2003 1:02 pm
Location: Germany

SMS for PB ?

Post by PWS32 »

Hi,

I have found a tool to send a sms with own programs

this tools are DLL with the name : ASMSCTRL.DLL (the SMS and Pager Toolkit COM component)

any examples found on the site : http://www.activexperts.com/activsms/
one of these examples is a VBScript

you found on this site any parameters for any countrys : http://www.activexperts.com/activsms/smsclist/

Code: Select all


' ********************************************************************
' Example1:
'    Sends an SMS message through a service provider.
' (c) Copyright 2003 by ActiveXperts Software - www.activexperts.com
' ********************************************************************

Option Explicit

Dim asObj

Set asObj = CreateObject( "ActiveXperts.SMSC" )

Wscript.Echo "ActiveXperts SMS/Pager Toolkit " & asObj.Version & " demo."
Wscript.Echo "Expiration date: " & asObj.ExpirationDate & vbCrLf

WScript.Echo "Please visit http://www.activexperts.com/activsms/smsclist/ for a list of SMSC service providers. Use the appropriate provider properties in the fields of the object, like ProviderType, ModemSpeed, ModemsSettings and so on)"

asObj.ProviderDialString = "1122334455" ' Provider's full dial-in number, including dial prefixes, int. dialoing codes etc.
asObj.ProviderType = 1		   ' UCP = 0, TAP = 1
asObj.PortID = 1                   ' Comport
asObj.ModemSpeed = 1200            ' Depends on provider. 1200bps is most common
asObj.ModemSettings = "7,e,1"	   ' 7,e,1 or 8,n,1. Depends on provider
asObj.Sender = "00000000000"       ' Set your own mobile phone number here; only digits are allow, minimum 1 character, max. 16 characters
asObj.Recipient = "004412345678"   ' Recipient's mobile phone number. Format depends on providers. Most common formats are: 004412345678, 4412345678 and 12345678
asObj.MessageText = "Hello, world" ' SMS message to send. Must be less than 160 characters
asObj.LogFile = "c:\smslog.txt"    ' Trace log to see what's going on
asObj.SendMessage TRUE	           ' TRUE means: through provider, not through GSM

If( asObj.LastError <> 0 ) Then
    WScript.Echo "Failed to send message, error: " & asObj.LastError & " (" & asObj.GetErrorDescription( asObj.LastError ) & ")"
    WScript.Echo "To view the trace file, open " & asObj.LogFile & "."
Else
    WScript.Echo "Message successfully delivered"
End If
this tools are also use by PB or can one translate this vbscript to BP ?

Best Regards,
Peter
Last edited by PWS32 on Sun Jan 18, 2004 9:45 pm, edited 1 time in total.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

what is BP ?? :P
quidquid Latine dictum sit altum videtur
PWS32
User
User
Posts: 85
Joined: Sat May 10, 2003 1:02 pm
Location: Germany

Post by PWS32 »

sorry im mean PB
jpeltola
New User
New User
Posts: 2
Joined: Thu May 29, 2003 8:31 am
Location: FINLAND

Post by jpeltola »

Maybe you can use extended AT-commands.
So you dont need that DLL at all.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

yep, open a comport, send the at commands to build up a line, then send the data (just ascii) necessary to send the message, then an escape sequence and disconnect using the at commands

i've done that in the past here in the netherlands, but some companies offer to do it via email, that's easier, or http, fancy and semi real time, or tcp/ip plus some protocoll of their own (hey, i worked for one of them :-))
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Are there any DLL with some function to recharge cellular-phone with any euro amount? :)
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

you wouldn't believe it, but...

there actually is an api (NOT a winapi, but a https session to *somebody's* server that *would* allow online upgrading, in fact, it is in use by a telecom company in the netherlands, which supports online upgrading (to give some more details: you're dialling into a voice response system, that system takes some numbers, then does a https post (might have the exact term wrong here, i just managed the project, don't ask me techie details :-)) with the number / subscriber code to update the credits left

scary, isn't it?

but no, it's not a dll :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply