Quote from juricazg on July 6, 2020, 10:50 amhi,
i have app to control few devices via local ethernet. right now I call each device via IP link:
InternetLink "HTTP://192.168.0.105"so my question is, how I can create additional standalone file like some "links.txt" so i can edit if some address is changed without compiling new version of software. so in this links.txt will be multiple address like in example:
InternetLink "HTTP://192.168.0.106" //device1 InternetLink "HTTP://192.168.0.107" //device2 InternetLink "HTTP://192.168.0.108" //device3can I make some script where button one will call first line, button two seconod line and so on?
hi,
i have app to control few devices via local ethernet. right now I call each device via IP link:
InternetLink "HTTP://192.168.0.105"
so my question is, how I can create additional standalone file like some "links.txt" so i can edit if some address is changed without compiling new version of software. so in this links.txt will be multiple address like in example:
InternetLink "HTTP://192.168.0.106" //device1 InternetLink "HTTP://192.168.0.107" //device2 InternetLink "HTTP://192.168.0.108" //device3
can I make some script where button one will call first line, button two seconod line and so on?
Quote from Gaev on July 6, 2020, 2:15 pm@juricazg
This is a common forum for VisualNEOWin, VisualNEOWeb, PixelNEO and CloudNEO ... enquiries/posts specific to a product are best created in their appropriate sections.
how I can create additional standalone file like some "links.txt" so i can edit if some address is changed without compiling new version of software
can I make some script where button one will call first line, button two seconod line and so on?
Place the addresses (i.e. HTTP://192.168.0.106 etc.) in a text file ...
- one address per line
- best to have this file in your project's [PubDir]; say it is called deviceaddresses.txtThen, in the click event section of each button ...
SetVar "[devicenumber]" "1" ... 2, 3, 4 etc. as appropriate FileRead "[PubDir]deviceaddresses.txt" "[devicenumber]" "[internetlinkaddress]" InternetLink "[internetlinkaddress]"
This is a common forum for VisualNEOWin, VisualNEOWeb, PixelNEO and CloudNEO ... enquiries/posts specific to a product are best created in their appropriate sections.
how I can create additional standalone file like some "links.txt" so i can edit if some address is changed without compiling new version of software
can I make some script where button one will call first line, button two seconod line and so on?
Place the addresses (i.e. http://192.168.0.106 etc.) in a text file ...
- one address per line
- best to have this file in your project's [PubDir]; say it is called deviceaddresses.txt
Then, in the click event section of each button ...
SetVar "[devicenumber]" "1" ... 2, 3, 4 etc. as appropriate FileRead "[PubDir]deviceaddresses.txt" "[devicenumber]" "[internetlinkaddress]" InternetLink "[internetlinkaddress]"
Quote from Gaev on July 6, 2020, 8:51 pm@juricazg
is it possible to define with the same logic button label?
I am not sure what you are asking ... do you want ...
1) to have just one button, and when the user clicks on it, he/she is asked to choose a number (either enter it or pick from a ListBox)
or
2) the label/caption of each button to display the "device address" related to that device
If it is (2), then ...
a) you can define the label for each button as a variable e.g. [internetlinkaddress1], [internetlinkaddress2], [internetlinkaddress3] etc.
b) in the Startup (or Page Enter) section of your pub ...
FileRead "[PubDir]deviceaddresses.txt" "1" "[internetlinkaddress1]" FileRead "[PubDir]deviceaddresses.txt" "2" "[internetlinkaddress2]" FileRead "[PubDir]deviceaddresses.txt" "3" "[internetlinkaddress3]" etc.BTW, if you go this route, then the click event code for the button would be just ...
InternetLink "[internetlinkaddress1]" ... or [internetlinkaddress2] or [internetlinkaddress3] as appropriate
is it possible to define with the same logic button label?
I am not sure what you are asking ... do you want ...
1) to have just one button, and when the user clicks on it, he/she is asked to choose a number (either enter it or pick from a ListBox)
or
2) the label/caption of each button to display the "device address" related to that device
If it is (2), then ...
a) you can define the label for each button as a variable e.g. [internetlinkaddress1], [internetlinkaddress2], [internetlinkaddress3] etc.
b) in the Startup (or Page Enter) section of your pub ...
FileRead "[PubDir]deviceaddresses.txt" "1" "[internetlinkaddress1]" FileRead "[PubDir]deviceaddresses.txt" "2" "[internetlinkaddress2]" FileRead "[PubDir]deviceaddresses.txt" "3" "[internetlinkaddress3]" etc.
BTW, if you go this route, then the click event code for the button would be just ...
InternetLink "[internetlinkaddress1]" ... or [internetlinkaddress2] or [internetlinkaddress3] as appropriate
Quote from juricazg on July 7, 2020, 8:56 amit was option 2. it works fine.
i need that because I want to add additional custom user buttons and this solutions was what I was looking for.
thanks again...
it was option 2. it works fine.
i need that because I want to add additional custom user buttons and this solutions was what I was looking for.
thanks again...


Quote from dglojnar on July 7, 2020, 2:12 pmHa, bas fino :-)
Ako trebas plug-ins i slicne stvari, samo javi, ja koristim Neobook/VisualNeo od 1994 :-)
Najbolje na mail:
mikaari001@gmail.com
Kaj ima novoga doma?
Pozz:-)
Ha, bas fino :-)
Ako trebas plug-ins i slicne stvari, samo javi, ja koristim Neobook/VisualNeo od 1994 :-)
Najbolje na mail:
Kaj ima novoga doma?
Pozz:-)