I am using Wonderware InTouch 10.0 on Windows 7. It's slightly outdated, but its what we have. I am currently writing a script using the StartApp command to open a particular PDF file with the touch of a button. My script looks like StartApp("C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32 C:\1.pdf"); The first part of the command runs adobe and the second part of the command opens the particular file "1". What I need to figure out is, how do I insert a variable into a string. For example I have 55 files I may potentially need to open up, all named 1-55. So I need the file I am calling to be a variable inside of the string so I can call it inside of a loop. I do not want to copy and paste this code 55 times, I want to make the file name a variable (tagname that is a memory real between 1 and 55) so I can run it in a loop. I have only been using Wonderware for a month or so now, so If anything is confusing feel free to ask. Thanks!
InTouch's scripting for the StartApp function includes " quotes at beginning and end of the string. I believe the semi-colon indicates the end of the statement. Thus, you should be able to include the document indirect register within the script.
Yes, this is exactly what I want to do. Whenever I do this, I get an error saying "expecting right parenthesis" I think this is because of the additional parenthesis surrounding the tagname "POINTER.VALUE". Is anyone aware of what single do ' ' ?
Kaiser_Will, thank you for you quick response by the way. I am still learning Wonderware at the moment, but I think the problem I am having is that I do not know how to get the StartApp function to recognize my taganme as a tagname. But then if I did get it to recognize my taganme, what should my tagname be? it only needs to be stored locally, but It shouldn't be an integer, should it? It should be a string value?
Test is simply the button I am using to start the function, I am resetting it back to Zero because I don't want it to pull up multiple windows if the operator holds a finger on the button for longer than 500ms.
StartApp only knows where the files are when I give it a path to follow. I do not have any spaces. This code works for opening one file, it just doesn't work when I try to put a variable as part of the path.
just signed up for this site. I am a little new to wonderware . I have been able to purchase development license for v9 with the runtime license also. I also have v10.0 and v10.1 and just recently I acquired v2012 with a development license. I have been trying to find a runtime license for v10.0.or 10.1. but so far I have not found one. a new runtime is about 4k dollars. I am a retired support technician. now I do some phone support and some small intergration work. does anyone out there have a runtime license to swap or trade for something that they need for traning. I have a large inventory that myself and friends have used to train and move on in the automation field. we all at one time want to learn and get better at what we do and some times we cannot because of the cost to learn. I have helped many to do this, so I hope no one takes offense at this request Thanks Rick
b1e95dc632