Other topics about Sample Application Program
This sample program demonstrates the following operation.
Set the softkey label of user menu (Macro Setup > User Menu).
When user menu softkey is pressed, the Sub UserMenuButton_OnPress(bNo)
is executed with the key number.
The marker is operated according to the key number.
To use this sample:
Copy the following code into a Notepad file.
Save the file on the analyzer storage in the D: folder. Name the file as "userMenu.vbs".
Double-click the file to execute.
dim ana
dim userMenu
dim bNo
dim mkrNo
set userMenu = WScript.CreateObject("E5070.UserMenu", "UserMenuButton_")
set ana = CreateObject("E5070.Application")
for bNo=1 to 5
select case bNo
case 1, 2, 3
UserMenu.item(cint(bNo)).caption = "Marker" & bNo
case 4
UserMenu.item(cint(bNo)).caption = "Max"
case 5
UserMenu.item(cint(bNo)).caption = "Min"
end select
next
Do Until False
WScript.Sleep 500
Loop
Sub UserMenuButton_OnPress(bNo)
Select case bNo
case 1, 2, 3
mkrNo=bNo
ana.scpi.calculate.selected.marker(mkrNo).state = true
ana.scpi.calculate.selected.marker(mkrNo).activate
case 4
ana.scpi.calculate.selected.marker(mkrNo).function.type ="maximum"
ana.scpi.calculate.selected.marker(mkrNo).function.execute
case 5
ana.scpi.calculate.selected.marker(mkrNo).function.type ="minimum"
ana.scpi.calculate.selected.marker(mkrNo).function.execute
end select
End Sub