[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

Webbrowser

I have a Delphi 5 program to send to a HTTP site 1 line of text to SMS selected mobiles using WebBrowser1
e.g
'http://gateway.sitename.com.au/sendSMS?UserName=kevin&Password=test10&Recipient=0478111111&Message=This%20is%20a%20message&Sender=0438212142'

Due to the 164chr restriction I have to send a number of records
I loop through and send 1 at a time using WebBrowser1.Navigate(WebAddress) then WebBrowser1DocumentComplete
and timer1 when WebBrowser1DocumentComplete is triggered I then set timer1.enabled to True then
send the next one WebBrowser1.Navigate(WebAddress) webaddress is a string field containing
the examples below

e.g

1.. 'http://gateway.sitename.com.au/sendSMS?UserName=kevin&Password=test10&Recipient=0478111111&Message=This%20is%20a%20message&Sender=0438212142'
2.. 'http://gateway.sitename.com.au/sendSMS?UserName=kevin&Password=test10&Recipient=0478222222&Message=This%20is%20a%20message&Sender=0438212142'
3.. 'http://gateway.sitename.com.au/sendSMS?UserName=kevin&Password=test10&Recipient=0478333333&Message=This%20is%20a%20message&Sender=0438212142'

But the program only sends the last one, Is this a problem in the program
If so what can I do to send each SMS singulary  

or it it a problem with the SMS Supplier
http://gateway.sitename.com.au/sendSMS
0
Kevinfeening
Asked:
Kevinfeening
  • 2
  • 2
1 Solution
 
epasquierCommented:
check that you disable the timer after the timer event is triggered to be sure it won't interfere with the next DocumentComplete

try with a big Interval (like 10000 for 10s) to be sure that even if you let ample time it does not work. Or that it does.
That will help you knowing where the pb comes from.
0
 
KevinfeeningAuthor Commented:
Hi the timer1 is set to 10000
the webaddress string shows the different SMS Numbers but only the last one of the three is sent
the other 2 are overwrittten I think

procedure TForm1.Timer1Timer(Sender: TObject);
begin
  timer1.enabled := false;
  WebBrowser1.Navigate(WebAddress);
end;
0
 
epasquierCommented:
are you sure you have not a limit using this service, that prevent you to send too much SMS ? try with 60000 (1 minute delay) or even worse
0
 
KevinfeeningAuthor Commented:
There was a problem with the SMS Supplier thats why the 10 sec delay wasn't working now OK

Thanks
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now