-
Re: sending sms with listview and checkbox in listview
-
Re: sending sms with listview and checkbox in listview
im serios
can you help me?
-
Re: sending sms with listview and checkbox in listview
-
Re: sending sms with listview and checkbox in listview
@salsa31:
What exactly is your current issue ?
Sending a message or pulling data from the database ? :confused:
:wave:
-
Re: sending sms with listview and checkbox in listview
Quote:
Originally Posted by
akhileshbc
@salsa31:
What exactly is your current issue ?
Sending a message or pulling data from the database ? :confused:
:wave:
yes
names and numbers to see who im sending to
and and option check box or some to choose
or to send to all
i uploaded in this thread the form and a pic
-
Re: sending sms with listview and checkbox in listview
Quote:
Originally Posted by
useruseronline
dont lie bro ...
i'm not lying my friend
im not a kid
-
Re: sending sms with listview and checkbox in listview
Quote:
Originally Posted by
akhileshbc
@salsa31:
What exactly is your current issue ?
Sending a message or pulling data from the database ? :confused:
:wave:
he wants to load data form database and snd msg to slected persons with numbers writen next to them
person001 0354-1233243
-
Re: sending sms with listview and checkbox in listview
Quote:
Originally Posted by
salsa31
i'm not lying my friend
im not a kid
sory bro i thought u were joking sorry
-
Re: sending sms with listview and checkbox in listview
You have two options to send SMS from PC.
Option1:
Use a webservice to send SMS. A bulk SMS service provides you APIs to send SMS through their gateway. The merit is, you don't need a device attached to your PC to send the msg. It is webbased.
Option2:
Connect a mobile phone or a GSM modem, and make use of it to send the message. You need to use AT commands to send message. Or use some ready made wrappers(ActiveX controls or DLLs) that will help you in this process.
:wave:
-
Re: sending sms with listview and checkbox in listview
he just wants to separat selected list with numbers
-
Re: sending sms with listview and checkbox in listview
Quote:
Originally Posted by
useruseronline
he just wants to separat selected list with numbers
Means ?
Selecting data from ListView ?
-
Re: sending sms with listview and checkbox in listview
-
Re: sending sms with listview and checkbox in listview
Quote:
Originally Posted by
akhileshbc
Means ?
Selecting data from ListView ?
yes exactly
and i already have a api code from a web company
this is the code for sending sms
****************************
Private Sub btnsend_Click()
Dim args
Set winObj = CreateObject("WinHttp.WinHttpRequest.5.1")
Call winObj.Open("POST", "https://cellactpro.net/GlobalSms/ExternalClient/GlobalAPI.asp", False)
winObj.Option(WinHttpRequestOption_SslErrorIgnoreFlags) = &H3300
winObj.setRequestHeader "User-Agent", "Message Test"
winObj.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
'Build the XML for sending
lsXml = "<PALO><HEAD><FROM>ammishov</FROM><APP USER=""******"" PASSWORD=""******""/><CMD>sendtextmt</CMD></HEAD>"
lsXml = lsXml & "<BODY><CONTENT>" & Text1 & "</CONTENT><DEST_LIST>"
lsXml = lsXml & "<TO>" & Text2 & "</TO>"
lsXml = lsXml & "</DEST_LIST></BODY>"
lsXml = lsXml & "<OPTIONAL><CALLBACK> " & Text3 & "</CALLBACK></OPTIONAL></PALO>"
'wscript.echo lsXml
lsXml = ReplaceData(lsXml)
SendString = "XMLString=" & lsXml
winObj.send (SendString)
result = winObj.responseText
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub
'Replace Problematic Chars
Function ReplaceData(ByRef data)
data = Replace(data, "%", "%25")
data = Replace(data, " ", "%20")
data = Replace(data, "#", "%23")
data = Replace(data, "&", "%26")
data = Replace(data, "?", "%3F")
data = Replace(data, "+", "%2B")
data = Replace(data, "/n", "%0A")
ReplaceData = data
End Function
*********
i just want to be able to select from the list view a customer and send him a sms
or to select all and send sms
thats it
-
Re: sending sms with listview and checkbox in listview
-
Re: sending sms with listview and checkbox in listview
-
1 Attachment(s)
Re: sending sms with listview and checkbox in listview
-
Re: sending sms with listview and checkbox in listview
-
Re: sending sms with listview and checkbox in listview
yes it works but i need a listview bro
look in the pic that i uploaded
the listview is the only way to do this i think
when i select in the listview the checkbox or all
i need the sms to be send that who i ever select from the listview
-
Re: sending sms with listview and checkbox in listview
dont use database , use text file database then this will work perfectly
-
Re: sending sms with listview and checkbox in listview
Does your SMS API provider allows multiple "<TO>" tags ? If so, just loop through the ListView items and for items which have the check mark, include that mobile number within <TO> tags.
:wave:
-
Re: sending sms with listview and checkbox in listview
let me show you part of the sending code
lsXml = lsXml & "<BODY><CONTENT>" & "here i need to write the number to send to, if i write LsVw.SelectedItem it will work? "</CONTENT><DEST_LIST>"
LsVw is the listview
-
Re: sending sms with listview and checkbox in listview
Quote:
Originally Posted by
akhileshbc
Does your SMS API provider allows multiple "<TO>" tags ? If so, just loop through the ListView items and for items which have the check mark, include that mobile number within <TO> tags.
:wave:
what do you meen multiple tags?
i can send how many sms i want i buy the sms:)
-
Re: sending sms with listview and checkbox in listview
if i will write between the lines of the sending sms " listview.selecteditem
it will send to who evere i choose?
-
Re: sending sms with listview and checkbox in listview
Code:
ListView1.SelectedItem.Text ' <-- will give you the first column
ListView1.SelectedItem.SubItems(1) ' <-- will give you the second column and so on..
:wave:
-
Re: sending sms with listview and checkbox in listview
Quote:
Originally Posted by
akhileshbc
Code:
ListView1.SelectedItem.Text ' <-- will give you the first column
ListView1.SelectedItem.SubItems(1) ' <-- will give you the second column and so on..
:wave:
im sry didnt understand
i put this between the sms code?
can you tell me where i put it in the code?
lsXml = lsXml & "<BODY><CONTENT>" & "like this ListView1.SelectedItem.SubItems(1)"</CONTENT><DEST_LIST>"
LsVw is the listview
-
Re: sending sms with listview and checkbox in listview
Quote:
Originally Posted by
salsa31
if i will write between the lines of the sending sms " listview.selecteditem
it will send to who evere i choose?
I mean, will they allow this:
Code:
'....
lsXml = lsXml & "<BODY><CONTENT>" & Text1 & "</CONTENT><DEST_LIST>"
lsXml = lsXml & "<TO>12345</TO>"
lsXml = lsXml & "<TO>98744445</TO>"
lsXml = lsXml & "<TO>20548</TO>"
lsXml = lsXml & "</DEST_LIST></BODY>"
'...
That is multiple items.
:wave:
-
Re: sending sms with listview and checkbox in listview
[QUOTE=salsa31;4177355]let me show you part of the sending code
l LsVw.SelectedItem it will work?
you will have to change this code to list then it will snd
but u will have to bring whole data of database to text data base
-
Re: sending sms with listview and checkbox in listview
Quote:
Originally Posted by
akhileshbc
I mean, will they allow this:
Code:
'....
lsXml = lsXml & "<BODY><CONTENT>" & Text1 & "</CONTENT><DEST_LIST>"
lsXml = lsXml & "<TO>12345</TO>"
lsXml = lsXml & "<TO>98744445</TO>"
lsXml = lsXml & "<TO>20548</TO>"
lsXml = lsXml & "</DEST_LIST></BODY>"
'...
That is multiple items.
:wave:
ahh
no
beacuse this code needs to be compiled and send to a customer of the company
-
Re: sending sms with listview and checkbox in listview
[QUOTE=useruseronline;4177363]
Quote:
Originally Posted by
salsa31
let me show you part of the sending code
l LsVw.SelectedItem it will work?
you will have to change this code to list then it will snd
but u will have to bring whole data of database to text data base
didntwork
-
Re: sending sms with listview and checkbox in listview
[QUOTE=salsa31;4177366]
Quote:
Originally Posted by
useruseronline
didntwork
u r doing it wrong because ur data is mdb format bring it in to two files as i did
the draw the list and code accordingly
-
Re: sending sms with listview and checkbox in listview
look everybody this is the code for the send sms
what do i write between this lines where text2 is?if i have a listview i meen
sXml = lsXml & "<TO>" & Text2 & "</TO>"
-
Re: sending sms with listview and checkbox in listview
Assuming, your API provider allows multiple TO elements.
vb Code:
Private Function getSelectedNums() As String
Dim temp As String
temp = ""
Dim i As Long
For i = 1 To ListView1.ListItems.Count '~~~ Loop through the listview
If ListView1.ListItems(i).Checked = True Then '~~~ if an item is checked
temp = temp & "<TO>" & ListView1.ListItems(i).SubItems(1) & "</TO>" & vbCrLf '~~~ enclose the number in "<TO>" tags
End If
Next
getSelectedNums = temp '~~~ return it
End Function
:wave:
-
Re: sending sms with listview and checkbox in listview
Quote:
Originally Posted by
akhileshbc
Assuming, your API provider allows multiple TO elements.
vb Code:
Private Function getSelectedNums() As String
Dim temp As String
temp = ""
Dim i As Long
For i = 1 To ListView1.ListItems.Count '~~~ Loop through the listview
If ListView1.ListItems(i).Checked = True Then '~~~ if an item is checked
temp = temp & "<TO>" & ListView1.ListItems(i).SubItems(1) & "</TO>" & vbCrLf '~~~ enclose the number in "<TO>" tags
End If
Next
getSelectedNums = temp '~~~ return it
End Function
:wave:
where do i put this code?
i just want to be able to choose a contact form the listview and send him a sms
-
Re: sending sms with listview and checkbox in listview
the only code that i can use is this
sXml = lsXml & "<TO>" & Text2 & "</TO>"
you see the text 2?
if i write the number there it sends sms with no problem
-
Re: sending sms with listview and checkbox in listview
exactly u can do this with text file format
-
Re: sending sms with listview and checkbox in listview
Quote:
Originally Posted by
useruseronline
exactly u can do this with text file format
the only code that i can use is this
sXml = lsXml & "<TO>" & Text2 & "</TO>"
you see the text 2?
if i write the number there it sends sms with no problem
only the listview can help me to selcet 1 or all to send sms
look at the picture
-
Re: sending sms with listview and checkbox in listview
Try it here:
Code:
'....
lsXml = lsXml & "<BODY><CONTENT>" & Text1 & "</CONTENT><DEST_LIST>"
lsXml = lsXml & getSelectedNums()
lsXml = lsXml & "</DEST_LIST></BODY>"
'...
Do you have the docs for that API ?
:wave:
-
1 Attachment(s)
Re: sending sms with listview and checkbox in listview
-
Re: sending sms with listview and checkbox in listview
see this file done :) just select list and click send
-
Re: sending sms with listview and checkbox in listview
Quote:
Originally Posted by
akhileshbc
Try it here:
Code:
'....
lsXml = lsXml & "<BODY><CONTENT>" & Text1 & "</CONTENT><DEST_LIST>"
lsXml = lsXml & getSelectedNums()
lsXml = lsXml & "</DEST_LIST></BODY>"
'...
Do you have the docs for that API ?
:wave:
yes
Dim args
Set winObj = CreateObject("WinHttp.WinHttpRequest.5.1")
Call winObj.Open("POST", "https://cellactpro.net/GlobalSms/ExternalClient/GlobalAPI.asp", False)
winObj.Option(WinHttpRequestOption_SslErrorIgnoreFlags) = &H3300
winObj.setRequestHeader "User-Agent", "Message Test"
winObj.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
'Build the XML for sending
lsXml = "<PALO><HEAD><FROM>ammishov</FROM><APP USER=""******"" PASSWORD=""******""/><CMD>sendtextmt</CMD></HEAD>"
lsXml = lsXml & "<BODY><CONTENT>" & Text1 & "</CONTENT><DEST_LIST>"
lsXml = lsXml & "<TO>" & Text2 & "</TO>"
lsXml = lsXml & "</DEST_LIST></BODY>"
lsXml = lsXml & "<OPTIONAL><CALLBACK> " & Text3 & "</CALLBACK></OPTIONAL></PALO>"
'wscript.echo lsXml
lsXml = ReplaceData(lsXml)
SendString = "XMLString=" & lsXml
winObj.send (SendString)
result = winObj.responseText
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub
'Replace Problematic Chars
Function ReplaceData(ByRef data)
data = Replace(data, "%", "%25")
data = Replace(data, " ", "%20")
data = Replace(data, "#", "%23")
data = Replace(data, "&", "%26")
data = Replace(data, "?", "%3F")
data = Replace(data, "+", "%2B")
data = Replace(data, "/n", "%0A")
ReplaceData = data
End Function