|
|
|
@ -79,19 +79,25 @@ class SimserFrame(wxFrame):
|
|
|
|
|
self.foodialog.Show(true)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
# Remove funny characters
|
|
|
|
|
nr = re.sub("\(", "", nr)
|
|
|
|
|
nr = re.sub("\)", "", nr)
|
|
|
|
|
nr = re.sub(" ", "", nr)
|
|
|
|
|
|
|
|
|
|
# Quote text
|
|
|
|
|
text = re.sub("'", "''", text)
|
|
|
|
|
nr = re.sub("'", "''", nr)
|
|
|
|
|
|
|
|
|
|
# Send SMS and report back
|
|
|
|
|
rc = os.system("echo '" + text + "' | gsmsendsms '" + nr + "'")
|
|
|
|
|
#rc = os.system("echo '" + text + "' | gsmsendsms '" + nr + "'")
|
|
|
|
|
rc = os.system("echo '" + text + "' | gnokii --sendsms '" + nr + "'")
|
|
|
|
|
if(rc == 0):
|
|
|
|
|
self.foodialog = wxMessageDialog(self.panel,
|
|
|
|
|
"Message sent to " + nr,
|
|
|
|
|
"Success", wxOK, wxPoint(100, 100))
|
|
|
|
|
else:
|
|
|
|
|
self.foodialog = wxMessageDialog(self.panel,
|
|
|
|
|
"gsmsendsms returned error code: " + str(rc >> 8),
|
|
|
|
|
"returned error code: " + str(rc >> 8),
|
|
|
|
|
"Error", wxOK, wxPoint(100, 100))
|
|
|
|
|
|
|
|
|
|
self.foodialog.Show(true)
|
|
|
|
|