nbsp; phonenum:=copy(phonenum,pos('(', phonenum)+1,11); self.SendSMS(sendSMSstr,phonenum); k:=k+1; except begin end; end; Timer1.Enabled:=false; Timer2.Enabled:=true; bsSkinCheckListBox1.Checked[i] := False; //发送完后取消发送用号码 end; if k>=1 then exit; end; endelse if SMSPHONE.lines[0]<>'' thenbegin k:=0; for i:=0 to SMSPHONE.lines.count-1 do begin try self.SendSMS(sendSMSstr,SMSPHONE.Lines[i]); k:=k+1; //待记录发送结果 except begin end; end; Timer1.Enabled:=false; Timer2.Enabled:=true; SMSPHONE.Lines.Delete(i); //发送完后删除发送方 if k>=1 then exit; end;end ;end; procedure Tmainform.Timer2Timer(Sender: TObject);var SendData:string;i:integer;begin //发送 if bsSkinListBox1.Items.Count>0 then begin try if length(bsSkinListBox1.Items[0])>50 then Timer2.Interval:=10000 else Timer2.Interval:=2000; except begin end; end; SendData:=bsSkinListBox1.Items[0]; comm1.WriteCommData(pchar(SendData),Length(SendData)); //正式发送1 bsSkinListBox1.Items.Delete(0); bsSkinMemo4.Lines.Add(FormatDateTime('YYYY-mm-dd HH:mm:ss ',now())+' 发送命令:'); end else begin Timer2.Enabled:=false; Timer1.Enabled:=true; bsSkinMemo4.Lines.Add(FormatDateTime('YYYY-mm-dd HH:mm:ss ',now())+'###################向手机' + Mobileout + '发送短信成功'); end; end; 采用ListBox 主要是存放已编码的数据 测试时 需要有GSM MODE支持