H
hs-kill
Unregistered / Unconfirmed
GUEST, unregistred user!
下面是一短调用网页发短信的代码 很奇怪的是 在调用后居然需要sleep一下 否则收不到短信,哪位知情人能告诉我一下啊~~~谢了~~~
/////////////////////////////////////////////////////////////////////
procedure sendmessage(num:string;str:string);
var
a:string;
text1:string; //消息发送控制字符
IEApp: Variant;
begin
a:=Copy(num,1,3);
IEApp := CreateOLEObject('InternetExplorer.Application');
IEApp.visible := false;
IEApp.Top := 0;
IEApp.Left := 0;
IEApp.width := screen.width;
IEApp.height := screen.height;
////联通手机
if (a='130') or (a='131') or (a='132') or (a='133') then
begin
text1:='http://211.157.2.2:8081/aircomsms/sendsms.jsp?srcmbl=99808484&destmbl=';
text1:=text1+num+'&feembl=';
text1:=text1+num+'&msgfmt=15&msg='+str+'&msglevel=1&type=02&incode=069000&uid='隐藏'&pwd='隐藏'&ip=';
IEApp.Navigate(text1);
frm_main.Label4.Font.Color:=clblue;
frm_main.label4.Caption:='消息已经成功发送! ';
end;
//移动手机
if (a='135') or (a='136') or (a='137') or (a='138') or (a='139') then
begin
text1:='http://211.157.2.2:8081/aircomsms/sendsms.jsp?srcmbl=80008484&destmbl=';
text1:=text1+num+'&feembl=';
text1:=text1+num+'&msgfmt=15&msg='+str+'&msglevel=1&type=02&incode=069000&uid='隐藏'&pwd='隐藏'&ip=';
// sleep(3000);
IEApp.Navigate(text1);
sleep(1000); //等待1秒后才能正常发送短信 ???为什么
frm_main.label4.Font.Color:=clblue;
frm_main.label4.Caption:='消息已经成功发送! ';
end;
end;
/////////////////////////////////////////////////////////////////////
procedure sendmessage(num:string;str:string);
var
a:string;
text1:string; //消息发送控制字符
IEApp: Variant;
begin
a:=Copy(num,1,3);
IEApp := CreateOLEObject('InternetExplorer.Application');
IEApp.visible := false;
IEApp.Top := 0;
IEApp.Left := 0;
IEApp.width := screen.width;
IEApp.height := screen.height;
////联通手机
if (a='130') or (a='131') or (a='132') or (a='133') then
begin
text1:='http://211.157.2.2:8081/aircomsms/sendsms.jsp?srcmbl=99808484&destmbl=';
text1:=text1+num+'&feembl=';
text1:=text1+num+'&msgfmt=15&msg='+str+'&msglevel=1&type=02&incode=069000&uid='隐藏'&pwd='隐藏'&ip=';
IEApp.Navigate(text1);
frm_main.Label4.Font.Color:=clblue;
frm_main.label4.Caption:='消息已经成功发送! ';
end;
//移动手机
if (a='135') or (a='136') or (a='137') or (a='138') or (a='139') then
begin
text1:='http://211.157.2.2:8081/aircomsms/sendsms.jsp?srcmbl=80008484&destmbl=';
text1:=text1+num+'&feembl=';
text1:=text1+num+'&msgfmt=15&msg='+str+'&msglevel=1&type=02&incode=069000&uid='隐藏'&pwd='隐藏'&ip=';
// sleep(3000);
IEApp.Navigate(text1);
sleep(1000); //等待1秒后才能正常发送短信 ???为什么
frm_main.label4.Font.Color:=clblue;
frm_main.label4.Caption:='消息已经成功发送! ';
end;
end;