Category: Scripting

Automating Google

October 3, 2013 by Marcus Tettmar in Automation, Scripting

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 […]

Read more »

Paste Into Object Without Using Keystrokes

April 17, 2013 by Marcus Tettmar in Automation, Scripting

Someone asked today how it might be possible to paste what is in the clipboard into an object using Macro Scheduler without having to use keystrokes. It can be done by sending the WM_PASTE message using the SendMessage API function. Here’s an example: //Sending WM_PASTE to an object causes a clipboard paste, like sending CTRL-V […]

Read more »

Getting Data From Excel Without Office Installed

March 27, 2013 by Marcus Tettmar in Automation, Scripting

In this post from 2008 I demonstrated how to get data from Excel worksheets using Macro Scheduler’s database functions. This works fine if Office is already installed on the PC.   But what if you want to get data from an Excel sheet and the PC you are running on doesn’t have Office installed? Well […]

Read more »

How to tell if the current session is a Remote Desktop session

January 24, 2013 by Marcus Tettmar in Automation, Scripting

Here’s a small piece of code which will tell you whether the current session is a Remote Desktop/Terminal Services session or not: Let>SM_REMOTESESSION=4096 LibFunc>User32,GetSystemMetrics,isRemote,SM_REMOTESESSION If>isRemote>0 MessageModal>Current Session is RDP/Terminal Services Session Else MessageModal>Current Session is Local Session Endif

Read more »

Custom Event Triggers

December 7, 2012 by Marcus Tettmar in Automation, Scripting

Did you know you can make just about any kind of schedule or trigger using Custom Event Triggers? You’ll find the custom trigger option under Macro Properties in the Trigger tab. Parsnipnose3000 has just posted a tip on Custom Event Triggers to the forums, showing how you can have a macro fire based on an […]

Read more »

My Most Used RegEx

October 29, 2012 by Marcus Tettmar in Automation, Scripting

It occurred to me the other day while working on a script for a customer that I use this regular expression frequently: (?<=TOKEN1).*?(?=TOKEN2) It is very useful when parsing information out of web pages, or when finding elements in web pages. What it does is pull out all the text between TOKEN1 and TOKEN2. Those […]

Read more »

Sending/Retrieving Emails via Gmail

October 3, 2012 by Marcus Tettmar in Automation, Scripting

Since version 13.2 Macro Scheduler‘s email functions now support SSL. Google’s Gmail and many other email services now insist on SSL secured connections. To use SSL you first need to install the OpenSSL library files. Here’s an example of sending an email via Gmail: Let>SMTP_AUTH=1 Let>[email protected] Let>SMTP_PASSWORD=your_password Let>SMTP_PORT=465 Let>SMTP_SSL=1 SMTPSendMail>[email protected],smtp.gmail.com,[email protected],your name,test,hello world, And to retrieve […]

Read more »