Sorting Bubbles
I’ve just posted a tip to Scripts ‘n Tips showing a simple Bubble Sort subroutine. The example sorts a list of files returned by the GetFileList function. I hope it’s useful. Here it is.
Macro Recording and Automating Windows with Macro Scheduler – Tips & News
I’ve just posted a tip to Scripts ‘n Tips showing a simple Bubble Sort subroutine. The example sorts a list of files returned by the GetFileList function. I hope it’s useful. Here it is.
As you probably already know, selecting a page of a tab control is usually best achieved by sending CTRL-TAB. So on opening an application we can use the following Macro Scheduler code to jump to the third tab: SetFocus>Window_Title Press CTRL Press Tab * 2 Release CTRL This issues CTRL-TAB twice and therefore cycles through […]
This one has bugged me for years – how to automate activating a system tray icon. For starters, the System Tray is designed to be manipulated with the mouse. We could send mouse clicks to icons in the system tray but for the fact that icons don’t always appear in the same place in the […]
Here’s a script to automate the installation of Adobe Reader: http://www.mjtnet.com/usergroup/viewtopic.php?t=3034 This script demonstrates how to wait for windows to change based on the text within them. As with the majority of installers, Adobe Reader’s installer has a series of windows with the same title with differing content, and “Next” buttons to progress through the […]
I’ve just had a bit of fun writing a couple of small scripts that will search Google for a set of key phrases and find the position of a specified URL for those key phrases in the results. I have built two versions of this script. One with a simple dialog where you can enter […]
[UPDATE: 27.3.2018 – Since this article was written Macro Scheduler now has built in Screen OCR functions] We often need to write scripts that extract text from a window or some area of the screen. Usually this can be achieved via the clipboard, or commands such as GetWindowText and GetControlText, or via a Win32 API […]
[Update 23 Feb 2011: Click here for a video tutorial of the debugger in Macro Scheduler 12] The first thing I turn to when helping someone get their script working is the debugger. But I’m often surprised to hear people say they didn’t know about the debugger. The debugger is an invaluable tool to help […]
When running command line tools, applications or batch files it is often necessary to watch the resultant command window. E.g. to detect their completion you can have the script wait until the command window has closed. The trouble with this is that when you run batch files the title of the command window is always […]
Tight loops consume CPU cycles. A tight loop that doesn’t yield to the processor will hog the processor and can prevent other processes getting the CPU and can therefore slow down your system. Consider this simple loop: Let>x=1 Label>start Let>x=x+1 Goto>start Run that and you’ll notice CPU utilisation for Macro Scheduler will jump up to […]
Someone asked recently how to get information on what certain error codes mean. Most of the error codes returned by Macro Scheduler functions are actually standard Windows return codes. E.g. the result of a WriteLn or ReadLn operation or the Run Program command is a standard Windows error code. Windows System Error codes are documented […]