CenterApp

Purpose:

Centers the App on the screen horizontally and vertically.

Category:

App

Syntax:

CenterApp

Example:

CenterApp



FitAppToScreen

Purpose:

Scale the app to cover the screen area.

Category:

App

Syntax:

FitAppToScreen cover "vpos" "hpos"
cover

   true/false to cover complete screen area.
   If true content may be outside the visible area.
   If false there could be empty space in the margins.

vpos

  Vertical position (possible values: top / middle / bottom)

hpos

  Horizontal position (possible values: left / right / center)

Example:

FitAppToScreen false "middle" "center"



TopCenterApp

Purpose:

Centers the App horizontally at the top of the screen.

Category:

App

Syntax:

TopCenterApp

Example:

TopCenterApp


AddCSS

Purpose:

Inject CSS code into your App.

Category:

App

Syntax:

AddCSS "CSS content"

CSS content

   Any CSS code. Clasess etc.

Example:

AddCSS ".myclass{color:red}"


AddFont

Purpose:

Include a .ttf, .woff or .woff2 text font into the project and install it.

Category:

App

Syntax:

AddFont "font name" "font path"

font name

   Name to identify the font. Use it on font-family property.

font path

   Absolute path to the font file (will become relative automaticaly once compiled)

Example:

AddFont "myfont" "D:\Fonts\Amarillo.ttf"



AppPosition

Purpose:

Set the App horizontal and vertical position relative to the Web Browser Window or device screen.

Category:

App

Syntax:

AppPostion "vertical position" "horizontal position"

Example:

AppPosition "top" left"


AppBackgroundColor

Purpose:

Changes the Background Color surrounding the App limits.

Category:

App

Syntax:

AppBackgroundColor "color name"
color name

A color on any valid HTML5 format:

#ff5432
rgb(12,34,67)
rgba(12,34,67,.5)

Example:

AppBackgroundColor "rgb(12,132,64)"


AppBackgroundImage

Purpose:

Sets a full screen App background image.
Tip: Use an invisible image object to load and store the image.

Category:

App

Syntax:

AppBackgroundImage "image object"
image object

An image object previously added to the Work Sapace you want to become your App background image.

Example:

AppBackgroundImage "myBackgroundImage"


AppScrollTo

Purpose:

Scroll the document to the given horizontal and vertical position.

Category:

App

Syntax:

AppScrollTo topDistance leftDistance

topDistance

The distance from the top of the app to scroll to in pixels.

leftDistance

The distance from the left side of the app to scroll to in pixels.

Example:

AppScrollTo 400 0


SetResponsivePages

Purpose:

Set de entry page for each device screen size.

UPDATE: Since version 21.4 VisualNEO Web supports responsive designs and this command should only be used in special situations.

Category:

App

Syntax:

SetResponsivePages "Page1" "Page2" "Page3" "Page4"

Page1

Page name for large screen sizes > 1024px (Desktop).

Page2

Page name for medium screen sizes 768px - 1024px (Tablet).

Page3

Page name for small screen sizes 461 - 767px (Tablet).

Page4

Page name for medium screen sizes 320px - 480px (Mobile).

Example:

SetResponsivePages "Page1" "Page2" "Page3" "Page4"

Notes:

You can define different sizes for each page adding a custom CSS in 
Project > Proterties > Styles. For example:


#Page1{

  width:320px;

  height:200px;

}

#Page2{

  width:480px;

  height:250px;

}

#Page3{

  width:768px;

  height:400px;

}

#Page4{

  width:1024px;

  height:650px;

}


DisableTextSelection

Purpose:

Disable text selction by user on entire App

Category:

App

Syntax:

DisableTextSelection

Example:

DisableTextSelection


GetSelectedText

Purpose:

Get the user selected text into a variable

Category:

App

Syntax:

GetSelectedText "variable"

variable

  Variable to store result.

Example:

GetSelectedText [myVar]


LoadApp

Purpose:

Replaces the current App loading a new one

Category:

App

Syntax:

LoadApp "new app url"
new app url

The internet URL where the app to load is published.

Example:

LoadApp "https://mydomain.com/myapp"


ReloadApp

Purpose:

Reloads the current App in the WebBrowser.

Category:

App

Syntax:

ReloadApp

Example:

ReloadApp


ScaleApp

Purpose:

Scale the whole app by a scale factor.

Category:

App

Syntax:

ScaleApp

Example:

ScaleApp 2


OpenURL

Purpose:

Open a URL in a new tab or window.

Category:

App

Syntax:

OpenURL "url"

url

The internet URL adress to open.

Example:

OpenURL "https://sinlios.com"


GetAppURL

Purpose:

Returns full App URL (https://example.com/path/index.html)

Category:

App

Syntax:

GetAppURL [result var]

Example:

GetAppURL [myvar]


GetAppPath

Purpose:

Returns current URL path (/path/index.html)

Category:

App

Syntax:

GetAppPath [result var]

Example:

GetAppPath [myvar]


GetAppBaseURL

Purpose:

Returns App base URL (https://example.com)

Category:

App

Syntax:

GetAppBaseURL [result var]

Example:

GetAppBaseURL [myvar]



GetURLParameter

Purpose:

Gets the value from a URL parameter (mydomain.com?parameter1=value1&parameter2=value2)

Category:

App

Syntax:

GetURLParameter "parameter name" [result var]

Example:

GetURLParameter "parameter1" [myvar]



CheckInternetConnection

Purpose:

Determine if this device is connected to the Internet by checking a URL

Category:

App

Syntax:

CheckInternetConnection "URL" milliseconds "succesSubroutine" "errorSubroutine"
URL

    URL to check

milliseconds

    Milliseconds to wait for response
successSubroutine

    Subroutine to execute on success
errorSubroutine

    Subroutine to execute on error

Example:

CheckInternetConnection "https://google.com" 10000 "succesSubroutine" "errorSubroutine"


EnterFullScreen

Purpose:

Enters full screen mode (same effect than pressing F11 in the WebBrowser).

Category:

App

Syntax:

EnterFullScreen

Example:

EnterFullScreen


ExitFullScreen

Purpose:

Exists full screen mode (previously opened with EnterFullScreen).

Category:

App

Syntax:

ExitFullScreen

Example:

ExitFullScreen


MatchMedia

Purpose:

Check if a CSS media query string matches current viewport.

Category:

App

Syntax:

MatchMedia "CSS Media Query" [return var]

CSS Media Query

    A valid CSS media query

return var

    Variable to store result (true or false)

Example:

MatchMedia "(min-width: 600px) and (max-width: 1200px)" [myvar]



SetAppTitle

Purpose:

Set the App title.
Use it on page-enter to improve per page SEO 

Category:

App

Syntax:

SetAppTitle "title"

title

  App/page title text (50 - 60 characters is recommended for better SEO)

Example:

SetAppTitle "Welcome page"


SetAppDescription

Purpose:

Set the App description.
Use it on page-enter to improve per page SEO 

Category:

App

Syntax:

SetAppDescription "description"

description

  App/page description text (50 - 160 characters is recommended for better SEO)

 

Example:

SetAppDescription "This is the application/page description text. It allows to show a descriptive text on Google search and other search engines results"


NeoScriptJS

Purpose:

Allow acces to NeoScript subroutines from JavaScript (neosubroutine.subroutineName(param);).

UPDATE: This command is no longer needed. Use neo.subroutineName(param); instead.

Category:

App

Syntax:

NeoScriptToJS

Example:

NeoScriptToJS


IsOnline

Purpose:

Returns true if the device is online or false if it's not. This command ask to the web browser navigator object to get the information.

Category:

App

Syntax:

IsOnline [result var]

Example:

IsOnline [myvar]