Page 2 of 4 FirstFirst 1234 LastLast
Results 41 to 80 of 146

Thread: [RESOLVED] sending sms with listview and checkbox in listview

  1. #41
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: sending sms with listview and checkbox in listview

    haha playing tricks ...

  2. #42

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: sending sms with listview and checkbox in listview

    im serios
    can you help me?

  3. #43
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: sending sms with listview and checkbox in listview

    dont lie bro ...

  4. #44
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    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 ?


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  5. #45

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: sending sms with listview and checkbox in listview

    Quote Originally Posted by akhileshbc View Post
    @salsa31:
    What exactly is your current issue ?

    Sending a message or pulling data from the database ?

    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

  6. #46

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: sending sms with listview and checkbox in listview

    Quote Originally Posted by useruseronline View Post
    dont lie bro ...
    i'm not lying my friend
    im not a kid

  7. #47
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: sending sms with listview and checkbox in listview

    Quote Originally Posted by akhileshbc View Post
    @salsa31:
    What exactly is your current issue ?

    Sending a message or pulling data from the database ?

    he wants to load data form database and snd msg to slected persons with numbers writen next to them

    person001 0354-1233243

  8. #48
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: sending sms with listview and checkbox in listview

    Quote Originally Posted by salsa31 View Post
    i'm not lying my friend
    im not a kid
    sory bro i thought u were joking sorry

  9. #49
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    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.

    Last edited by akhileshbc; May 27th, 2012 at 10:34 AM. Reason: spelling mistakes

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  10. #50
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: sending sms with listview and checkbox in listview

    he just wants to separat selected list with numbers

  11. #51
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: sending sms with listview and checkbox in listview

    Quote Originally Posted by useruseronline View Post
    he just wants to separat selected list with numbers
    Means ?

    Selecting data from ListView ?

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  12. #52
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: sending sms with listview and checkbox in listview

    yup ...

  13. #53

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: sending sms with listview and checkbox in listview

    Quote Originally Posted by akhileshbc View Post
    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, "&#37;", "%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

  14. #54

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: sending sms with listview and checkbox in listview

    this is the form for the sms

  15. #55
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: sending sms with listview and checkbox in listview

    done see this work

  16. #56
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: sending sms with listview and checkbox in listview

    uzip in same folder
    Attached Files Attached Files

  17. #57
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: sending sms with listview and checkbox in listview

    only click names

  18. #58

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    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

  19. #59
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: sending sms with listview and checkbox in listview

    dont use database , use text file database then this will work perfectly

  20. #60
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    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.


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  21. #61

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    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

  22. #62

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: sending sms with listview and checkbox in listview

    Quote Originally Posted by akhileshbc View Post
    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.

    what do you meen multiple tags?
    i can send how many sms i want i buy the sms

  23. #63

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    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?

  24. #64
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    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..

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  25. #65

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: sending sms with listview and checkbox in listview

    Quote Originally Posted by akhileshbc View Post
    Code:
    ListView1.SelectedItem.Text  ' <-- will give you the first column
    ListView1.SelectedItem.SubItems(1) ' <-- will give you the second column and so on..
    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

  26. #66
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: sending sms with listview and checkbox in listview

    Quote Originally Posted by salsa31 View Post
    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.


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  27. #67
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    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

  28. #68

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: sending sms with listview and checkbox in listview

    Quote Originally Posted by akhileshbc View Post
    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.

    ahh
    no
    beacuse this code needs to be compiled and send to a customer of the company

  29. #69

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: sending sms with listview and checkbox in listview

    [QUOTE=useruseronline;4177363]
    Quote Originally Posted by salsa31 View Post
    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

  30. #70
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: sending sms with listview and checkbox in listview

    [QUOTE=salsa31;4177366]
    Quote Originally Posted by useruseronline View Post

    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

  31. #71

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    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>"

  32. #72
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: sending sms with listview and checkbox in listview

    Assuming, your API provider allows multiple TO elements.
    vb Code:
    1. Private Function getSelectedNums() As String
    2.     Dim temp As String
    3.     temp = ""
    4.    
    5.     Dim i As Long
    6.     For i = 1 To ListView1.ListItems.Count  '~~~ Loop through the listview
    7.         If ListView1.ListItems(i).Checked = True Then   '~~~ if an item is checked
    8.             temp = temp & "<TO>" & ListView1.ListItems(i).SubItems(1) & "</TO>" & vbCrLf    '~~~ enclose the number in "<TO>" tags
    9.         End If
    10.     Next
    11.    
    12.     getSelectedNums = temp  '~~~ return it
    13. End Function

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  33. #73

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: sending sms with listview and checkbox in listview

    Quote Originally Posted by akhileshbc View Post
    Assuming, your API provider allows multiple TO elements.
    vb Code:
    1. Private Function getSelectedNums() As String
    2.     Dim temp As String
    3.     temp = ""
    4.    
    5.     Dim i As Long
    6.     For i = 1 To ListView1.ListItems.Count  '~~~ Loop through the listview
    7.         If ListView1.ListItems(i).Checked = True Then   '~~~ if an item is checked
    8.             temp = temp & "<TO>" & ListView1.ListItems(i).SubItems(1) & "</TO>" & vbCrLf    '~~~ enclose the number in "<TO>" tags
    9.         End If
    10.     Next
    11.    
    12.     getSelectedNums = temp  '~~~ return it
    13. End Function
    where do i put this code?
    i just want to be able to choose a contact form the listview and send him a sms
    Last edited by salsa31; May 27th, 2012 at 11:30 AM.

  34. #74

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    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

  35. #75
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: sending sms with listview and checkbox in listview

    exactly u can do this with text file format

  36. #76

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: sending sms with listview and checkbox in listview

    Quote Originally Posted by useruseronline View Post
    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

  37. #77
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    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 ?


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  38. #78
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: sending sms with listview and checkbox in listview

    yup done
    Attached Files Attached Files

  39. #79
    Hyperactive Member
    Join Date
    May 2012
    Posts
    339

    Re: sending sms with listview and checkbox in listview

    see this file done just select list and click send

  40. #80

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: sending sms with listview and checkbox in listview

    Quote Originally Posted by akhileshbc View Post
    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 ?

    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

Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width