Posted by Catur Nugroho | File under :
Simple Notepad Automation Using Autoit C# This is a simple example of how to work with Notepad for sending text, copy / paste, and save it as a file. I will try to explain as details so that you can easily understand. You can adding this code into your project. This is additional function that I have made, you can copy and paste. private void Type(string strKeys, int nMode, string strControl, bool blnSleepKeys, int nSleep, string strWindow)       ...
Posted by Catur Nugroho | File under :
Autoit Win Active Using C# Checks to see if a specified window exists and is currently active. WinActive ( "title" [, "text"] ) Parameters title The title of the window to check. See Title special definition. text [optional] The text of the window to check. Return Value Success: Returns the handle to the window if it is active. Failure: Returns 0 otherwise. Remarks None. Source : Autoit Help Document Autoit Win Active In...
Posted by Catur Nugroho | File under :
Autoit Win Wait Active Using C# Pauses execution of the script until the requested window is active. WinWaitActive ( "title" [, "text" [, timeout]] ) Parameters title The title of the window to check. See Title special definition. text [optional] The text of the window to check. timeout [optional] Timeout in seconds Return Value Success: Returns handle to the requested window. Failure: Returns 0 if timeout occurred. Remarks None. Source...
Posted by Catur Nugroho | File under :
Autoit Win Wait Using C# WinWait Pauses execution of the script until the requested window exists. WinWait ( "title" [, "text" [, timeout]] ) Parameters title The title of the window to check. See Title special definition. text [optional] The text of the window to check. timeout [optional] Timeout in seconds Return Value Success: Returns handle to the requested window. Failure: Returns 0 if timeout occurred. Remarks None. Source...
Posted by Catur Nugroho | File under :
Autoit Control List View Using C# Sends a command to a TreeView32 control. ControlTreeView ( "title", "text", controlID, "command" [, option1 [, option2]] ) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. command The command to send to the control (see below). option1 [optional] Additional parameter required by some commands. option2 [optional] Additional parameter required by some commands. Return Value Depends on command as table...
Posted by Catur Nugroho | File under :
Autoit Control Show Using C# Shows a control that was hidden. ControlShow ( "title", "text", controlID ) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. Return Value Success: Returns 1. Failure: Returns 0 if window/control is not found. Remarks None. Source : Autoit Help Document Source Code Autoit Control Show In C# Parameters...
Posted by Catur Nugroho | File under :
Autoit Control Set Text Using C# Sets text of a control. ControlSetText ( "title", "text", controlID, "new text" [, flag] ) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. new text The new text to be set into the control. flag [optional] when different from 0 (default) will force the target window to be redrawn. Return Value Success: Returns...
Posted by Catur Nugroho | File under :
Autoit Control Move Using C# Moves a control within a window. ControlMove ( "title", "text", controlID, x, y [, width [, height]] ) Parameters title The title of the window to move. text The text of the window to move. controlID The control to interact with. See Controls. x X coordinate to move to relative to the window client area. y Y coordinate to move to relative to the window client area. width [optional] New width of the window. height [optional]...
Posted by Catur Nugroho | File under :
Autoit Control Get List View Using C# Sends a command to a ListView32 control. ControlListView ( "title", "text", controlID, "command" [, option1 [, option2]] ) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. command The command to send to the control (see below). option1 [optional] Additional parameter required by some commands. option2 [optional] Additional parameter required by some commands. Return Value Depends on command as table...
Posted by Catur Nugroho | File under :
Autoit Control Hide Using C# Hides a control. ControlHide ( "title", "text", controlID ) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. Return Value Success: Returns 1. Failure: Returns 0 if window/control is not found. Remarks None. Source : Autoit Help Document Source Code Autoit Control Hide In C#   Parameters Required...
Posted by Catur Nugroho | File under :
Autoit Control Get Text Using C# Retrieves text from a control. ControlGetText ( "title", "text", controlID ) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. Return Value Success: Returns text from a control. Failure: Sets @error to 1 and returns a blank string of "". Remarks None. Source : Autoit Help Document Source Code Autoit Control...
Posted by Catur Nugroho | File under :
Autoit Control Get Pos (x) (y) Using C# Retrieves the position and size of a control relative to its window. ControlGetPos ( "title", "text", controlID ) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. Return Value Success: Returns an array containing the size and the control's position relative to its client window: $array[0] = X position $array[1]...
Posted by Catur Nugroho | File under :
Autoit Control Get Post Height / Width Using C# Retrieves the position and size of a control relative to its window. ControlGetPos ( "title", "text", controlID ) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. Return Value Success: Returns an array containing the size and the control's position relative to its client window: $array[0]...
Posted by Catur Nugroho | File under :
Autoit Control Get Handle Using C# Retrieves the internal handle of a control. ControlGetHandle ( "title", "text", controlID ) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. Return Value Success: Returns the handle (HWND) value. Failure: Returns "" (blank string) and sets @error to 1 if no window matches the criteria. Remarks This function...
Posted by Catur Nugroho | File under :
Autoit Control Focus Using C# Sets input focus to a given control on a window. ControlFocus ( "title", "text", controlID ) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. Return Value Success: Returns 1. Failure: Returns 0. Remarks None. Source : Autoit Help Document Source Code Autoit Control Enable / Disable in C# Parameters...
Posted by Catur Nugroho | File under :
Autoit Control Enable / Disable Using C# Disables or "grays-out" a control. ControlDisable ( "title", "text", controlID ) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. Return Value Success: Returns 1. Failure: Returns 0. Remarks None. Source : Autoit Help Document Source Code Autoit Control Enable / Disable in C# Parameters Required...
Posted by Catur Nugroho | File under :
Autoit Control Command Using c# Sends a command to a control. ControlCommand ( "title", "text", controlID, "command" [, "option"] ) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. command The command to send to the control. option [optional] Additional parameter required by some commands. Return Value Depends on command as table below...
Posted by Catur Nugroho | File under :
Autoit Control Click Using C Sends a mouse click command to a given control. ControlClick ( "title", "text", controlID [, button [, clicks [, x [, y]]]] ) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. button [optional] The button to click, "left", "right", "middle", "main", "menu", "primary", "secondary". Default is the left button. clicks [optional]...
Posted by Catur Nugroho | File under :
ControlSend Sends a string of characters to a control. ControlSend ( "title", "text", controlID, "string" [, flag] ) Parameters title : The title of the window to access. text : The text of the window to access. controlID : The control to interact with. See Controls. string : String of characters to send to the control. flag : [optional] Changes how "keys" is processed: flag = 0 (default), Text contains special characters like + to indicate...
Posted by Catur Nugroho | File under :
Autoit.Run() Runs an external program. Run ( "program" [, "workingdir" [, show_flag[, opt_flag ]]] ). Parameters :  program : The full path of the program (EXE, BAT, COM, or PIF) to run (see remarks).  workingdir :  [optional] The working directory. This is not the path to the program.  show_flag : [optional] The "show" flag of the executed program: @SW_HIDE = Hidden window (or Default keyword) @SW_MINIMIZE = Minimized window @SW_MAXIMIZE = Maximized window  opt_flag :[optional] Controls various options related...
Posted by Catur Nugroho | File under :
How to Use Autoit in c#? You just need to adding the autoit class library to your project. Go to Solution Explorer - right click Refences - select Add Reference. Click Browse tab and go to C:\Program Files\AutoIt3\AutoItX\AutoItX3.dll Autoit class library ready to used. If you have not installed autoit, please go to my article Hot to Use And Instal Autoit Window info or download AutoitX3.dll here. This is sample code how autoitX3.dll work...
Posted by Catur Nugroho | File under :
First time you need to download and instal Autoit application, download at here http://www.autoitscript.com/site/autoit/downloads/. This is basic image of autoit : Find the basic control info win form application Drag and drop Finder Tool to win form application. You will find the Basic Window Info (Title, Class), Basic Control Info (Class, Instance) this is text box name of notepad. This is the basis of how autoit work. May be useful...