Quote from clueadventures on February 20, 2019, 6:49 pmIs there an easy way to detect a first run of an app, the aim being that is a user has not yet set up their details the app will go to page x and if they have page y
... and while I'm here - recommended code for dialling a number and sending an sms - please
Is there an easy way to detect a first run of an app, the aim being that is a user has not yet set up their details the app will go to page x and if they have page y
... and while I'm here - recommended code for dialling a number and sending an sms - please

Quote from luishp on February 21, 2019, 10:13 amHi @clueadventures,
If you are talking about VisualNEO Win, the easiest approach is just cheking for the existence of a file. If the file does not exists, then it's the first time. You can even use that file to save user setup details.
FileExists "[PubDir]thedata.dat" "[Result]" If "[Result]" "=" "True" AlertBox "Status" "You have been here!" GotoPage "Welcomeback" Else AlertBox "Status" "It's your first time here!" FileWrite "[PubDir]thedata.dat" "1" "Dummy data" GotoPage "Setup" EndIfIn VisualNEO Web, you can do something similar but, as you can't save files for security reasons you should use Local Storage instead.
Hi @clueadventures,
If you are talking about VisualNEO Win, the easiest approach is just cheking for the existence of a file. If the file does not exists, then it's the first time. You can even use that file to save user setup details.
FileExists "[PubDir]thedata.dat" "[Result]"
If "[Result]" "=" "True"
AlertBox "Status" "You have been here!"
GotoPage "Welcomeback"
Else
AlertBox "Status" "It's your first time here!"
FileWrite "[PubDir]thedata.dat" "1" "Dummy data"
GotoPage "Setup"
EndIf
In VisualNEO Web, you can do something similar but, as you can't save files for security reasons you should use Local Storage instead.
Quote from clueadventures on February 21, 2019, 11:09 amYes I do mean in VisualNeo Web - I can't find an equivalent to
FileExistsin local storage - I thought about just using a variable to achieve the same idea but get an error as on the first run the variable would not exist.
Yes I do mean in VisualNeo Web - I can't find an equivalent to
FileExists
in local storage - I thought about just using a variable to achieve the same idea but get an error as on the first run the variable would not exist.

Quote from luishp on February 21, 2019, 2:41 pmIn VisualNEO Web you can try this:
GetItem "firstTime" [value] If [value] == "ok" AlertBox "Status" "You have been here" "" Else AlertBox "Status" "This is your first time here" "" SetItem "firstTime" "ok" EndIf
In VisualNEO Web you can try this:
GetItem "firstTime" [value] If [value] == "ok" AlertBox "Status" "You have been here" "" Else AlertBox "Status" "This is your first time here" "" SetItem "firstTime" "ok" EndIf
Quote from clueadventures on February 21, 2019, 4:43 pmjQuery.Deferred exception: Unable to get property 'getItem' of undefined or null reference
Unable to get property 'getItem' of undefined or null reference (jquery.min.js, 2)
jQuery.Deferred exception: Unable to get property 'getItem' of undefined or null reference
Unable to get property 'getItem' of undefined or null reference (jquery.min.js, 2)

Quote from luishp on February 21, 2019, 6:11 pmPlease use a modern web browser to test it instead of the "Run" button. Just click on the Chrome or FireFox button to test the App (F5 to reload it in both of them). The Run button uses Internet Explorer, although good enough for most situations it's not suitable for many HTML5 programming APIs.
Please use a modern web browser to test it instead of the "Run" button. Just click on the Chrome or FireFox button to test the App (F5 to reload it in both of them). The Run button uses Internet Explorer, although good enough for most situations it's not suitable for many HTML5 programming APIs.
Quote from clueadventures on February 21, 2019, 6:13 pmThis what what I originally tried, so good to know I was on the right lines
Yes it works fine in Chrome and Edge. So will it be fine when finalised as an App?
This what what I originally tried, so good to know I was on the right lines
Yes it works fine in Chrome and Edge. So will it be fine when finalised as an App?
