Page 1 of 1

VB script and instrument panel

Posted: Fri 18. Dec 2015, 10:45
by JPS7495
Hello all,

I want to access instrument panel controls (bitmaplist, bargraph,labels..) in VBS script and be able to modify many things (font, colour, position ).
How can I do this?

thanks

Re: VB script and instrument panel

Posted: Mon 21. Dec 2015, 08:21
by K.Wolf
Here's a short example on how to access panel objects in a VBS macro:

Code: Select all

Dim panel, obj
Set panel = Documents("MyPanel.ipf").ActiveWindow.Object
Set obj = panel.ActiveScene.Controls("Label1")
obj.Left = 100
obj.Font.Color = vbRed
Press F1 in a panel window to open the Instruments Panel Help. Under "Reference -> Instruments Panel Object Model" you can find a list of available objects and their properties, which you can access in a macro.