VisualNeo variables in HTML script - Forum

Forum Navigation
You need to log in to create posts and topics.

VisualNeo variables in HTML script

Hi @luishp

Is it possible to have VisualNeo variables in HTML page/script such that when run, it will update the variables automatically. Currently I'm loading entire page as string, and using StrReplace to replace the variable. Had to repeat the StrReplace few times when there are multiple 'variables' in the HTML file. It'd be great to have  the ability to update the [myTitle] variable w/o using StrReplace?

<html>
<head>
 <title>[myTitle]</title>
</head>

 

Hi @ronnie, you can do something like this:

SetVar [myvar] "Hello!"
SetObjectHTML "Container1" "<b>[myvar]</b>"
GetObjectHTML "Container1" [myvar2]

[myvar2] will store <b>Hello!</b>