September 7, 2006

Get Selected Tab Index

Filed under: Automation, Scripting — Marcus Tettmar @ 6:51 am

As you probably already know, selecting a page of a tab control is usually best achieved by sending CTRL-TAB. So on opening an application we can use the following Macro Scheduler code to jump to the third tab:

SetFocus>Window_Title
Press CTRL
Press Tab * 2
Release CTRL

This issues CTRL-TAB twice and therefore cycles through two tab selections, leaving the third tab selected.

Usually when the window is first opened, the first tab is selected. But what if that is not always the case? How can we determine which tab is currently selected? This question came up in the forum recently.

To do this we can use the Windows API and send the TCM_GETCURSEL message to the tab control. When this message is sent to the control it returns the index of the selected tab.

Here’s an example. Right click on the desktop to open the Desktop Properties dialog and select one of the tabs to change the page. Then run this script:

//Initialise constants
Let>TCM_GETCURSEL=4875

//Get the handle of the Display Properties Window
GetWindowHandle>Display Properties,hwnd

//Find the handle of the SysTabControl32 (Tab Control) object
LibFunc>User32,FindWindowExA,tabctrl,hwnd,0,SysTabControl32,

//Send the TCM_GETCURSEL message to retrieve the selected tab index
LibFunc>user32,SendMessageA,tabindex,tabctrl,TCM_GETCURSEL,0,0

//Display the result
MessageModal>Selected Tab: %tabindex%

This finds the handle of the SysTabControl32 object on the Display Properties dialog and sends it the TCM_GETCURSEL message to retrieve the selected tab index.

You can use this approach with other applications. However, some applications use a different class of tab control, so you’d need to determine the class name of the tab control using the View System Windows tool in Macro Scheduler.

September 4, 2006

September 1, 2006

Do or Die for Windows Vista

Filed under: Vista — Marcus Tettmar @ 10:19 am

According to Sven Hallauer, Director of Windows Release Management, in a podcast interview yesterday, Microsoft has only a couple of weeks to ensure all critical bugs are fixed and in place to meet the Vista deadline. Any delay and the bugs either won’t get fixed, or the release date will slip.

Certainly Vista Release Candidate 1 is much more polished than Beta 2 and it does seem like Microsoft has stepped up a gear to try to meet their target release date.

Listen to the interview with Sven Hallaur in which he explains the build process behind Windows Vista.

August 30, 2006

Success Story – Insurance Company Frontend

Filed under: Uncategorized — Marcus Tettmar @ 6:46 am

This was posted to the forum by Shane this morning:

I have been developing scripts for our Banking and Insurance company for approx 3 years.

We currently have 77 scripts with approx 20 000 lines of code, running on 104 machines and used 11502 times last week by our 100+ consultants.

The scripts are used in our Insurance Call Centre for lodgement of new Home and Motor Insurance claims and for tracking call backs by customers once a claim is lodged. In fact what we have created is like a mini front end for our consultants.

Previously our consultants would lodge claims directly into our Mainframe system. Old style front end, Cobol based, no error checking and no way to ensure accuracy of details.

Now Macro scheduler sits between our consultants and the mainframe and automates many/all of the processes. (completes web pages where required such as booking repairers, emails tow in requests for vehicles, prompts for details such as weather conditions in a road accident, Text messages a customer their claim details at the end of the claim process.)

Reports generated allow us to track why customers call back and how often, how many claims we lodge. I have also combined the reports with information from the Australian Bureau of Meteorology to give us real time tracking of New claim lodgement during storms so we can make predictions on call volumes.

I should also mention that the support we have received from MJTNet is second to none. A great program and a great company to deal with.

August 28, 2006

Bank Holiday, But Not For Me.

Filed under: General — Marcus Tettmar @ 12:49 pm

Here’s a useless bit of info: It’s a Bank Holiday here in the UK. Wikipedia has the gen. It doesn’t mean quite what it does in the USA.

But while the banks may be closed for business it’s pretty much business as usual for me here at MJT Net Ltd. It’s an ordinary Monday throughout the rest of the world and I don’t suppose our UK bank holidays mean much to our international customers, so our tech support desk is operating as usual.

August 25, 2006

A Few Search Tips

Filed under: General, Web/Tech — Marcus Tettmar @ 2:26 pm

In my last post I said I would provide some tips on getting the best out of Google Groups and finding what you’re looking for. But first off let’s start with a few general search tips. Google themselves provide some helpful guides on using the regular Google search engine:

Basic Tips:
http://www.google.com/help/basics.html

Advanced Search:
http://www.google.com/help/refinesearch.html

These guides are well worth reading. There’s lots of stuff on the Advanced Search page that are easy to overlook and can be very helpful in narrowing down your search. For example, you can limit your search to a particular domain. I often use this for searching for answers on Microsoft’s site. E.g.:

“not allowed in this context” site:microsoft.com

Note that the advanced search simply adds information to the regular search query. To search within a domain it simply adds the “site:” attribute to the search term. You can add this yourself in the regular search box. You can also exclude results from certain sites:

“Macro Scheduler” -site:mjtnet.com

Note the use of the quote marks to search for a specific phrase. In my first example above I wanted to find pages on microsoft.com that contained this error message. So I needed to use the quotes.

Google Groups searches Usenet messages. It works in much the same way as Google. But since Usenet consists of a huge array of groups spanning all manner of topics it is often necessary to narrow your search down to within certain groups. Consider this Google Groups search:

create recordset

The first page of results consists of messages from various groups covering VB, SQLServer, MS Access, Dreamweaver and Ultradev. What I really want to do is find out how to create a record set in VBScript. In much the same way the regular Google search lets you search within specific domains, you can search within specific groups:

create recordset group:microsoft.public.scripting.vbscript

This searches only within the microsoft.public.scripting.vbscript newsgroup. But there are other groups that discuss VBScript. And what if you don’t know what they are called? Well, you can use wildcards:

create recordset group:*vbscript*

This returns a much more targeted, useful set of results from various VBScript groups. Definitely my most used search construct.

Hope this helps!

August 24, 2006

Usenet – My Best Kept Secret

Filed under: General, Web/Tech — Marcus Tettmar @ 10:18 am

In a way I feel I’m about to blow my own cover with this post. But I’m pretty sure many people will find this really useful. I seem to have a reputation for knowing everything. People always come to me with their computer problems and I’m nearly always able to find a solution. When I help Macro Scheduler customers with obscure VBScript, ODBC, or Win32 API, issues they often ask “How the hell do you know this stuff?”.

The truth is I very often don’t have the answers immediately. Sometimes a support ticket will come in or I’ll see a forum post and I’ll be no more able to answer it than anyone else. But I have my secret weapons. And the fact is anyone else can use them too.

My favourite and most useful resource is Usenet. I take Usenet for granted, but I’ve realised lately that many people these days don’t know what Usenet is. Usenet is an email like distributed discussion system that was invented at Duke University (North Carolina, USA) by two graduate students in 1979. Yes, you heard that right, the best resource for answering technical questions for state-of-the-art problems is 27 years old! With Usenet, users read, post and reply to messages to a huge number of ‘newsgroups’ on all manner of topics. Newsgroups are distributed across ‘news servers’ throughout the Internet. Most ISPs have a news server that their subscribers can access.

Usenet is home to all sorts of weird and wonderful topics. Discussions of all sorts take place in Usenet. There are literally thousands and thousands of groups. Many I’d rather have nothing at all to do with! But Usenet is also the domain of programmers, technical whizkids and geeks of all varieties. And since it has been around for so long there’s almost no technical issue, programming problem or computer scenario that hasn’t been discussed at some point. So it is the perfect place to go to find out how to build that bit of VBScript, use a Win32 API function, or fix a problem in XP.

But Usenet is a bit tricky to use. You need to be able to access a news server and then you need a news reader, which is like an email client. You need to subscribe to relevant groups and then you get overwhelmed as thousands of posts pour in. And then somehow you need a way to search the content.

So Usenet is great for day to day discussions, but how do you tap this resource as a knowledge base? Well you may have heard of a company called Google. A while back Google bought a system called Deja News which archived every Usenet post since 1981. The system is now called Google Groups. It continues to archive Usenet postings as well as Google’s own web based discussion groups. It can be accessed at groups.google.com. As you probably know, Google is quite good for searching for stuff. Google Groups is no different. It combines the power of Google’s search with the massive resource of Usenet. With Google Groups you can search for pretty much any technical matter you need help with. And 99% of the time you’ll find an answer, often from a technical guru who knows his stuff, or someone who has had the same problem already.

I find that people tend to turn to Google, or one of the other search engines, to try to find answers. But specific technical questions can be hard to locate on Google, because Google indexes web sites, and even if the issue is dealt with by a web site it may be hidden deep within it’s bowels. So a web search engine isn’t always the best way to find answers to technical problems. In contrast Google Groups indexes only messages that people, like geeks and programmers, have written, and so it gets straight to the crux of the matter. It’s also instant. Pretty much as soon as a Usenet message is posted, it shows up in Google Groups. In contrast a web site can take months before it is fully indexed. So Usenet is often more up to date on technical matters.

As an example you will probably find more discussion of Vista technical issues and Vista specific programming techniques in Usenet than anywhere on the web. Long before Vista is released, beta testers, Microsoft experts and C++ gurus have been discussing such concepts via Usenet for months. And you can find this stuff now with Google Groups.

So now you know! I’m not such an expert after all. I just know where to find the answers. In my next post, I’ll explain how to get the most out of Google Groups and give you some tips on how to search and narrow down on what you’re looking for.

August 21, 2006

August 16, 2006

Direct Access – New Tool and 25% Off

Filed under: Announcements — Marcus Tettmar @ 8:37 am

I often get people asking if there is a way to run Macro Scheduler macros just by typing a word, or having a word that you type in a document, or on a form, automatically trigger off a macro which then replaces that word. So we had something like this on the wish list. But then in July Nagarsoft announced their new tool, Direct Access, which solves this problem perfectly! So why reinvent the wheel?

Direct Access lets you set up meaningful keyboard commands to run actions such as launching applications, replacing text, composing emails and, of course, running Macro Scheduler macros. If you prefer typing to clicking, Direct Access has to be the best tool I have ever seen for quickly launching applications, accessing often used macros and performing frequently used actions. Just by typing a word that you associate with the action, that action is fired. It doesn’t matter what application you are working in, Direct Access will recognise the keyboard command. You can configure Direct Access to ask you to confirm the action by hitting F1, or just to go right ahead and fire it as soon as the word is recognized.

I was really impressed with Direct Access – it works like a charm. So I got in touch with Nagarsoft and was able to arrange a really special deal for Macro Scheduler customers. Users of Macro Scheduler can buy Direct Access for only $29.96 – 25% off the regular price of $39.95.

More info, special order links and a discount coupon can be found in the registered user’s area.

You can also download a fully functional 30-day trial.

August 15, 2006

Office Values at Microsoft

Filed under: General — Marcus Tettmar @ 10:55 am

The Office” fans will love these fun Microsoft UK training videos with Ricky Gervais and Stephen Merchant:


http://download.ifilm.com/qt/portal/2751040_200.mov

http://download.ifilm.com/qt/portal/2751041_200.mov

From: Inside Microsoft.

I understand The Office made it over to the USA too, so hopefully this isn’t completely lost on my US readers. But even if you’ve never heard of The Office I think you’ll find these videos amusing. Don’t miss the out-takes at the end, after the credits.