The following tutorial helps you get started with using scripting in Adobe Captivate.
You have been asked to create a login slide with fields to enter the user name and password.
When the user enters the correct values, the following actions take place:
The project moves to the next slide.
A text caption in the next slide displays the message, "Welcome <user name>".
The default e-mail editor opens with the e-mail ID of the person that must be informed of the login.
When the user enters incorrect information, a text caption is displayed asking the user to reenter information.
This option is disabled automatically when you disable Validate User Input.
The advanced action for the login slide must do the following:
Check whether the correct information has been entered in the login and password fields.
Move to the next slide if the information is correct.
Stay at the login slide if the information is incorrect and display a text caption requesting the user to reenter the login information.
The code checks whether the user has used the user and password login credentials in the respective fields.
If the user information is incorrect, the project stays at the login slide. The text caption with the name FailureCaption is displayed.
In the script window, do the following:
create a script named sequential action with the following code:
On successful login, the code opens up the default e-mail editor with the e-mail ID email@example.com displayed in the To field.