Archive for February, 2009

h1

The Ultimate ICT Support Tool?

27/02/2009

One thing I came across after managing to find five minutes to read through some news feed recommendations a few weeks ago is something which could be the ultimate ICT support tool.

Occasionally you come across people who have trouble not with IT equipment, but in actually taking a step back from their problem and using the amazing tool that is Google to maybe give them a helping hand … just like the IT people do when no one’s looking.

Here’s what you can do…

  1. Visit www.lmgtfy.com and enter your query.
  2. Click the button to generate a short URL.
  3. Copy & paste this into your e-mail to the user.

Ever wondered how to make a zip file in Windows XP?

Try this link … http://tinyurl.com/bjuunb

I can’t imagine I’ll ever use it professionally but perhaps with friends outside of the work environment.

Advertisements
h1

QR Code & MS Tag Experiment

27/02/2009

At Thursday’s technical community event I had a little experiment involving QR Codes and Microsoft Tags.  We have information up in our office meeting rooms about how visitors may access our wireless network.  We have an alphanumeric access key and I used this as the basis for my little experiment.

Next to each of the sets of instructions I put four images – each encoded the wireless key for the wireless network.

  • Black QR Code generated at QuickMark.
  • Purple QR Code generated at SnapMaze.
  • Colour Microsoft Tag generated at Microsoft.
  • Greyscale Microsoft tag generated in Paint.Net from the colour tag mentioned above.
A range of encoded text - all the same content

A range of encoded text - all the same content

Notably the two QR codes were radically different in structure.  Something I may look into further as I thought that QR codes should follow a standard encoding algorithm.

The aim of the experiment was to see how many people in this community (who had discussed QR codes at previous meetings) would spot and use the codes – at least just to see what they were.

With three sets around the room on the backs of all but one door I was expecting a bit of interest or someone to ask what they were for … and then get a little bit of pre/post meeting discussion about what these encoded images could be realistically used for (as there’s only a small benefit in encoding the network key – reduction in typos if you’re connecting your phone to the wireless network).

Through the whole day I heard no discussion and saw only one person snap an image – the purple QR code.

So it looks like the codes are still not pervasive enough in Western society to immediately cpature many people’s attention.  I think coloured QR codes are probably going to be the best way to grab people’s attention initially, but until (/if) it really gets embedded and on every mobile phone as standard it looks like it might be difficult to generate a huge amount of interest – even amongst technical people who have shown an interest in it.

h1

Omnia and Microsoft Tag

26/02/2009

Well it’s been a little while since I posted my comparison of Microsoft Tag and QR Codes.  In this post I noted that there was a strange 90° anti-clockwise when using the Microsoft Tag reader on my Samsung Omnia i900. Well I stumbled across the reason today whilst testing some Microsoft Tag print outs I had produced for an event.

Being a Windows Mobile 6 device, the Omnia allows screen rotation and even includes an accelerometer to aid in this (thogh I’ve disabled mine and assigned screen rotation to a button).  By now you can probably see where this is going.

When the screen rotation is in effect you effectively hold the Omnia in a landscape orientation like a regular camera and in this orientation the Microsoft Tag reader become a whole lot easier to operate.

I’d still like some sort of setting (or better yet ‘intelligent automatic feature’) in Microsoft Tag Reader to allow the Omnia to orient more easily when being held in portrait position – its normal phone position.

h1

Zxing a QR Code in a pinch

21/02/2009

Have you ever found yourself in a pinch where there’s a QR code on a web page or stored on your computer and you don’t have your phone with you (or more often than not your smart phone’s battery has died on you {again})?  Well Zxing to the rescue.

The Zxing on-line decoder allows you to specify the URL for a QR code or to upload one and it will display its details for you.

Really quick…

Really simple…

I really like it.

h1

AutoHotKey – Portable Drive Menu

21/02/2009

I’m a big fan of portable applications and particularly the work driven by PortableApps.com.  The PortableApps Menu has been undergoing a revamp for some time now to work towards a number of enhancements and in the mean time I’ve taken up using a branch of this known as Geek Menu.  Unfortunately they are all quite slow as I have a huge number of portable applications on my portable hard drive.

I usually have a small number of applications I use regularly and so I actually want a fast loading light menu for automatic loading and then I load Geek Menu from that should I need access to lots of applications or ones that I use infrequently.

I’ve created a basic little application menu using AutoHotKey that is driven from a simple INI file menu system (that you manually edit) to fill this need.  When run it sits in the system tray and when you click on it it displays a set of menu items (including sub menus) and executes the item associated with it using the path for it in the INI file.

The script for this is as follows:

; Copyright flagit.wordpress.com 2009
;;;;;;;;;;;;;
;MAIN SCRIPT;
;;;;;;;;;;;;;

;;;;;;;;;;;;
;Initialise;
;;;;;;;;;;;;
#Persistent
#SingleInstance

AppName = PUMAS
AppIni = %A_ScriptDir%pumas.ini
IconFile = %A_ScriptDir%pumas.ico

;;;;;;;;;;;;
;Build Menu;
;;;;;;;;;;;;
;Set-up Base Menu Settings
menu, tray, Icon, %IconFile%
menu, tray, tip, %AppName%
menu, tray, nostandard
menu, tray, add, %AppName%, Heading
menu, tray, Default, %AppName%
menu, tray, disable, %AppName%
menu, tray, click, 1
menu, tray, add ; separator

;Build the base menu
BuildMenu("Tray", AppIni)

;Exit app entry
menu, tray, add ; separator
menu, tray, add, Exit, ExitApplication
return

;;;;;;;;;;;
;FUNCTIONS;
;;;;;;;;;;;

;Recursive function to build the menu
BuildMenu(MenuSection, INIFile)
{
    ;Build menus from INI file
    Counter=1
    Loop
    {
        IniRead, MenuEntry, %INIFile%, %MenuSection%, Item%Counter%, *
        If (MenuEntry="*")
            Break
        IniRead, MenuEntryPath, %INIFile%, %MenuSection%, %MenuEntry%, *
        If (MenuEntryPath="*")
        {
            BuildMenu(MenuEntry, INIFile)
            menu, %MenuSection%, add, %MenuEntry%, :%MenuEntry%
        }
        Else
        {
            menu, %MenuSection%, add, %MenuEntry%, ExecuteItem
        }
        Counter += 1
    }
}

;;;;;;;;;;;;;;;;;
;MENU PROCESSING;
;;;;;;;;;;;;;;;;;

;The heading is disabled and simply allows the left click to produce
;the right click context menu
Heading:
menu, tray, show
return

;Open the specified path for the menu item generated from the INI file
ExecuteItem:
;Open the item specified for this in the ini file
IniRead, MenuEntryPath, %AppIni%, %A_ThisMenu%, %A_ThisMenuItem%
SplitPath, A_ScriptDir, , , , , ScriptDrive
Run, %ScriptDrive%%MenuEntryPath%
return

;Close the application
ExitApplication:
ExitApp

There are a few variables in the initialise section that specify the name of the application, the INI file that defines the menu (which is convenient to store in the same folder as the menu script/executable and the icon file for the application.

The INI file has a “Tray” section which defines the root content of the tray item’s context menu.  Each item is specified by “Item#” in numeric order.  Each item specified will either have an entry in the same section (making it an item for execution) or a section of the same name (indicating it is a sub-menu).

An example menu might look something like:


[Tray]
Item1=Utilities
Item2=Tools
Item3=Help

Help=Helppumas.chm

[Utilities]
Item1=Defrag
Item2=Format Floppy

Defrag=File HelpersUnfrag.exe
Format Floppy=batchformatFD.bat

[Tools]
Item1=Tools Guide
Item2=Mega Kit

Tools Guide=ToolsGuide.doc
Mega Kit=Toolsmegakit.exe

This produces a menu system with two sub menus (one for utilities and one for tools) each with two items and a help item on the root menu.  This configuration file specifies all paths in relation to the root of the drive it is stored on.  You can tailor this INI file to your needs and even the menu system itself by modifying the script to what you want – just recompile it with the AutoHotKey compilation tool and you’ve got it.

h1

NoteTab Clip – Day of Week

19/02/2009

I seem to be doing rather a lot with NoteTab at the moment and again I thought I’d share something useful I scripted.

NoteTab has limited date related functionality but I needed to get the day of the week from a date.  I chose the Doomsday algorithm to base my clip on and the clips below simply generate an integer that represents the day of the week and then translate that into text.  The test clip simply takes a date from the user (defaults to today’s date) and then returns a prompt box informing the user what the day of the week is.

H=”Day of Week Test”
^!Prompt ^$DayOfWeekLong(^$DayOfWeekInt(^?{(M=”00/00/0000″)Enter date=^$GetDate(dd/mm/yyyy)$})$)$

H=”_DayOfWeekInt”
;Sunday=0/Monday=1/Tuesday=2/Wednesday=3/Thursday=4/Friday=5/Saturday=6
^!SetListDelimiter /
^!SetArray %TheDate%=^&
^!Set %Day%=^%TheDate1%
^!Set %Month%=^$Calc(((^%TheDate2%+9) MOD 12)+1)$
^!Set %YearFull%=^%TheDate3%
;If we are in January or February (month = 11 or 12), reduce the year by 1
^!If ^%Month%<10 SKIP ^!Dec %YearFull% ;Extract the year components ^!Set %YearShort%=^$StrCopyRight("^%YearFull%";2)$ ^!Set %Century%=^$StrCopyLeft("^%YearFull%";2)$ :Calculate ^!Result ^$Calc((^%Day% + FLOOR(2.6*^%Month% - 0.2) - 2*^%Century% + ^%YearShort% + FLOOR(^%YearShort%/4) + FLOOR(^%Century%/4)) MOD 7)$ H="_DayOfWeekLong" ^!SetListDelimiter / ^!SetArray %Days%=Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday ^!Set %Key%=^$Calc(^$DayOfWeekInt(^%TheDate%)$+1)$ ^!Result ^%Days^%Key%% [/sourcecode]

h1

NoteTab – Calculating Text

17/02/2009

In my latest foray into NoteTab arithmetic I came across a curious fact around performing arithmetic calculations on a variable containing text.  Whilst in purely mathematical terms an arithmetic operation on something that has a numeric value is a bit nonsensical, but NoteTab is a text editor…

H=”Inc Text”
^!Set %Val%=FooBar
^!Prompt >^%Val%^%Val%< [/sourcecode] This clip displays two prompts when run.  The first prompt as one might expect displays ">FooBar<".  The second prompt however displays ">1<"! Apparently any text is evaluated to zero when you try and perform a purely arithmetic operation on it.  Which broadly speaking makes sense if you just think about a piece of text as having no arithmetic value (or "zero"). So I came across this interesting point when I was taking a masked numeric input from a clip wizard.  Take a look at the following clip. Running this clip and accepting the default input of two you mjight expect should give you a final prompt of  "3", except you've spotted where I'm going with this and you know that it's probably going to be something to do with adding numbers to text and so turn out to be "1" instead.  Well ... you're absolutely right. The result is 1 as the input mask (even though it is using optional numeric place holders after the first compulsory numeric place holder) simply pads the input value with spaces. i.e. The calculation should be of the form: 2+1=3 But we actually get: "2  "+1=0+1=1 The answer is therefore quite simple - remove the spaces... So the astute amongst you will have noticed that we are now trimming the input to remove spaces which should now nicely produce the desired result when we use the default of 2 giving us a final result of 3. Errr.... except we still get a result of 1. It seems that there's either a bit of a bug or an evaluation order at work here that means we don't actually end up trimming off the spaces.  It seems we need an extra assignment step.  The following clip does produce the desired result of 3. So the moral of the story is ensure that your variables are purely numeric before you start performing arithmetic operations on them and make sure that if you need to trim user input for a numeric you assign it to a variable first before trying to trim.