| View previous topic :: View next topic |
| Author |
Message |
TheDoctorAus Junior 2

Joined: 03 Apr 2013 Posts: 31
|
Posted: 02/08/2019 17:53 Post subject: VBS script get picture window |
|
|
Hello somebody can help me with this VBS script.
Dim pippo
pippo = HMIRuntime.ActiveScreen.Parent.Parent.Parent.ObjectName
HMIRuntime.Trace "Picture Windows ObjectName : " & pippo & " Open picture" & vbNewline
If i use this script in a push-button everything work good.
If i put this script in open picture don't work and have this message error:
============Microsoft VBScript runtime error============
Application :
Picture : 9000_TOP.pdl_Events
Function : Sub txt_OnObjectChanged(ByVal Item)
Line : 4
Error : Object required: 'HMIRuntime.ActiveScreen.Parent.Parent.Parent'
============Mcrosoft VBScript runtime error============
Thanks.
Regards. |
|
| Back to top |
|
 |
u3 Junior

Joined: 22 Jan 2018 Posts: 1
|
Posted: 04/08/2019 14:19 Post subject: |
|
|
Tips and tricks for creating scripts in WinCC (TIA Portal)
https://support.industry.siemens.com/cs/document/57132412/tips-and-tricks-for-creating-scripts-in-wincc- (tia-portal)
https://support.industry.siemens.com/tf/us/en/posts/wincc-professional-v13-sp1-simple-sample-get-object-and-object-parent-properties/135066/
https://support.industry.siemens.com/tf/us/en/postattachments/download/?attachmentId=62269 |
|
| Back to top |
|
 |
TheDoctorAus Junior 2

Joined: 03 Apr 2013 Posts: 31
|
Posted: 05/08/2019 10:00 Post subject: |
|
|
| Thanks. |
|
| Back to top |
|
 |
|