To get the day of the week in Automatic Mouse and Keyboard, you can call the function DayOfWeek. You can also call function Tomorrow and Yesterday to get tomorrow and yesterday.
You can download a sample from DayOfWeek.amk.
In Automatic Mouse and Keyboard, you can call the function RandomString to generate a random string. You can also call the function RandomNumber to select a random string from a string list.
You can download the sample from rand_str.amk.
Automatic Mouse and Keyboard now has a very useful function StringFormat. It can return a formatted string. You can get a specified format string with StringFormat easily.
You can download a sample from str_fmt.amk.
With the Scripting.FileSystemObject object, you can get a drive serial number. It is useful when you want your script can only run in a specified computer.
And you can get the sample from GetDriveSerialNumber.amk.
In Automatic Mouse and Keyboard, a script can play another script. Play another script just like invoke a function, you can pass arguments and receive script return value.
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.