|
Text - URL encode/decode |
Declaration
<AMTEXT ACTIVITY="url_encode_decode" TEXT="text" ACTION="text (options)" RESULTVARIABLE="text" /> |
Description
Encodes normal text characters to URL format or decodes URL encoded characters to normal binary data.
Practical Usage
Commonly used to convert characters into a format that can be transmitted over the Internet.
Parameters
General
Property |
Type |
Required |
Default |
Markup |
Description |
Text |
Text |
Yes |
(Empty) |
TEXT="text string" |
The target data to encode/decode. As with every text parameter, if the data you wish to convert is contained in a variable, simply enter the variable name surrounded by percentage signs to resolve it to it's contents at runtime (i.e. %variableName%). |
Action |
Text (options) |
Yes |
Encode |
|
The action to perform. The available options are:
|
Populate variable with result |
Text |
Yes |
(Empty) |
RESULTVARIABLE="VarName" |
The name of an existing variable in which to populate the newly encoded/decoded data. |
Example
- The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
- Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.
description
This sample task demonstrates Automate's ability to encode and decode data in URL format.
<AMVARIABLE NAME="theText" /> <AMSHOWDIALOG ACTIVITY="input" DEFAULTVALUE="Enter a string of text here." RESULTVARIABLE="theText">This task demonstrates Automate's ability to encode and decode data in URL format.</AMSHOWDIALOG> <AMTEXT ACTIVITY="url_encode_decode" RESULTVARIABLE="theText">%theText%</AMTEXT> <AMSHOWDIALOG WINDOWTITLE="The text encoded to URL format.">%theText%</AMSHOWDIALOG> <AMTEXT ACTIVITY="url_encode_decode" ACTION="decode" RESULTVARIABLE="theText">%theText%</AMTEXT> <AMSHOWDIALOG WINDOWTITLE="The URL encoded data decoded back to binary text.">%theText%</AMSHOWDIALOG> |