If/Then statements ?
Is there a way to send a text message from the value collected on a received message?
I'd like to recieve a message, read it from getWebViewString, then run javascript and send the result as a text message.
Thanks for any help
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width initial-scale=1.0">
<body>
<h1>success</h1>
<span id="sp"><span>
<h1>success</h1>
</body>
<script>
function collectMessage() {
document.getElementById("sp").innerHTML = window.AppInventor.getWebViewString();
}
setInterval(collectMessage, 500);
</script>
</html>
Where/When are you setting the webviewstring? Get the message from there in your app and use it to send a message ? Not quite sure why you are using a webviewer/javascript in this way, if you already have the message ?
I'm setting the webviewstring from a received text message. Then my javascript is setting it to the sp span. I want to run additional javascript code, then send a customized text message back.
Can all of that happen inside 500ms ?
Might be easier to call a fresh webpage when the message text is received, do you thing in the web page and return the custom message in the webviewstring.
I want to be able to set values to Text1.Message and then send the message to a given phone number via javascript. Is that possible?
Not sure why you need to use javascript for that, but yes, it is possible, without seeing exactly what it is you want to do...
I'm trying to create a SMS CLI if that gives more clue to what I'm up to.
It's going to be an SMS service that texts people links when they send an SMS to the phone
Why not having your logic in App Inventor? Would be much easier...
Taifun
Why not having your logic in App Inventor? Would be much easier...
I want to run javascript because I will be sending crypto tokens I make and I need to reference a client javascript library to do so. Is there a way to keep the logic in App Inventer or am I right for using javascript on a webviewer?