Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5034 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I currently use 360 works email plugin together with an Email to SMS service to send text messages from Filemaker to my customers . Lately there have been some reliability issues due to email servers blocking traffic. The company that does the email to sms conversion suggested I use an http post method to get the message from my database to their server, bypassing email completely. I noticed that Scriptmaster has been updated to handle http post , but I am completely out of my depth regarding this. Does anyone have any experience in using this plugin. I have some information from the company here: http://www.txtlocal.co.uk/sms-api.php . I am currently using a table called "outbox" that has fields called "message" , "to" and a script on FM9 Server running every 2 mins that finds any "pending" messages , sends them and sets a field to "sent".

Any help would be apreciated

Posted (edited)

yep , here it is:

Set Error Capture [ On ]

Go to Layout [ “SMS Centre Outbox” (SMS Centre Outbox) ]

Enter Find Mode [ ] Set Field [ SMS Centre Outbox::Message_status; "Pending" ]

Perform Find [ ]

If [ Get ( LastError ) <> 0 ]

Else

Go to Record/Request/Page [ First ]

Set Field [ SMS Centre Outbox::Message_status; "Sent" ]

Set Variable [ $result; Value:WARegister ("regkey" ; "mycompanyname") ] Set Variable [ $result; Value:WASetInputValue( "uname" ; "myusername" ) & WASetInputValue( "pword" ; "mypassword") & WASetInputValue( "message" ; SMS Centre Outbox::Message) & WASetInputValue( "selectednums" ; SMS Centre Outbox:;) Recipient_formatted)& WASetInputValue( "from" ; "sender=mynumber") & WAGetURL( "https://www.txtlocal.com/sendsmspost. php") ]

Loop

Go to Record/Request/Page [ Next; Exit after last ]

Set Variable [ $result; Value:WARegister ("regkey" ; "mycompanyname") ] Set Variable [ $result; Value:WASetInputValue( "uname" ; "myusername" ) & WASetInputValue( "pword" ; "mypassword") & WASetInputValue( "message" ; SMS Centre Outbox::Message) & WASetInputValue( "selectednums" ; SMS Centre Outbox:: Recipient_formatted)& WASetInputValue( "from" ; "sender=mynumber") & WAGetURL( "https://www.txtlocal. com/sendsmspost.php") ]

Set Field [ SMS Centre Outbox::Message_status; "Sent" ]

End Loop

Set Variable [ $result; Value:WARegister ("regkey" ; "mycompanyname") ]

Set Field [ SMS Centre Outbox::Remaining_sms_credit; Trim4(Let ( setup = WAReset & WASetInputValue( "uname" ; "txtlocalusername" ) & WASetInputValue( "pword" ; "mypassword" ) ; WAGetURL( "https://www.txtlocal.com/getcredits.php" ) )) ]

End If

I have this script triggered every minute from FM Server 9 and I have a table called SMS Outbox that holds the recipient, message and a pending/sent status.

the last line of the script gets the remaining balance of credit from txtlocal and stores it in a global field.

I hope it is of some use.

Edited by Guest
Posted

... weird, you've got some unnecessary stuff in there - a few minor changes


Set Error Capture [ On ]

Go to Layout [ “SMS Centre Outbox” (SMS Centre Outbox) ]

Enter Find Mode [ ] Set Field [ SMS Centre Outbox::Message_status; "Pending" ]

Perform Find [ ]



If [ Get ( LastError ) = 0 ]



Go to Record/Request/Page [ First ]

Loop

Set Variable [ $result; Value:WARegister ("regkey" ; "mycompanyname") ] Set Variable [ $result; Value:WASetInputValue( "uname" ; "myusername" ) & WASetInputValue( "pword" ; "mypassword") & WASetInputValue( "message" ; SMS Centre Outbox::Message) & WASetInputValue( "selectednums" ; SMS Centre Outbox: Recipient_formatted)& WASetInputValue( "from" ; "sender=mynumber") & WAGetURL( "https://www.txtlocal. com/sendsmspost.php") ]

Set Field [ SMS Centre Outbox::Message_status; "Sent" ]

Go to Record/Request/Page [ Next; Exit after last ]

End Loop

Set Variable [ $result; Value:WARegister ("regkey" ; "mycompanyname") ]

Set Field [ SMS Centre Outbox::Remaining_sms_cre dit; Trim4(Let ( setup = WAReset & WASetInputValue( "uname" ; "txtlocalusername" ) & WASetInputValue( "pword" ; "mypassword" ) ; WAGetURL( "https://www.txtlocal.com/getcredits.php" ) )) ]



End If

  • 2 years later...

This topic is 5034 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.