WinTask includes a powerful programming language similar to Visual Basic. Here are all the functions included in WinTask and WinTask x64, with a brief description. You can see how comprehensive it is – practically any repetitive task can be accomplished.
When you use the Recording Mode, these functions are automatically generated by WinTask and compiled into a complete Script. Advanced users can modify or create Scripts directly in the programming language using these functions.
Window Management Functions
- #ActionTimeout – Specifies the number of seconds that WinTask should wait before reporting an error
- #ExecuteDelay – Inserts a wait for n ticks between every statement of the script
- # IgnoreErrors– Manages errors
- #SendkeysDelay – Slows down keystrokes
- #UseExact – Controls the way WinTask sends its commands to the proper Window
- CheckedW – Retrieves the state of a checkbox/radiobutton
- ChooseItem – Selects an item in a combobox or a listbox
- ChooseMenu – Selects a menu item
- Click – Clicks mouse on a button
- ClickMouse – Clicks mouse button
- ClickOnBitmap – Clicks mouse button on an image inside a window
- ClickOnText – Clicks mouse button on a text inside a window
- ClickOnTextOCR – Clicks mouse button on a text recognized by the OCR engine inside a window
- ClickScrollBar et WinScrollBar – Scrolls inside a window
- ClickSpin – Clicks a spin control
- CloseWindow – Closes the specified window
- CloseWindowRegEx – Closes the specified window, using Regular Expressions to specify the window title
- CursorX, CursorY – Returns the position the cursor
- EnabledW – Tests if the specified window is active and can receive actions
- ExistW – Tells if the specified window exists
- Focus$ – Returns window name which is in focus
- GetFocusWindowHandle – Returns the handle of the child window which has the focus
- GetTop WindowHandle – Returns the handle of the parent window which is in focus
- GetWindowHandle – Returns the handle of specified window
- GetWindowName$ – Returns the name of the window specified by its handle
- ListItem$ – Returns the specified item in the listbox or combobox
- MaximizeWindow – Maximizes the specified window
- MinimizeWindow – Minimizes the specified window
- MouseShape – Returns the mouse cursor shape as an integer
- MouseX , MouseY – Returns the X,Y position of the mouse
- MoveMouse – Moves the mouse to the specified X
- MoveWindow – Moves the specified window
- RestoreWindow – Restores the specified window
- SelectedItem$ – Returns the selected item in a listbox/combobox
- SendKeys – Sends keystrokes to the window specified by the last UseWindow
- SendKeysEncrypted – Sends encrypted keyboard input to the last specified Window
- SizeWindow – Modifies the size of the specified window
- Top$ – Returns the name of the main window which has focus
- TopInstance – Returns the instance number of the main window in focus
- UseWindow – Specifies the window where the script will now send its keystrokes
- UseWindowHandle – Specifies the window (through the window handle) to which subsequent keyboard, mouse and menu actions are directed
- UseWindowRegEx – Specifies, using Regular Expression, the window where the script will now send its keystrokes
- WinScrollBar et ClickScrollBar – Scrolls inside a window
- WriteCombo – Writes text in the edit zone of a listbox
- WriteEdit – Writes text in the specified edit zone
- WriteEditEncrypted – Writes an encrypted string into the specified edit field
Capture functions
- #UsePageExact – Controls the HTML pages finding method
- #BitmapPrecision – Specifies how closely the found image must match the input image in Pause on Bitmap and ClickOnBitmap functions
- Capture$ – Captures the text in the specified window
- CaptureArea$ – Captures the text in the specified window area
- CaptureAreaOCR$ – Captures the text that appears in the specified area of a window using OCR
- CaptureBitmap – Captures an image and stores it in a .BMP file
- CaptureHTML – Captures the text of a specified HTML element
- CaptureOCR$ – Captures the text that is seen in the specified window using OCR
- CaptureTableHTML – Captures a range of cells in a specified HTML table
- GetHTMLEditText – Captures the text displayed in the specified field of a Web form
- HardCopy – Saves a screenshot
- UseOCREngine – Specifies which OCR engine will be used by subsequent OCR function calls
- UsePage – Specifies the HTML page used by web functions
Synchronization Functions
- #ErrorFunction$ – Gives the name of the function which causes the error
- #ErrorLine$ – Gives the script line where the timeout has occurred
- #ErrorMsg$ – Gives the error message sent by the function which causes the error
- #ErrorScript$ – Gives the name of the script where the error occurred.
- #PauseTimeout – Specifies the maximum delay for a Pause statement
- #TextlookFrequency – Defines the interrupt frequency that WinTask uses to look for text in a window
- Disable – Disables the management of a specified event
- Enable – Reactivates the management of a specified event
- OnAction … EndAction – Manages events
- OnAction Error … EndAction – Manages error-handling
- Pause – Waits for a specified amount of time
- Pause … Until – Waits for an action
- Sleep – Makes the current script sleep whereas the events are still managed
User Dialog
- BeginDialog…EndDialog – Defines a dialog box with its controls
- CallDialog – Displays a dialog box defined previously
- Inputbox$ – Displays a simple dialog box where the user can type a value
- InputboxSecret$ – Displays a simple dialog box where the user can type a hidden value
- MsgBox – Displays a Windows standard message box
- MsgFrame – Displays a message
- RemoveFrame – Removes the message displayed by MsgFrame
- SelectDir – Returns the name of the directory selected by the user in the standard Browse for Folder dialog
- SelectFile – Returns the name of the file selected by the user in the standard dialog box File Open
- SelectMultipleFile – Returns the name of the files selected in the standard dialog box File Open
File Management Functions
- AppendXMLNode – Adds a node in the specified XML file
- ChDir – Sets the current working directory
- CloseExcelCom – Closes the Excel instance launched by ReadExcel or WriteExcel
- Create – Creates a file
- CreateExcelFile – Creates an Excel file
- CreateUnicodeFile – Creates a file using Unicode encoding
- CurDir$ – Returns the current working directory
- DelTree – Deletes the files and sub-directories below the specified directory
- Dir – Puts file names from a directory into arrays
- DiskFree – Returns the available space on the specified resource
- EnumXMLAttributes – Retrieves the attribute names and attribute values for the specified XML node
- EnumXMLChildren – Enumerates the child node descriptors for the specified XML node
- Eof – End of file
- Exist – Tells if specified file exists
- ExistDir – Checks for the existence of the specified directory
- FileAttr$ – Returns the attributes of the specified file
- FileCopy – Copies a file to an other file
- FileDate$ – Date of last modification of the specified file
- FileSize – Size of the specified file
- FileTime$ – Time of last modification of the specified file
- FileVersion$ – Version number of the specified file
- GetReadPos – Value of the reading pointer of the specified file
- GetXMLAttribute – Retrieves the content of an attribute in the specified XML file
- Kill – Deletes one or several files
- MkDir – Creates a directory
- Name – Renames or moves one or several files
- Read – Reads data from a file
- ReadExcel – Reads a range from an Excel workbook
- ReadIni$ – Reads a parameter in the specified INI file
- RmDir – Deletes a directory
- SetAttr – Sets the attributes of one or several files
- SetReadPos – Sets the reading pointer to the specified value
- SetXMLAttribute – Modifies or adds an attribute in the specified XML file
- WinDir$ – Returns the name of the directory where Windows is installed
- Write – Writes data in a file
- WriteExcel – Writes in an Excel workbook
- WriteIni – Writes to the specified INI file
Flow Control Functions
- #ErrorCode – Gives the error code sent by the function which causes the error
- #ErrorLine$ – Gives the script line where the timeout has occurred
- #ExecTimeout – After this timeout, execution of the script is stopped
- #ExecuteDelay – Slows down a running script by inserting a wait for n ticks between every statement
- #IgnoreErrors – Manages errors
- #LastErrorLine$ – Gives the script line number where the error occurred
- #ScriptAfterTimeout$ – Specifies the script to run after timeout
- Command$ – Allows a calling script to use the parameters from the called script
- End – Stops the current running script
- Function … ExitFunction … EndFunction – Defines a function
- Goto or Go to – Makes the execution of the script continue at another line
- If … Then … Else … Endif – Decision making statement
- Repeat … until … – Loop repeats with test occurring at the end of the loop
- Run – Launches a compiled script as a sub-program
- Select Case … EndSelect – Multiple decision making statement
- Shell – Executes a program (.exe, .com, .bat, .doc, .txt, …)
- Stop – Stops all the scripts
- Sub … Exitsub … EndSub – Defines a procedure
- While … Wend – Loop statement with test at the beginning
String Management Functions
- Asc – Returns the numeric ASCII code of the first character in a specified string
- Chr$ – Converts an ASCII value in its equivalent ASCII character
- Encrypt – Encrypts the specified string
- ExtractBetween$ – Extracts a string between two strings
- Instr – Returns the position of one string within another
- InstrRev – Returns the position of one string within another, searching backwards
- Lcase$ – Converts all uppercase characters in the specified string to lowercase
- Left$ – Extracts the specified number of characters from the left hand portion of the specified string
- Len – Returns the length of the specified string
- Ltrim$ – Returns the specified string minus its leading spaces and tabulations
- Mid$ – Retrieves a substring from the specified string
- Replace$ – Finds and replaces occurrences of a substring within the specified string
- Right$ – Returns the rightmost portion of the specified string for the numbers of characters specified
- Rtrim$ – Returns the specified string minus its trailing spaces and tabulations
- SplitIntoArray – Converts the specified string into an array of strings
- Str$ – Transforms the specified numeric value in a string
- Trim$ – Returns the specified string minus its leading and trailing spaces and tabulations
- Ucase$ – Converts all lowercase characters in the specified string to uppercase
- Val – Returns the numeric value of a string
Date / Time Functions
- Date$ – Returns the current date
- DateBetween – Returns the number of specified time intervals between two dates
- DateToDate$ – Returns a new datetime value based on adding an interval to the specified date
- Day$ – Returns the current day number within the current month
- Hour$ – Returns the current hour as a two-character string
- Hundreds$ – Returns hundredths seconds of system time as an integer from 0 to 99
- Min$ – Returns the minutes of the current hour as a two character string
- Month$ – Number of the current month as a string
- Sec$ – Returns the seconds of the current hour as a two character string
- Time$ – Returns the system clock as a string
- WeekDay – Returns the current day of the week
- Year$ – Returns the current year as a string
System Functions
- #HideIcon – Hides the WinTask icon in the taskbar
- #HideTrayIcon – Hides the WinTask icon in the system tray
- #IgnoreErrors – Manages errors
- Allocate – Reserves a memory area for data used by external DLL
- Beep – Forces the PC to emit a sound through the PC speaker
- CapsLock – Forces the caps lock key to the specified state
- ChDir – Specifies the current working directory
- Curdir$ – Returns the current working directory
- DeleteRegKey – Deletes the specified key in Registry
- DeleteRegValue – Deletes a value in Registry
- Dir – Puts in arrays all or some files present in a directory
- DirTree – Puts file names and directory names into arrays
- DiskFree – Returns the available space on the specified resource
- Envir$ – Returns the value of an environment variable
- ExecExcelMacro – Executes silently the specified macro in the specified Excel workbook and then saves
- Exist – Checks for the existence of the specified file
- External – Calls an external DLL
- External$ – Calls a Windows DLL
- GetCpuLoad – Returns the CPU load percentage
- GetMemUsage – Returns the memory used percentage
- GetProcessCpuLoad – Returns the CPU percentage used by a process
- GetProcessList – Gives the list of active process and their attributes
- GetWindowsList – Gives the list of parent window names present on desktop
- ImpersonateUser – Allows WinTask to acquire additional rights (under Windows XP/2003)
- IsRunning – Tells whether a program is loaded in memory or not
- KillApp – Terminates the specified application
- KillAppChildren – Terminates the specified application and its child processes
- KillProcess – Kills the specified process
- LockKbd – Locks the keyboard
- LockMouse – Locks the mouse
- MkDir – Creates a directory
- NumLock – Forces the numlock key to the specified state
- OsVersion$ – Returns Windows version
- PeekInteger – Reads one or several bytes in memory and returns an integer
- PeekString$ – Reads a string in memory
- PokeInteger – Writes in memory a value of type integer or Unsigned
- PokeString – Writes in memory a string
- Random – Returns a random integer
- ReadIni$ – Reads a parameter in the specified .INI file
- ReadReg – Reads an integer or a string from Registry
- Reboot – Reboots the PC or Windows
- RevertToSelf – Cancels an impersonation made previously by ImpersonateUser (XP/2003)
- RmDir – Deletes a directory
- SendEmail – Sends an email using the defined SMTP server (available only in WinTask x64)
- Shell – Executes a program
- ShellWait – Executes a program (.exe, .com, .bat, .doc, .txt, …) and waits for its termination before running next statement
- UnlockKbd – Unlocks the keyboard
- UnlockMouse – Unlocks the mouse
- WinDir$ – Returns the directory where Windows is installed
- WriteIni – Writes in the specified .INI file
- WriteReg – Creates or modifies a string or numeric value in Registry
Clipboard and Log Functions
- #Current line – Returns the current executed line in the script
- Comment – Writes a comment in the log file
- GetClipboard$ – Returns the text contained in Clipboard
- LogFile – Forces the script to log its actions in the specified logfile
- SetClipboard – Puts the specified string into the Clipboard
- StopLog – Stops recording in the logfile
Compilation
- Dim – Defines an array
- Include – Includes the specified source file in the current script
- Local – Defines a local variable
- Rem – Inserts a comment
- Unsigned – Defines an Unsigned variable
Windows Services management
- IsServiceStarted – Tells if the specified service is started or not
- StartService – Starts the specified service
- StopService – Stops the specified service
Web Functions
- #HTMLBrowser – Specifies the browser to use in the subsequent Web functions
- #HTMLPosRetry – Checks #HTMLPosRetry times that the specified HTML element has the same coordinates before using it
- #IgnoreHTMLCase – Controls the HTML descriptor finding method
- #PageSynchroLevel – Allows a more loose synchronization for Web functions
- #UsePageExact – Controls the HTML pages finding method
- Attribute – Sets the target frame for Navigate function
- CaptureHTML – Captures the text of a specified HTML element
- CaptureIE$ – Captures in text mode what appears in a HTML window
- CaptureTableHTML – Captures a range of cells in a specified HTML table
- CheckedHTML – Retrieves the status of a web form checkbox or radiobutton element
- ClickHTMLElement – Clicks the specified HTML element in the current Web page
- CloseBrowser – Closes the opened instance of Internet Explorer or Firefox browser
- CopyLink – Copies the link associated with the specified HTML element into the specified string
- CurrentPage$ – Returns the current Web page
- EnabledHTMLElement – Returns 1 if the specified HTML element is enabled, returns 0 if it is disabled
- ExistHTMLElement – Checks if the specified HTML element exists or not
- ExtractLink – Returns all the links (HREF properties) of the child elements of the specified HTML element and then the links can be used in a loop to navigate to each of them
- GetFrameSource – Retrieves the source of the specified frame
- GetHTMLEditText – Captures the text displayed in the specified field of a Web form
- GetPageSource$ – Returns the source of the current web page
- ListHTMLItem$ – Retrieves the content of an item in a Combo Box/List Box within a Web page
- Navigate – Navigates to the specified URL
- OverHTMLElement – Moves the mouse over a web menu to open the sub-menu options
- PostData – Fills web forms
- PreviousPage() – Clicks the Back button in the current browser window
- SavePictureAs – Saves an HTML picture element on hard disk
- SaveTargetAs – Simulates a right click on an HTML element and selection of Save Target menu option
- SelectedHTMLItem$ – Returns the selected item in an HTML list/combo
- SelectHTMLItem – Selects an item in a Combo Box/List Box within a Web page
- StartBrowser – Starts Internet Explorer browser or Firefox browser
- UsePage – Specifies the HTML page used by web functions
- WriteHTML – Writes text in a Web form
- WriteHTMLEncrypted – Writes encrypted text in a Web form
- WriteHTMLPaste – Writes text in a Web form by pasting the text
UI Automation Functions
- ClickUIA – Waits until the specified uia element is ready and clicks it
- GetUIAProperty – Returns the content of the specified property for the specified UIA descriptor
- SelectUIAItem – Selects the specified item in a list/combo/tree specified by its UIA descriptor
- WriteUIA – Waits until the field specified by its UIA descriptor is ready for use and then writes text into it
FTP Functions
- #FTPTimeout – Specifies the number of seconds which WinTask should wait before reporting a runtime error when it tries to execute a FTP function
- FTPChDir – Specifies the new FTP current folder
- FTPConnect – Makes a connection to the specified FTP server
- FTPCurrentDir – Returns the FTP current folder
- FTPDisconnect – Terminates the connection to a FTP server
- FTPExistDir – Checks if the specified FTP folder exists or not
- FTPExistFile – Checks if the specified FTP file exists or not
- FTPGetFile – Downloads one or several files to the local PC from the FTP server
- FTPKill – Deletes one or several files from the FTP server
- FTPMkDir – Creates a folder on the FTP server
- FTPName – Renames one or several files in the FTP server
- FTPPutFile – Uploads one or several files from the local PC to a FTP folder
- FTPRmDir – Deletes a folder and its contents on the FTP server
Real Calculation Functions
- #DecimalSeparator – Specifies the decimal separator character used for floating point numbers
- #Precision – Specifies the number of decimal places for floating point calculation functions
- Add$ – Adds two strings representing floating point numbers
- Divide$ – Divides two strings representing floating point numbers
- Multiply$ – Multiplies two strings representing floating point numbers
- Subtract$ – Subtracts two strings representing floating point numbers
Response Time Functions
- ResetTimer – Resets the specified clock
- StartTimer – Starts the specified clock
- StopTimer – Stops the specified clock
- Timer – Returns the value of the specified clock
ODBC Functions
- #DbDateFormat – Controls the date fields format
- DbBof – Tells if recordset contains no records
- DbClose – Closes the recordset
- DbConnect – Establishes the data source connection through the odbc driver
- DbDisconnect – Closes the data source connection
- DbEof – Tells if pointer is at the end of the recordset
- DbExecute – Executes an SQL command on the opened data source
- DbGetFieldNumeric – Retrieves the value of a numeric field in a recordset
- DbGetfieldString – Retrieves the value of a string field in a recordset
- DbMove – Moves the current record pointer within the recordset at specified position
- DbMoveFirst – Positions the current record on the first record in the recordset
- DbMoveLast – Positions the current record on the last record in the recordset
- DbMoveNext – Positions the current record on the next record in the recordset
- DbMovePrev – Positions the current record on the previous record in the recordset
- DbRecordCount – Returns the number or records in the recordset
- DbSelect – Fills the recordset by retrieving in the table the records matching the sql query