November 11, 2013
Useless Box Kit
I rather like this. I thought you might too:
And it gives me an idea.
This struck me as being rather like a hardware equivalent to the old “Hello World” type program most people start out with. I remember learning BBC Basic with something like this:
10 Print “Hello”
20 Goto 10
Does anyone have a totally useless but fun Macro Scheduler macro?
October 24, 2013
Making your macros intelligent with If, Else, and Endif
The power and flexibility of Macro Scheduler makes this an easy task.
There are hundreds of different reasons you might want to do this. Maybe it’s dependent on :
- The answer to a question.
- The success/failure of an operation.
- The contents of a file.
- If a file or folder exists.
- If a certain mathematical goal is reached (e.g. if>count=100).
- If a certain image is visible on the screen.
- If the value of a cell in an Excel spreadsheet matches your requirement.
- If an email was/wasn’t successfully sent.
- If a value on a web page matches your criteria.
- The day/date/time or year
That’s just a handful of the many hundreds of variables we can check, but the basic rules of IF, Else, and Endif are always the same.
Let’s use asking a simple yes/no question as an example. We simply tell the macro something like this:
Ask a yes/no question
If the answer is yes
Then do thisIf the answer is no
Then do that
It’s that simple! So, how do we put that into simple Macro Scheduler language? Here’s how :
//ask a yes/no question
Ask>Do you like brussel sprouts?,question
//depending on the answer given, the macro will execute *one* of the two lines below, then continue on with the rest of the script
If>%question%=YES
MessageModal>I agree, but let's keep it our secret
Else
MessageModal>Right. They're ghastly
Endif
//you can abbreviate messagemodal to mdl
mdl>OK, on with the rest of this script.
Ask>Do you like brussel sprouts?,question
If>%question%=YES
MessageModal>I agree, but let's keep it our secret
Else
MessageModal>Right. They're ghastly
Endif
mdl>OK, on with the rest of this script.
If>your condition is/isn't met //do this //or else Else //do that Endif
If>your condition is met //This line only executes if the condition is met, otherwise it's ignored Endif
Questions? Reply to this thread. Our support team and our community are always happy to help.
October 3, 2013
Automating Google
This has come up a few times lately so I thought I’d post it here.
One or two people have been asking about writing a Macro Scheduler script that performs a Google search and pulls back the resulting URLs. They have discovered that trying to automate Google can be awkward because of the dynamic nature of the page. As soon as you type in the search box the page changes because it is updating in real time.
Some people suggested using HTTPRequest to get the page content directly and then parse it with RegEx. This can be done but is also tricky because you’re getting back all the dynamic code and other stuff like adwords ads etc and it is hard to find the right patterns.
There’s an easier way. Use their API URL instead. E.g.:
http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=Apple%20Pie&rsz=large&start=1
This performs a search for “Apple Pie”. Try it in your browser and you’ll see the content is less cluttered and it is easy to parse. It returns 8 results. For the next 8 you would change the start parameter to 9, and so on.
So here’s a simple example script which takes a search term, specifies how many results to get, extracts the URLs and writes them to a text file:
September 26, 2013
Macro Scheduler in the Winter Olympics
Macro Scheduler on Skis? No, not exactly. But your favourite automation software and macro recorder will apparently be helping behind the scenes at the Winter Olympics next year in Sochi.
I received this message from Stefano Frattini, DT Manager at Olympic Broadcasting Services SL, yesterday:
You’ll be happy to know that a small Macro Scheduler script will be running on a service channel machine at the Sochi Olympics next year. The script is controlling the download, verification and sorting of weather information files which actually feed a TV channel from OBS (Host Broadcaster) called Olympic Weather Channel. This channel is distributed to all the Rights Holder Broadcasters during the SOCHI Olympic Games.
September 20, 2013
50% Off Software Test Automation eCourses
Just a heads up that our friend Randy Rice is currently offering 50% off his most popular Software Test Automation eLearning courses.
So if you’re interested in learning about software test automation you can grab yourself a bargain until Midnight Tuesday. Randy’s got the info here.
September 19, 2013
Macro Scheduler 14.0.14 Available
Macro Scheduler 14.0.14 maintenance release is now available for download.
History | Trial Downloads | Registered Downloads [Subscribers: Please use personal link emailed to you]
September 13, 2013
Unofficial Macro Scheduler Puzzler of the Week
It is Friday 13th and forum regular JRL has posted a little Macro Scheduler contest for beginners and experts alike with a chance to win some rep points. Check it out here.
September 6, 2013
Prism and Dilbert
Love today’s Dilbert cartoon. Had to share it.
September 3, 2013
From the Archives: Making EXEs Respond to Hotkeys
How do you make compiled macros respond to hotkeys?
Here’s how: http://www.mjtnet.com/blog/2007/11/20/exes-and-hotkeys/