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?
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 :
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 this
If 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.
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.:
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:
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.
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.
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.