September 8, 2008

How to move to a new PC painlessly

Filed under: General — Marcus Tettmar @ 9:11 am

I recently bought a new PC. It’s one of those things I always put off. The thought of installing all my software again, finding the original disks or download links, copying over all the data and settings, and getting the new PC mirroring the old one sends shivers up my spine. It always seems to take days, and then you usually find some obscure component is missing and something just doesn’t work properly. Especially when it comes to getting development environments running in the same way.

Vista and XP have a way to copy documents and settings, but that doesn’t help with the software. So I had a look around at other solutions that might help.

I discovered that Acronis offers a plugin for True Image Echo called Universal Restore which is supposed to allow you to restore a backup of your PC to any other PC. In doing so you end up with an exact replica of the original PC. It works by detecting the hardware of the new PC and injecting the correct drivers into the Windows Hardware Abstraction Layer during restore. Sounds pretty amazing. I read a number of very positive reviews.

Unfortunately I wasn’t able to get it to work. I kept getting errors during restore. But I think my unusual configuration maybe to blame. I would still recommend Acronis True Image for backups though. I didn’t really want an exact mirror image anyway – just specific applications and folders.

Then I found out about PCmover from Laplink. Their website says:

PCmover is the only migration utility that moves programs, files, and settings from your old PC to your new PC. Simply install PCmover on both your old and new computers and go! PCmover will determine which programs, files, and settings need to be moved, and when the transfer is complete, your new computer will have the personality and functionality of your old PC plus all of its own pre-installed software. Works with almost any Windows operating system, from Windows 95 to Vista.

To be honest I was a little skeptical that it would work. If you’ve ever tried to just copy an application folder from one place to another you’ll know that it rarely works as there are so many other dependencies. So I was interested to know whether PCmover would live up to it’s claims.

Unfortunately there is no trial version. But I decided to purchase a license anyway and give it a whirl.

Well – I’m impressed – it works! You can let it transfer everything, or choose which applications and settings to migrate. You can undo a migration too. I initially let it transfer all the Windows settings and decided I didn’t want that so I undid the migration and started again, this time being more selective. I did a further migration to transfer a few other apps which I missed the first time around.

Afterwards, about all I had to do was re-enter some license codes. But otherwise, everything worked as if I had installed it from scratch. Only it was effortless. And all my documents and data were there too.

Next time though I reckon the way to go is virtual. My next machine will be a virtual machine. Then when it’s time to upgrade the hardware – when I buy a new physical PC – all I’d need to do is copy the virtual disk file over. Backups become easier to: just make a copy of the virtual disk files. The whole PC becomes more portable too. Copy the virtual machine files to your laptop. Now your laptop has a complete snapshot of your main environment. It’s the future! But you can do it now.

If you’re new to virtual computing checkout the following products:

We already run several virtual environments, for testing and development purposes. Much cheaper than multiple physical PCs and easier than multi-booting. And they can easily be copied to new hardware.

So you see, it is finally possible to migrate to a new PC and avoid the pain!

August 7, 2008

Software Automation Tools from MJT Net Ltd Help Keep Companies in Business

Filed under: General — Marcus Tettmar @ 2:38 pm

I can’t name names yet, but I wanted to share this story which I believe is a powerful demonstration of how beneficial software automation can be, especially under the current economic climate.

A small loan company has adopted our software to streamline a number of software processes. By doing so they have become much more efficient and have been able to speed up processing times and reduce labour costs. This has allowed them to offer smaller loans which were previously not profitable.

Within their state two thirds of their competition have gone out of business because they were not able to handle these smaller loans. With the current economic climate meaning people are no longer taking on big loans and mortgages the only way to stay in business is to make small loans pay. Software automation has helped them achieve this. Those that failed to streamline their systems have gone out of business.

This particular company attributes the fact that they are still in business in large part to their use of software from MJT Net Ltd.

There’s never been a better time to cut costs and become more efficient.

Get free publicity – help with a press release or case study

Filed under: General — Marcus Tettmar @ 1:38 pm

We’re currently putting together a press release which will outline how different customers of our software are saving money through software automation.

If you are interested in being featured please let me know. We’ll need a short quote and we will provide a link back to your site. We would need savings translated to monetary terms (e.g. hours saved * average hourly chargeout/labour costs).

The aim of the press release is to demonstrate the kind of savings/efficiency gains companies can make through software automation. Something everyone can benefit from under the current economic climate!

I’m also looking for more case study participants. If you’d like to get some free publicity in your industry publications and showcase your company and demonstrate how you’ve benefited from Macro Scheduler, let me know and, if suitable, I’ll send you a list of questions to get things started.

Some examples:
http://www.mjtnet.com/case-studies/FSBAltusCaseStudy.pdf
http://www.mjtnet.com/case-studies/IowaLaserCaseStudy.pdf

July 31, 2008

Extract Filename and Folder from Path

Filed under: Scripting — Marcus Tettmar @ 1:34 pm

Here’s a quick way to extract just the filename from a full path:

Let>file_path=C:\Program files\Skype\Phone\Skype.exe

//get the file name on its own
Separate>file_path,\,parts
Let>exe_name=parts_%parts_count%

//now get just the folder path
MidStr>file_path,1,{length(%file_path%)-length(%exe_name%)},folder_only

This uses Separate to explode the path into an array using the ‘\’ character as the delimiter. We’ve called the array “parts”. “parts_count” contains the number of elements created. So parts_%parts_count% is the last element, which happens to be the filename.

Now, if we want just the folder path, use MidStr to extract length of file_path minus length of exe_name.

NB: For some reason the curly brackets in the last line of code above are causing the text to output on the next line. That should all be one line. Click on “view plain” to see the raw code if you want to copy it to Macro Scheduler.

Sneak Preview: Code Folding and Bookmarks in Macro Scheduler v11

Filed under: Announcements — Marcus Tettmar @ 1:29 pm

Here’s a video of work in progress. It shows Code Folding and Bookmarks working in the new macro editor of Macro Scheduler v11 which we are currently working on.

Note this is work in progress and the video shows an early development version. All the usual caveats apply – appearances may differ to the final release. Planned release date? Probably January.

July 24, 2008

Quoting Quotes

Filed under: Scripting — Marcus Tettmar @ 1:44 pm

VBScript and Complex Expressions use the ” (double quote) character to delimit strings. Native MacroScript code doesn’t need delimited strings. But if you need to use Complex Expressions or VBScript you need to remember that strings must be delimited in quotes.

One implication of this is that if the string already has a ” character within it you will get a syntax error, because the parser thinks this marks the end of the string.

To avoid this you need to add another quote, and you can use StringReplace to replace any occurences of the ” character with a second one before passing the string to VBScript or a Complex Expression:

//example input string:
Let>mystring=your name is "Sally"

//Double quote before using string in complex expression
StringReplace>mystring,","",mystring_2
If>{%mystring_2% <> ""}
  //Do something
Endif

Without that StringReplace call to double quote the quote characters, the complex If line would produce a syntax error.

The same goes for VBScript:

//example input string:
Let>mystring=your name is "Sally"

VBSTART
VBEND

StringReplace>mystring,","",mystring_2
VBEval>MsgBox("%mystring_2%"),nul

Note that the VBEval statement evaluates a pure VBScript expression. Since VBScript strings must be in quotes we surround the variable mystring_2 with them, and need to use % symbols to tell Macro Scheduler to use the value of mystring_2. See my last post for tips on when and where to use % symbols.

On a similar note, CR LF pairs (Carriage Return and Line Feed) in strings passed to VBScript will produce errors since they are hard line breaks and cause string termination problems. We can avoid this by replacing the real CR and LF characters with the VBScript placeholders:

StringReplace>myString,CRLF," & vbCRLF & ",myString

The quotes terminate and start the string again, splitting it where the CRLF was, and replacing the hard CRLF with the VBScript vbCRLF variable. There’s also vbCR and vbLF variables for carriage returns (CR) and line feeds (LF) on their own.

July 4, 2008

Using Variables and When to use Percent Symbols (%variable%)

Filed under: Scripting — Marcus Tettmar @ 9:38 am

By default in Macro Scheduler you do not have to do anything special to refer to a variable. The following will create a variable called Name:

Let>Name=Freddy

Name is now assigned the value of Freddy.

Referring to Variables:

The following will display a message box containing the word “Freddy”:

MessageModal>Name

Macro Scheduler knows that Name is a variable and finds its value. You do not need to tell it that Name is a variable. If Name did not exist as a variable the message box would simply display the word “Name”.

If you prefer you can tell Macro Scheduler that Name is a variable like so:

MessageModal>%Name%

But, by default (see below to see how to change this behaviour), there’s really no need since Name appears on its own.

However, supposing you wanted a message box that said “My Name is Freddy” and you wanted to use the variable “Name”. In this case you need to tell Macro Scheduler that Name is a variable, like so:

MessageModal>My Name is %Name%

Hopefully the reason is clear. If we did not put % symbols around the second “Name” the message box would simply display “My Name is Name”. Equally if Macro Scheduler tried to interpret every word as a variable we’d end up with “My Freddy is Freddy”.

Rule of thumb: % symbols really only need to be used when a variable appears within another string. When used on their own they are not needed.

Creating/Modifying Variables:

% symbols mean find the value of this variable. So when creating or modifying variables do not use them. E.g., the following assigns the value Freddy to the variable “Name”

Let>Name=Freddy

If you were to include Name in % symbols then you’d be saying “Assign Freddy to the value of Name”. This could get confusing. Consider the following code:

Let>Name=Sally
Let>%Name%=Freddy

Here we’d end up with two variables, one called Name assigned the value of Sally, and another called Sally assigned the value of Freddy. Now this can be quite powerful and there may be times you want to do this, but for most of us, it is usually not what we want.

Rule of thumb: Do not use % symbols when assigning to variables. This includes variables returned by other commands as well as variables on the left of the equals sign in Let commands.

There’s an interesting forum topic on this subject here.

Exceptions:

One time we DO want to use % symbols on the left side of a Let command is when we are creating/modifying array type variables and we are using an array counter. E.g.:

Let>x=0
Repeat>x
  Let>x=x+1
  Random>9,var
  Let>Array[%x%]=var
Until>x=10

Here x is the loop counter. We are creating an array of 10 random values. In this case we want the value of x inside the array name and end up with variables Array[1], Array[2], Array[3], …. Array[10]. This is one case where we want a variable inside a variable.

Explicit Variable Resolution:

Real programmers prefer to tell the programming language when a value is a literal and when it is a variable, and as you get more advanced you may find the need to do that. You can tell Macro Scheduler to only resolve variables that are contained in % symbols and leave everything else as literals by setting VAREXPLICIT to 1:

Let>VAREXPLICIT=1

With this setting the following code will display the word “Name” in the message box:

Let>VAREXPLICIT=1
Let>Name=Fred
MessageModal>Name

Unlike before where we’d see “Fred” in the message box. Now to see the value of the Name variable we’d have to do:

MessageModal>%Name%

Note that when assigning to variables the variable name still appears on its own. Nothing changes in regards to creating or assigning to variables; only when referring to their values. The rules above still apply.

For more information see the following topics in the help file:
* User Defined Variables
* Explicit Variable Resolution
* Ignoring Spaces

May 29, 2008

TrustWatch?

Filed under: General — Marcus Tettmar @ 7:00 pm

Received an email today from a longstanding customer who is using Comcast as his ISP. Today he tried to access www.mjtnet.com and received this message:

WARNING!
This site is rated potentially unsafe by TrustWatch!

You have been redirected to this page as a service of Comcast High-Speed Internet, which includes the Comcast Toolbar. TrustWatch, a critically acclaimed, industry-leading website verification service, has restricted access to the site www.mjtnet.com for your protection. Accessing this site could put you at risk for identity theft or other financial fraud.

What the!? Identity theft? Financial fraud? Where ON EARTH do they get that idea? Who do these people think they are?

So I googled TrustWatch and found their website. I clicked on their About Trustwatch page to find a phone number. I figured I’d give them a call. I did. I got this recorded message:

The number you have dialed has been disconnected

Doesn’t exactly engender trust, does it, TrustWatch?

Update: I tried emailing them via the email address listed on their site – [email protected] – and it bounced saying an SMTP connection could not be established.

Update 2: Seems someone else had a similar experience trying to contact TrustWatch

May 23, 2008

Macro Scheduler 10.1.15 is 40 Times Faster!

Filed under: Announcements, Automation, Scripting — Marcus Tettmar @ 8:08 am

With the latest release (10.1.15) we worked on optimizing the way variables are stored internally and were able to dramatically improve performance. Dick Lockey did some tests and writes that the latest version is 40 times faster than earlier versions!

If you’re working with scripts that create and process a large number of variables – say a script which reads and processes a large number of fields from a database – you’ll want to make sure you’re using the latest release, because your scripts will be noticeably faster with this version.

Macro Scheduler History

May 19, 2008

In the News: Internal Efficiency Improves Customer Service

Filed under: General — Marcus Tettmar @ 8:29 am

Internal Efficiency Improves Customer Service

Internal Efficiency Improves Customer Service
"Initially the IT division was on a theoretical ‘25th floor’ and everyone was taking the stairs," says Garry Petzold, the chief IT officer at First State of Altus, Okla. "To better serve our customer base, while also meeting the needs of our bank’s technology infrastructure, I started researching solutions that would automate business processes and improve workflow. More…