This article applies to:
E-Prime 3.0
E-Prime 2.0
E-Prime 1.x
Detail
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
'and terminates.
Dim uname As String
uname = Ucase$(InputBox$("Enter your name:","Enter Name"))
If uname = "MICHAEL" Then
GoTo RightName
Else
GoTo WrongName
End If
WrongName:
If (uname = "") Then
Display.MsgBox "No name? Clicked Cancel? I'm shutting down."
Else
Display.MsgBox "I am renaming you MICHAEL!"
uname = "MICHAEL"
GoTo RightName
End If
RightName:
Display.MsgBox "Hello, MICHAEL!"
See Also:
Comments
0 comments
Please sign in to leave a comment.