plc.myforum.ro Forum Index plc.myforum.ro
PLCs users www.plc.myforum.ro!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VBS script get picture window

 
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> SIEMENS SIMATIC HMI- Reg. U
View previous topic :: View next topic  
Author Message
TheDoctorAus
Junior 2
Junior 2


Joined: 03 Apr 2013
Posts: 31

PostPosted: 02/08/2019 17:53    Post subject: VBS script get picture window Reply with quote

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
View user's profile Send private message
u3
Junior
Junior


Joined: 22 Jan 2018
Posts: 1

PostPosted: 04/08/2019 14:19    Post subject: Reply with quote

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
View user's profile Send private message
TheDoctorAus
Junior 2
Junior 2


Joined: 03 Apr 2013
Posts: 31

PostPosted: 05/08/2019 10:00    Post subject: Reply with quote

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> SIEMENS SIMATIC HMI- Reg. U All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro