Advanced Commands Reference Guide
Total Page:16
File Type:pdf, Size:1020Kb
Kryon Studio VERSION 20.9 Advanced ommands C Reference Guide This document contains proprietary and confidential information of Kryon Systems, and can be distributed only with the prior written consent of Kryon Systems Ltd. © 2008-2020 Kryon Systems Ltd. All rights reserved. Document revision: 21-Sep.-2020 Contents CHAPTER 1: Variable Commands Set Value 18 Using the SET VALUE command 18 Find 20 Using the FIND command 20 Replace 28 Using the REPLACE command 28 Mathematics 30 Using the MATHEMATICS command 30 Evaluate Expression 31 Using the EVALUATE EXPRESSION command 31 Split 36 Using the SPLIT command 36 Get Array Data 40 Using the GET ARRAY DATA command 41 Get Table Data 44 Using the GET TABLE DATA command 44 Table Lookup 49 Using the TABLE LOOKUP command 49 Get ASCII Character 54 Using the GET ASCII CHARACTER command 54 Remove Blank Spaces 56 Using the REMOVE BLANK SPACES command 56 Change Case 57 Using the CHANGE CASE command 57 Check Type 58 Using the CHECK TYPE command 58 Get Random Number 59 Using the GET RANDOM NUMBER command 59 Reverse 60 Using the REVERSE command 60 Get Length 61 Using the GET LENGTH command 61 Extract Numeric Values 62 Using the EXTRACT NUMERIC VALUES command 62 CHAPTER 2: Flow Commands If Else 66 Using the IF ELSE command 66 Complex If Else 70 Using the COMPLEX IF ELSE command 70 Multi-Value If Else 72 Using the MULTI-VALUE IF ELSE command 72 Loop 74 Using the LOOP command 74 Loop: Break 76 Loop: Restart 77 Loop Table 78 Using the LOOP TABLE command 78 Loop Items 80 Using the LOOP ITEMS command 80 Pause 82 Using the PAUSE command 82 Group 83 Using the GROUP command 83 SET GROUP AS GLOBAL option 84 Global Functions 86 Creating Global Function 86 Adding the global function to wizards 88 CHAPTER 3: Wizard Commands Continue Wizard 94 How does it work? 94 End Wizard 95 Using the END WIZARD command 95 Go To Step 96 Using the GO TO STEP command 96 Get Step Data 98 Using the GET STEP DATA command 98 Get Wizard Data 99 Using the GET WIZARD DATA command 99 Check Application 100 Using the CHECK APPLICATION command 100 Get User Data 101 Using the GET USER DATA command 101 Check Run Mode 102 Using the CHECK RUN MODE command 102 Check Video Recording Mode 103 Using the CHECK VIDEO RECORDING MODE command 103 Set User Interrupt Mode 104 Using the SET USER INTERRUPT MODE command 104 Show Message 105 Using the SHOW MESSAGE command 105 Raise Wizard Error 107 Using the RAISE WIZARD ERROR command 107 Get Last Failure Type 108 Using the GET LAST FAILURE TYPE command 108 Resume Error 109 Report Wizard Output 110 Using the REPORT WIZARD OUTPUT command 110 CHAPTER 4: Mouse and Keyboard Commands Use Keyboard Shortcut 112 Using the USE KEYBOARD SHORTCUT command 112 Input Text 113 Using the INPUT TEXT command 113 Get Mouse Position 114 Using the GET MOUSE POSITION command 114 Drag & Drop 115 Using the DRAG & DROP command 115 Mouse Click 117 Using the MOUSE CLICK command 117 Wait for Busy Cursor 118 Set Caps Lock State 119 Using the SET CAPS LOCK STATE command 119 Get Caps Lock State 120 Using the GET CAPS LOCK STATE command 120 CHAPTER 5: Block Commands Allow Last Stored Action 121 Deny Last Stored Action 121 Remove All Blocks 122 CHAPTER 6: Date and Time Commands Get Current Date 125 Using the GET CURRENT DATE command 125 Validate Date 126 Using the VALIDATE DATE command 126 Get Day of Month 127 Using the GET DAY OF MONTH command 127 Compare Dates 129 Using the COMPARE DATES command 129 Add/Subtract Date 131 Using the ADD/SUBTRACT DATE command 131 Calculate Date Range 133 Using the CALCULATE DATE RANGE command 133 Check Day of Week 135 Using the CHECK DAY OF WEEK command 135 Format Date 137 Using the FORMAT DATE command 137 Specifying custom output formats 139 Get Current Time 140 Using the GET CURRENT TIME command 140 Compare Time 141 Using the COMPARE TIME command 141 Add/Subtract Time 143 Using the ADD/SUBTRACT TIME command 143 Calculate Time Range 144 Using the CALCULATE TIME RANGE command 144 Convert Between Time Zones 146 CHAPTER 7: Window Commands Get Step Window Handle 148 Using the GET STEP WINDOW HANDLE command 148 Find Matching Window Handles 149 Using the FIND MATCHING WINDOW HANDLES command 149 Get Active Application 151 Using the GET ACTIVE APPLICATION command 151 Control Window State 152 Using the CONTROL WINDOW STATE command 152 Check Window State 154 Using the CHECK WINDOW STATE command 154 Get Active Window/Web Page 155 Using the Get ACTIVE WINDOW/WEB PAGE command 155 Capture Step Window Image 156 Using the CAPTURE STEP WINDOW IMAGE command 156 CHAPTER 8: File Commands Create a Text File 158 Using the CREATE A TEXT FILE command 158 Read From Text File 160 Using the READ FROM TEXT FILE command 160 Write to Text File 161 Using the WRITE TO TEXT FILE command 161 Does File Exist 162 Using the DOES FILE EXIST command 162 Copy a File 163 Using the COPY A FILE command 163 Move a File 164 Using the MOVE A FILE command 164 Rename a File 165 Using the RENAME A FILE command 165 Delete a File 166 Using the DELETE A FILE command 166 Delete File(s) 168 Using the DELETE FILE(S) command 168 Monitor File Changes 170 Using the MONITOR FILE CHANGES command 170 CHAPTER 9: Folder Commands Create a Folder 173 Using the CREATE A FOLDER command 173 Get Folder Location 174 Using the GET FOLDER LOCATION command 174 Get Files 175 Using the GET FILES command 175 Does Folder Exist 177 Using the DOES FOLDER EXIST command 177 Is Folder Empty 178 Using the IS FOLDER EMPTY command 178 Copy a Folder 179 Using the COPY A FOLDER command 179 Move a Folder 180 Using the MOVE A FOLDER command 180 Rename a Folder 181 Using the RENAME A FOLDER command 181 Delete a Folder 182 Using the DELETE A FOLDER command 182 Monitor Folder Changes 185 Using the MONITOR FOLDER CHANGES command 185 CHAPTER 10: AI-Powered Document and Text Analysis Commands What's Required? 188 AI Booster 188 ABBYY integrations for scanned documents 188 OCR out-of-the-box 189 Azure Licenses 190 OCR: Documents 191 Using the OCR: DOCUMENTS command 191 Get Text (SmartScan) 195 Using the GET TEXT command 195 Get Value 196 Using the GET VALUE command 196 Get Selection Element State 198 Using the GET SELECTION ELEMENT STATE command 198 Does Word Exist (SmartScan) 200 Using the DOES WORD EXIST command 200 Get Date/Time 201 Using the GET DATE/TIME command 201 Save as Image 203 Using the SAVE AS IMAGE command 203 Save to Excel 204 Using the SAVE TO EXCEL command 204 OCR: Printed and Handwritten Text 206 Using the OCR: PRINTED AND HANDWRITTEN TEXT command 206 Get Text (MS Azure) 209 Using the GET TEXT command 209 Does Word Exist (MS Azure) 210 Using the DOES WORD EXIST command 210 Form Recognizer 211 Using the FORM RECOGNIZER command 211 Get Receipt Data 214 Using the GET RECEIPT DATA command 214 Text Analytics: Analyze Sentiment 216 Using the TEXT ANALYTICS: ANALYZE SENTIMENT command 216 Text Analytics: Detect Language 217 Using the TEXT ANALYTICS: DETECT LANGUAGE command 217 Text Analytics: Identify Key Phrases 218 Using the TEXT ANALYTICS: IDENTIFY KEY PHRASES command 218 Convert to Text (SmartScan+) 219 Using the CONVERT TO TEXT (SMARTSCAN+) command 219 Convert to Text (Tesseract) 220 Using the CONVERT TO TEXT (TESSERACT) command 220 CHAPTER 11: Digital PDF Analysis Commands Analyze Digital PDF File 222 Using the ANALYZE DIGITAL PDF FILE command 222 Page: Get Text 225 Using the PAGE: GET TEXT command 225 CHAPTER 12: External Data Commands Get From Clipboard 227 Using the GET FROM CLIPBOARD command 227 Clear Clipboard 227 Place in Clipboard 229 Using the PLACE IN CLIPBOARD command 229 Copy Active Field Value 230 Using the COPY ACTIVE FIELD VALUE command 230 Get OS Version 231 Using the GET OS VERSION command 231 Get Input Language 232 Using the GET INPUT LANGUAGE command 232 Read From Registry 233 Using the READ FROM REGISTRY command 234 Remove From Registry 235 Using the REMOVE FROM REGISTRY command 235 Write to Registry 236 Using the WRITE TO REGISTRY command 236 Get Environment Variable 237 Using the GET ENVIRONMENT VARIABLE command 237 Get Windows Event Log Data 238 Using the GET WINDOWS EVENT LOG DATA command 239 Set BI Field 240 Using the SET BI FIELD command 240 Log an Action 241 Using the LOG AN ACTION command 241 Query XML 242 Using the QUERY XML command 242 Query JSON 244 Using the QUERY JSON command 244 Call REST API Method 246 Using the CALL REST API METHOD command 246 CHAPTER 13: Email Commands Send Email Message 249 Using the SEND EMAIL MESSAGE command 249 Get Email Messages 256 Using the GET EMAIL MESSAGES command 256 Email: Get Data 263 Using the EMAIL: GET DATA command 263 Email: Move to Folder 264 Using the EMAIL: MOVE TO FOLDER command 264 Email: Forward 266 Using the EMAIL: FORWARD command 266 Email: Reply 268 Using the EMAIL: REPLY command 268 Email: Delete 269 Using the EMAIL: DELETE command 269 Email: Mark as Read/Unread 270 Using the EMAIL: MARK AS READ/UNREAD command 270 Email: Save Attachments 271 Using the EMAIL: SAVE ATTACHMENTS command 271 Email: Save Message 273 Using the EMAIL: SAVE MESSAGE command 273 CHAPTER 14: External Program Commands Run Program 275 Using the RUN PROGRAM command 275 Run .NET Plugin Method 278 Call Web Service Method 280 Run Script 281 Using the RUN SCRIPT command 282 Open URL Link (beta) 284 Using the OPEN URL LINK command 284 Run curl Command 285 Get Web Page HTML 286 Using the GET WEB PAGE HTML command 286 Run JavaScript on Page 287 Using the RUN JAVASCRIPT ON PAGE command 287 CHAPTER 15: Database Commands Execute SQL Query 290 Using the EXECUTE SQL QUERY command 290 Monitor Database Changes 293 Using the MONITOR DATABASE CHANGES