In Automatic Mouse and Keyboard, it is very easy to use SQLite database. The following sample shows you how to create a table, and how to insert and get a record.
And you can download the sample from sqlite.amk
In Automatic Mouse and Keyboard, you can create a Scripting.FileSystemObject object, then use the object to get the size of a file.
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.
Click the “Pattern“, then you will see the “Regular Expression” dialog.
Select the “Expression type” as “<Common regular expressions>“.
Then you can find some 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.
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.
You can download the sample: Solver.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.