This article applies to:
Labels can be created in Inline script by entering the name of a Label and appending it with a colon (e.g., "MyScriptLabel:"). Script based Labels are particularly useful when you want to Jump to a specific point in an Inline object.
The example script below uses 2 Labels in an InLine object: RightName and WrongName. When the name "Michael" is entered, the script jumps to the RightName Label in which a MsgBox states "Hello, MICHAEL!" If Michael is not entered, the script jumps to the WrongName Label.
'Place this example in an InLine object.
'This example gets a name from the user and then branches to a
'statement, depending on the input name. If the name is not
'MICHAEL, it is reset to MICHAEL unless it is null or the user
'clicks Cancel--in which case, the program displays a message
Dim uname As String
uname = Ucase$(InputBox$("Enter your name:","Enter Name"))
If uname = "MICHAEL" Then
If (uname = "") Then
Display.MsgBox "No name? Clicked Cancel? I'm shutting down."
Display.MsgBox "I am renaming you MICHAEL!"
uname = "MICHAEL"
Display.MsgBox "Hello, MICHAEL!"