Nov 152015

In Automatic Mouse and Keyboard, you can create a Scripting.FileSystemObject object, then use the object to get the size of a file.
Get File Size

You can download the sample from GetFileSize.amk

It is very easy to match a regular expression in Automatic Mouse and Keyboard. You just need to call the function RegExpMatch.
RegExpMatch

Click the “Pattern“, then you will see the “Regular Expression” dialog.
Regular Expression

Select the “Expression type” as “<Common regular expressions>“.
Common Regular Expressions

Then you can find some common regular expressions.
Common Regular Expressions

You can learn how to create regular expressions from the common regular expressions.
And you can download a sample from RegExp.amk

To load a txt file, you can call the function LoadTextFile. And then you can call the function SplitString to split the texts to lines. You can also call SplitString again to split a line to values. The following sample show you how to load a text file and split its content.
Load Text File

You can download the sample from LoadTextFile.zip
And you can learn more about the function SplitString from http://blog.robot-soft.com/how-to-split-string.

In Automatic Mouse and Keyboard, you can call the function Command to run Windows console commands.
Command

The following sample show you how to make a directory and remove a directory with the function Command.
Make directory

You can download the sample: Command.amk

Jan 302015

To connect to MySQL with Automatic Mouse and Keyboard, you need to install the MySQL ODBC Driver. You can download the driver from: http://www.mysql.com/downloads/connector/odbc/
Download the connector which is compatible with your Windows. Then install it and create a MySQL data source.

Then you can call the function Database_Connect with connection string:
Driver=MySQL ODBC 5.3w Driver;Server=localhost;Option=16834;Database=test;User=root;Password=123;

And you can get more help about MySQL ODBC Driver with google.

Now Automatic Mouse and Keyboard has a new feature: Solve Equations Automatically. Call the function CreateSolver to create a solver, then call the solver’s method Solve. The method will return an array which contains the results.
Solve Equation
You can download the sample: Solver.amk

To create a message box with timeout option, you can call the function MessageBoxEx, and set the timeout parameter. Or you can create a WScript.Shell object and call its method Popup.
Message Box Timeout

You can download the sample from: MsgBoxTimeout.amk

Sep 192014

You can call the function SplitString to split a string in Automatic Mouse and Keyboard.

Split String

The function SplitString split a string with specified key. It returns an array which contains the results.
Split String Sample

You can download the sample: SplitString.amk

You can convert image file format with Automatic Mouse and Keyboard easily. Just call the function LoadImage to load a image file, then can the function SaveImage.
Convert Image File Format

Jun 142014

You can call the function XLS_Create to create an excel file. And you can call the function XLS_Open to check if an excel file exists. If it does not exist, then call XLS_Create to create. Sample: Excel.amk

Create Excel File

There are many other excel functions in Automatic Mouse and Keyboard, to learn more about them, please see http://blog.robot-soft.com/how-to-operate-excel-file.

© 2017 RobotSoft Suffusion theme by Sayontan Sinha