2/27/2018 1:11 PM | |
Joined: 2/11/2018 Last visit: 8/8/2024 Posts: 18 Rating:
|
Hello, I was trying to execute VB script from "Action", but it is not working. If I use same script to execute from a button using "Mouse Click" action, the same script works. Can you help me to execute same script from "Action" so that it will run cyclically? See my script below: Sub OnClick(ByVal Item) Dim WScriptShell Set WScriptShell = CreateObject("WScript.Shell.1") Dim objControl Set objControl = ScreenItems("Control1") objControl.Activate WScriptShell.SendKeys "{F8}" End Sub This script run from Button. But If i try to execute is from Action,in the debugger it says Invalid type "ScreenItems" Can you please help? ------------------------------------------------------------------------------------------ |
Last edited by: pramodva at: 2/27/2018 2:04:00 PMLast edited by: Jen_Moderator at: 2/27/2018 2:32:24 PMNew subject after splitting |
|
2/27/2018 4:04 PM | |
Joined: 12/12/2011 Last visit: 12/30/2020 Posts: 821 Rating:
|
Hi, it needs to be: .... Set objControl = ScreenItems ("Control1") ...... Use the Wincc help for examples (onclick). Regards |
Grundkurs/Systemkurs WinCC V7: |
|
Follow us on