Marcus' Macro Blog

Mostly tips, tutorials, articles and news about Macro Scheduler & Windows Automation

Archive for the ‘General’ Category



Screen Magnifier In Only 34 Lines of Code

Monday, March 8th, 2010

Check out this screen magnifier, written by Dick Lockey in only 34 lines of Macro Scheduler code.   Paste it into a macro, hit run and then as you move the mouse around your screen you’ll see a 5x magnification of the cursor area.

Dialog>Dialog1
   Caption=5X Magnify
   Width=800
   Height=500
   Top=500
   Left=48
EndDialog>Dialog1
Show>Dialog1
  LibFunc>user32,GetDC,HDC1,Dialog1.handle
  LibFunc>user32,GetDC,HDC3,0

Label>Loop
  GetDialogAction>Dialog1,res1
  If>res1=2
    Exit>0
  EndIf
  GetCursorPos>CurX,CurY
  Sub>CurX,80
  Sub>CurY,50
  Wait>0.01
  LibFunc>Gdi32,StretchBlt,SBres,HDC1,0,0,800,500,HDC3,CURX,CURY,160,100,13369376
  GoSub>DrawLine,Dialog1.handle,1,0,390,250,410,250
  GoSub>DrawLine,Dialog1.handle,1,0,400,240,400,260
Goto>Loop

SRT>DrawLine
  LibFunc>user32,GetDC,HDC,%DrawLine_var_1%
  LibFunc>gdi32,CreatePen,Penres,0,%DrawLine_var_2%,%DrawLine_var_3%
  LibFunc>gdi32,SelectObject,SOPres,hdc,Penres
  Libfunc>gdi32,MoveToEx,mtres,HDC,%DrawLine_var_4%,%DrawLine_var_5%,0
  LibFunc>gdi32,LineTo,ltres,hdc,%DrawLine_var_6%,%DrawLine_var_7%
  LibFunc>gdi32,DeleteObject,DOres,Penres
  LibFunc>user32,ReleaseDC,RDCres,HDC_1,HDC
END>DrawLine

Yes, as Dick Says, you get one of these with Windows. But it’s kind of cool to see you can do the same thing with Macro Scheduler, and the code might come in handy elsewhere.

Enjoy.

[Post to Twitter] Tweet This

Choose Your Web Browser

Thursday, March 4th, 2010

One of my Windows XP systems installed an automatic update last night when I shut it down.  This morning I was presented with this:

Windows EU WebBrowser Choice

As I understand it this is as a result of an EU competition law decision.   Is this a good thing or a bad thing?

On the one hand it seems a waste of money and illogical.

I’m no fan of IE, but why shouldn’t Microsoft build a web browser and make it part of their operating system?  Should the EU force them to offer a choice of text editors, calculators, paint programs and calendar applications too? Where should it end?

Plus, yet another dialog like this is surely going to confuse the ordinary user.  Many have no idea what a “web browser” is and just call it “My Internet” or “Google”.  The dialog preceding the one above has to go to the trouble of explaining what a web browser is.  And isn’t the user just going to take the first option anyway?  In which case should the EU force Microsoft to make IE8 something other than the default option?

But then if I were trying to sell a web browser I guess I would welcome this decision. It might give me a little extra exposure.

What do you think?

[Post to Twitter] Tweet This

Seeking Industry Partners

Tuesday, February 16th, 2010

Are you a contractor, consultant, freelancer or value added reseller who knows and uses Macro Scheduler and works in a specific industry, like Health Care, Education or Manufacturing? If you are I’d like to hear from you.

I’m looking at opportunities for Macro Scheduler in vertical markets and would like to find people with industry experience who can add value and help us promote and support Macro Scheduler in their sector. We need help identifying the key systems and applications used in these markets and creating macros and solutions for them using Macro Scheduler.

It doesn’t really matter what industry you work in. Whatever your vertical market, if you’re a Macro Scheduler user with industry knowledge and the flexibility to explore opportunities, please get in touch.

[Post to Twitter] Tweet This

FTP Uploader – Upload Files From Explorer

Friday, February 5th, 2010

Phil Pendlebury has written a really handy little tool for quickly uploading files from Windows Explorer, and he’s built it using Macro Scheduler.

With his FTP Uploader tool installed you can right click on any file and select Send To->FTP Uploader to quickly upload it to any FTP site.

It will remember the FTP server settings for you and you can choose which FTP settings to use. If the uploaded file has a public web URL the tool will also create the URL for you and put it on the clipboard. Handy for sending people links to file, or uploading images and other files for use in forums.

FTP Uploader

You can download the tool and get the source code here.

I’m often uploading files to our FTP server to send to people, instead of relying on Email attachments. This tool will make short shrift of that. Thanks Phil!

[Post to Twitter] Tweet This

Running Macro Scheduler Macros over the Web Via PHP

Friday, January 29th, 2010

Here’s a quick and simple proof of concept for running Macro Scheduler macros via the web and having their output displayed in the user’s browser:

Running Macro Scheduler Macros Over the Web Via PHP

The screenshot shows the PHP script, Macro Scheduler script and Internet Explorer being used to run the macro.

1) If you don’t already have a Windows based web server with PHP running, download and install WAMPServer. It’s easy.

2) Create a simple PHP script which takes an EXE name as a parameter and any parameters you want to pass to it. The following script will run EXEs that are in the c:\wamp\ folder, passing in any parameters provided and will dispay the EXEs output.

<?php
$exe = $_GET['exe'];

$dir = "c:\\wamp\\";

$parms = "";
foreach($_GET as $key=>$val) {
  $parms .= "/$key=$val ";
}

echo shell_exec("\"$dir$exe\" $parms");
?>

3) PHP’s safemode must be disabled for this script to work.

4) Create a Macro Scheduler macro and use SOWrite or SOWriteLn to output information. Compile it with the “Create Console App” option checked. Compile the EXE (or copy it) to the c:\wamp\ folder.

5) Now the macro can be executed via the web using http://servername/runmacro.php?exe=my.exe&parm1=value&etc=… which could be a link or entered into the browser directly.

6) Consider adding further security to the script to prevent anyone running any EXE on your server, or putting it in a password protected folder. I’ll leave that to you.

Macro Scheduler Enterprise comes with the msNet Remote Controller which includes a CGI module for running Macro Scheduler macros via web servers.

[Post to Twitter] Tweet This

Amazon Kindle T-Shirt Competition – Zazzle Problems and Instructions

Thursday, January 14th, 2010

As you probably know, we’re running a T-Shirt design contest where you could win an Amazon Kindle worth $259.

Some people have had problems sending us a link to their T-Shirt design so I checked it out and found that the process for getting a public link to your shirt is not particularly obvious. So I thought I’d post instructions for the easiest way to do it:

  • Customize the design. Click here to view the T-shirt and then click the Customize button.
  • When you’re done click on “Email” which is beneath the right-hand box, underneath the Add to Cart section.
  • You’ll be prompted to log in or create an account (just a username and email address is required).
  • You’ll then be presented with an email form. Enter your email address as both the sender and recipient so that you can send your design to yourself. If you like add tshirts@mjtnet.com to the To list, so that we also get a copy.
  • Make a cup of coffee.
  • Check your email, grab the link and go paste it in a comment here.

If you’ve already created a design, do not fear, it is not lost. Log into Zazzle (click on My Account at top right). Click on the “Products” tab. On the left under “My Products” you will see “In Progress”, “Private” and “Public”. Your T-Shirt will be under one of these – probably the “In Progress” one. Click on it and then do the Email thing as in the above instructions.

I hope that clears up any confusion. It’s worth the effort – you could win a $259 Kindle!

[Post to Twitter] Tweet This

Amazon Kindle Competion Update

Wednesday, January 6th, 2010

Happy New Year everyone!

What do you do when you’re snowed in and can’t get to work? Get creative that’s what! Enter our T-Shirt design contest and win an Amazon Kindle!

Yes, just in case you missed it, we’re running a T-Shirt design contest. Design a new MJT Net T-Shirt and you could win an Amazon Kindle. The competition closes 31st January. Take a look at the comments to see some of the entries so far, and then post your own.

[Post to Twitter] Tweet This

The Gift of Time; 20% Discount

Friday, December 18th, 2009

What would be the perfect gift?  What is the one thing in such short supply?  You might say it’s money.  You could be right, but more precious than that in my opinion is time.  And of course many will say that in business time is money anyway.  Wouldn’t it be great if someone could give you more time?  Another hour a day, an extra day a week.

I believe that what we do here at MJT Net is exactly that.  We make software that gives you time.  Time to do what you really want, time to invest in the things that matter, to concentrate on the important things in your business or home life.

That’s what we love about our products. Our customers are able to cut down the amount of time they spend on repetitive, cumbersome jobs. With our software they can make themselves and/or their employees more productive.  Rid themselves of wasteful, mind numbing routines, boost productivity, and spend their new found time on what really matters to them.

With 2009 almost at an end, it’s a time to reflect and plan ahead for the New Year.  I know we’ll be spending the quiet period between Christmas and New Year looking at improving our systems and automating some more of our processes.

If you have Macro Scheduler Pro you could give the gift of time to someone this Christmas by creating a macro for them.  Take a look at what a friend or colleague does on their PC and see if you could improve it for them by writing a macro.

If you don’t yet have Macro Scheduler or would like to buy a copy for someone else, here’s a 20% discount coupon to give you even more time for your money:

Coupon Code: TIME2009

The coupon is valid until the end of 2009.

Give yourself, or someone else, the gift of time this Christmas and put it to good effect in 2010.

Happy Christmas!

[Post to Twitter] Tweet This

Tis the Season to .. Automate

Wednesday, December 2nd, 2009

Crumbs, is it really already December? Christmas always seems to creep up on me unprepared. Always so much to do and organise. Most people will be winding down and spending time with friends and family. But in our modern 24×7 culture many businesses still keep running. Web sites and servers still need monitoring, reports generating, data transferring, networks maintained, users, customers and holiday shoppers supported.

How many of us end up “on call” or remoting into the office network to check things over and ensure those pesky systems keep working and processes keep ticking over without causing us more work when we get back in the New Year?

A lot of these things can be automated. Macro Scheduler could be helping you relax this Christmas. It’s a good time to look at your processes and see what could be streamlined. What can be automated to prevent key staff having to log in from home, or made easier for skeleton staff to operate?

In the UK we have new VAT rules coming into effect on 1st January. I wonder how many people will be logging in on New Year’s Day to update their tax codes. We’ve already got a macro set up to do just that, scheduled for 1 minute past midnight.

What will you be automating this Christmas?

[Post to Twitter] Tweet This

T-Shirt Design Contest – Win a Kindle!

Wednesday, November 25th, 2009

Win an Amazon Kindle! Over at Zazzle you can find a range of T-shirts and merchandise sporting the MJT Net Gearhead logo. The really cool thing about Zazzle is that you can customize the products and come up with your own creations. You can add text and even other images.

So we thought it would be fun to get the creative juices flowing. Can you come up with a humorous, punchy slogan for this T-shirt?

You can customize the T-shirt as much as you like as long as the logo and URL are shown prominently. Perhaps you can find something witty to say about Macro Scheduler and why it helps you. Oh and keep it clean.

Click on the image to view the T-shirt and start customizing. Post links to your designs in the comments below. In February we’ll choose our favourite design and send the winner the final product and a free Amazon Kindle (Global Wireless) worth $259!

Update: Last date for entries is 31st January 2010.

Update: Some people have had trouble trying to publish a link to their T-shirt designs and we’ve been unable to view them. We’ve found the quickest way, which avoids creating a store, is to do this: Customize the T-Shirt. When you’re done click on “Email” right underneath the “Add to Cart” section. If you don’t already have an account you’ll be asked to create one and then you’ll get a box to enter an email address. Enter your own email address to email the design to yourself. If you like enter tshirts@mjtnet.com as well so that we also get a copy. Check your email to find the link and then paste it into a comment here.

If you need to get back to your design, log in and click on “My Account” at top right and then “In Progress Designs”. If it’s not there it may be in “Private” or “Public” under “My Products”.

[Post to Twitter] Tweet This