You can use CaptureScreen to capture the screen, then use GetImagePixel to get the color.
You can download the sample from PickColor.zip.
You can use CaptureScreen to capture the screen, then use GetImagePixel to get the color.
You can download the sample from PickColor.zip.
In Automatic Mouse and Keyboard, you can use CreateFileFinder and FindNexFile to find files.
You can download the sample from find_file.amk
With the latest version of Automatic Mouse and Keyboard, you can download a file easily. Just call the function UrlDownloadToFile.
You just need to set the URL and the Destination File or Destination Directory.
With the function RandomString, you can generate a random string. So you can use it to generate a random password.
If the argument Charset is Empty, then RandomString will use the default charset which contains all letters and all digits.
You can download the sample from RandomPassword.amk.
Now Automatic Mouse and Keyboard has a new function WaitClipboardText. You can use it to wait until the clipboard text changed.
If the argument Timeout is 0, then WaitClipboardText will wait indefinitely. When the user copied some text, then the clipboard text will change and WaitClipboardText will return the text which has been copied.
It is just easy to use.
This post tells you how to create a infinite loop until the specified picture is not visible on the screen.
Click the loop button to insert a For Loop.
Check the option “Infinite Loop“, then click “OK”.
Click the “if” button and click “If Image Found” to insert a Search Picture command with If Else statement into the For Loop.
Click the loop button again and insert a Exit Loop command between Else and End If.
In Automatic Mouse and Keyboard, you can use the function InputBox to enter a single value. But if you want to enter multiple values, you can call the function InputPara. Each value can have a name, you can get each value with its name.
You can download the sample from InputPara.amk.
Now you can debug run the script in Automatic Mouse and Keyboard. You need to make sure you have already upgraded Automatic Mouse and Keyboard to the latest version 5.4.2.6.
Click the Menu “Tools“, then click “Debug Run“.
Set the Debug Options, then click “OK“.
In the debug window, you can debug run the script step by step with Step Into and Step Over. The default Step Into hotkey is F7, and the default Step Over hotkey is F8. Press the Step Into/Step Over hotkey when the debugger paused the script, you can run the script step by step. Move mouse over a variable, you can see the value of the variable.
With this step by step run feature, you can easily find the bug of your script and then fix it.
The following script can get the rest days of this month and return it. You can consider it as a function and use the Play Another Script command to call it.
To learn how to play another script, please see https://blog.robot-soft.com/play-another-script-in-automatic-mouse-and-keyboard
And you can download the sample from RestDaysOfMonth.zip.
Now Automatic Mouse and Keyboard has a new function WaitTime. It can wait for a specified time of today. If it missed the time, it will return False.
You can use it to do some every day work automatically.
You can download the sample from EveryDayWork.amk.
And you can compile the script to EXE and put the EXE into the Windows Startup Folder to do the every day work automatically. If you don’t know how to compile a script to EXE, please see http://blog.robot-soft.com/create-a-calculator