Jump to content

COMFIED

Members
  • Content Count

    90
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    COMFIED got a reaction from jarto in Preventing Code Tampering   
    I am building a financial transaction system on sms.
    Is there a way to detect/prevent code tampering? - so that in case the compiled HTML/ JS code is modified it will refused to run.
  2. Like
    COMFIED got a reaction from jarto in Accessing W3IFrameHTMLElement URL Clicks   
    Thanks jarto
    It works!
    Is there a way to make the W3DIVHtmlElement scroll vertically like a browser when there is more content than fits in display size - scroll just like W3IFrameHTMLElement?
  3. Like
    COMFIED got a reaction from UternRax in Reading a JSON POST   
    I'm trying to build a Facebook messenger bot.  It requires reading and sending JSON data from messenger.
     
    Sending a json post message is no problem.
    Anyone with an idea on how to READ incoming JSON POST data using SMARTMOBILESTUDIO?  In other words can a SMARTMOBILESTUDIO html webapp work as a webhook?
  4. Like
    COMFIED reacted to lynkfs in Reading a JSON POST   
    You'll have to work with some limiting conditions if you want to do this
     
    For one, post-ing means you'll need a server side component to handle that
    so node.js or php, not client-side 
     
    Also Facebook requires you to set up both get and post mechanisms and I think they enforce https as well
     
    I assume you're familiar with posts like this
    http://www.girliemac.com/blog/2017/01/06/facebook-apiai-bot-nodejs/
    which detail how to make a webhook enabled facebook bot
     
    To answer your question
    I think ... it would be possible to use Smart Pascal to produce your node.js webhook handler (webhook.js)
    I haven't done it myself though.
     
    Its an interesting project,
    Keep us informed if you like
  5. Like
    COMFIED got a reaction from Darincroft in Integrating Phonegap plugin to Send SMS   
    I'm looking for help in integrating the Cordova plugin for sending SMS via SmartMobileStudio for use in android app.
     
    Here is the plugin and code:
    https://www.raymondcamden.com/2014/12/11/cordova-example-sending-sms-messages
     
     
    Any help/ example with how I can use this code in SmartMobileStudio?
  6. Like
    COMFIED got a reaction from two_dog_knight in Integrating Phonegap plugin to Send SMS   
    I'm looking for help in integrating the Cordova plugin for sending SMS via SmartMobileStudio for use in android app.
     
    Here is the plugin and code:
    https://www.raymondcamden.com/2014/12/11/cordova-example-sending-sms-messages
     
     
    Any help/ example with how I can use this code in SmartMobileStudio?
  7. Like
    COMFIED got a reaction from IgorSavkic in Integrating Phonegap plugin to Send SMS   
    I figured it out.
    It's as simple as creating a HTML <form> with variables and then submitting it.
     
    For example
     
    implementation function document: variant; external "document" property;     var
    SMS_RECIEPIENT, MESSAGE_STRING: string
     
     
    W3LabelREG.Caption:= '<form name="RegForm" id="RegForm">'+ '<input type="text" id="number" value="+ SMS_RECIEPIENT+ '"/>'+ '<input type="text" id="message" value="'+ MESSAGE_STRING+ '"/>'+ '<input type="submit" value="SEND SMS" id="sendMessage" />'+ '</form>';   document.RegForm.submit();  
  8. Like
    COMFIED got a reaction from lynkfs in Integrating Phonegap plugin to Send SMS   
    I figured it out.
    It's as simple as creating a HTML <form> with variables and then submitting it.
     
    For example
     
    implementation function document: variant; external "document" property;     var
    SMS_RECIEPIENT, MESSAGE_STRING: string
     
     
    W3LabelREG.Caption:= '<form name="RegForm" id="RegForm">'+ '<input type="text" id="number" value="+ SMS_RECIEPIENT+ '"/>'+ '<input type="text" id="message" value="'+ MESSAGE_STRING+ '"/>'+ '<input type="submit" value="SEND SMS" id="sendMessage" />'+ '</form>';   document.RegForm.submit();  
  9. Like
    COMFIED got a reaction from IElite in DateToStr(Now)   
    I have found a simple way to get the current date and time on the system, irrespective of time zone.
     
     
    USES
    ......, W3C.Date;
     
    procedure TForm1.GetCurrentDate;
    VAR
       Date: JDate = JDate.Create;
       GET_YEAR, GET_MONTH, GET_DAY, GET_HOUR, GET_MIN, GET_SEC: STRING;   ​begin
         GET_YEAR:= FloatToStr(Date.getFullYear);
         GET_MONTH:= FloatToStr(1+ Date.getMonth);
         GET_DAY:= FloatToStr(Date.getDate);
         GET_HOUR:= FloatToStr(Date.getHours);
         GET_MIN:= FloatToStr(Date.getMinutes);
         GET_SEC:= FloatToStr(Date.getSeconds);​
     
    //note that the month value will be between 0 and 11 (0 for January), that is why there is 1 added.
     
     
    end;
  10. Like
    COMFIED reacted to COMFIED in Finding and Opening External File in Drive   
    I am referring to sample code in: http://www.javascripture.com/FileReader

    See example readAsText

    Is there a way of coding this functionality in SmartMobileStudio so that I can read the file contents into a text variable?
  11. Like
    COMFIED got a reaction from Mablecymn in Failed to read XML element, expected tag SMART.   
    I am getting an error when starting Smart Mobile Studio Professional (see attached screenshots).
     
    I purchased license in December 2014, and upgraded from Windows 8.1 to Windows 10 three weeks ago and have been using it without any problem.
     
     
    Kindly assist.


  12. Like
    COMFIED got a reaction from JosephMut in Failed to read XML element, expected tag SMART.   
    I am getting an error when starting Smart Mobile Studio Professional (see attached screenshots).
     
    I purchased license in December 2014, and upgraded from Windows 8.1 to Windows 10 three weeks ago and have been using it without any problem.
     
     
    Kindly assist.


  13. Like
    COMFIED got a reaction from jorn in Failed to read XML element, expected tag SMART.   
    The problem was the file preferences.xml (located in c:\ProgramData) got corrupted.
    I deleted it and restarted the Smart IDE and the file was recreated and the error disappeared.
  14. Like
    COMFIED got a reaction from JosephMut in Reading URL Parameters   
    How can I read parameters passed to the smartmobilestudio index.html file and use the param values in my code?
     
    Example read the id value in index.html/?id=123
  15. Like
    COMFIED got a reaction from JosephMut in Long click/ long press   
    Hi,
     
    I am looking to a way to detect a long tap, say 2-3 seconds on an image or panel so as to enhance user functionality.
     
    There is some JS code for this on http://jsfiddle.net/f23ZW/
     
    Any simple way I can do this using Object Pascal?
  16. Like
    COMFIED got a reaction from Richardmam in Long click/ long press   
    Hi,
     
    I am looking to a way to detect a long tap, say 2-3 seconds on an image or panel so as to enhance user functionality.
     
    There is some JS code for this on http://jsfiddle.net/f23ZW/
     
    Any simple way I can do this using Object Pascal?
  17. Like
    COMFIED got a reaction from Mablecymn in Long click/ long press   
    Hi,
     
    I am looking to a way to detect a long tap, say 2-3 seconds on an image or panel so as to enhance user functionality.
     
    There is some JS code for this on http://jsfiddle.net/f23ZW/
     
    Any simple way I can do this using Object Pascal?
  18. Like
    COMFIED got a reaction from RudyAttemia in Label Text Wrap   
    How can I modify the properties of W3label so that the caption text auto-wraps into multiple lines (like a memo) while aligned to top-left?
  19. Like
    COMFIED got a reaction from RudyAttemia in Numeric Keyboard on Mobile   
    When an input box is selected, is there a way to default the touch screen keyboard to numeric input for iOS, Windows Phone and Android?
     
  20. Like
    COMFIED got a reaction from Ekbergket in Numeric Keyboard on Mobile   
    When an input box is selected, is there a way to default the touch screen keyboard to numeric input for iOS, Windows Phone and Android?
     
  21. Like
    COMFIED got a reaction from Ekbergket in Label Text Wrap   
    How can I modify the properties of W3label so that the caption text auto-wraps into multiple lines (like a memo) while aligned to top-left?
  22. Like
    COMFIED got a reaction from RudyAttemia in Writing File to \res folder in runtime   
    How can I save a text file into the resources folder using code during runtime?
  23. Like
    COMFIED got a reaction from Ekbergket in Writing File to \res folder in runtime   
    How can I save a text file into the resources folder using code during runtime?
  24. Like
    COMFIED got a reaction from Ekbergket in Detecting Browser and Device   
    On the Windows Phone 8.1 (with Lumia Denim update), the phone's IE browser w3_getIsInternetExplorer returns FALSE, w3_getIsAndroid returns TRUE and also w3_getIsSafari also returns TRUE.
     
    But the Windows Phone in-app browser (for the same app on the same phone) when wrapped with Intel XDK or Apache Cordova works correctly - w3_getIsInternetExplorer returns TRUE, w3_getIsAndroid returns FALSE and also w3_getIsSafari also returns FALSE
     
     
    This is a Windows bug. I have reported this bug to Microsoft.
  25. Like
    COMFIED reacted to COMFIED in Writing File to \res folder in runtime   
    Thanks Diaz - I'll use the LocalStorage.
     
    I am trying to save a html file then open and display it using the browser (W3IFrameHTMLElement).
    The usual way would be to assign the browser Src property = res/filename.htm
     
    Is there a way I can do the same with a file from localstorage?  Once I read the content from LocalStorage into a string variable, how can I set the W3IFrameHTMLElement URL to display html content from the variable?
×
×
  • Create New...