Archive for October, 2008

Une toute nouvelle façon de travailler

Monday, October 27th, 2008

 

Tout utilisateur d’un ordinateur, qu’il soit néophyte ou expérimenté, va un jour connaître les bienfaits des raccourcis clavier, et les adopter tout aussi rapidement. Le bon vieux copier-coller, une fois acquis avec la touche Ctrl, permet de sauver de précieuses secondes dans la vie du programmeur comme dans celle de la secrétaire.

 

Comme gestionnaire en TI, je suis un utilisateur accompli de l’ordinateur, et plus souvent qu’autrement, je lance la commande Exécuter pour lancer mes applications, mes pages Web, mes dossiers. Je me suis d’ailleurs surpris à avoir une centaine d’icônes dans ma barre des tâches, sans jamais les utiliser, ce qui n’est pas peu dire ! Quoi qu’il en soit, le désir de vitesse et d’efficacité fait partie de ma vie, tant sur le plan professionnel que dans mon utilisation personnelle de mon poste de travail.

 

Je n’avais jamais programmé de macros dans mon ordinateur, et mon clavier ordinaire ne me permet pas d’avoir des touches automatiques. Or, il ne m’était pas venu à l’idée de me créer des commandes déjà tapées pour aller plus vite. C’est alors que j’ai découvert le clavier programmable Enterpad P120 – ou du moins, que le clavier m’a découvert. Parce que ce n’est pas en ayant cherché cet outil que je suis tombé sur celui-ci, mais plutôt dans une optique d’amélioration de mon efficacité.

 

L’Enterpad est un clavier programmable un peu plus petit en surface qu’une feuille de papier format lettre. Il est peu encombrant et très portable, ce qui me permet de l’avoir à portée lors de mes déplacements; de plus, il se branche en USB, donc aucun pilote ni installation à faire pour que le clavier fonctionne.

 

Au départ, j’ai utilisé le clavier dans sa solution standard, ce qui m’a permis de programmer des séries de touches (des macros) dans les petits boutons et d’exécuter plus rapidement des tâches que je répétais souvent : saisie de mon nom, de mon adresse courriel, de mes liens favoris; copier et coller, annuler, exécuter, etc. Pour l’ensemble de ces tâches, l’Enterpad convenait à mes attentes et m’a permis d’aller beaucoup plus rapidement, sans avoir à effectuer une série de clics – j’étais donc plus efficace. Et c’était facile à comprendre : on écrit les touches, on met à jour la mémoire de l’Enterpad et le tour est joué.

 

Comme je trouvais le système très performant, j’ai consulté le site Web de la compagnie et ils m’ont dirigé vers le gratuiciel AutoHotkey, un logiciel en source libre qui permet d’exécuter du code programmé à partir d’une macro. Comme l’Enterpad est compatible avec AutoHotkey, je me suis empressé de l’installer et de configurer mon clavier pour aller encore plus loin.

 

Contrairement à la solution standard qui ne permet que l’exécution de touches – ou qui émule ma propre frappe au clavier –, l’Enterpad avec AutoHotkey me permet de lancer des commandes avec les touches. Ainsi, je peux émuler ma souris, faire des pauses, émettre des conditions, copier des fichiers et lancer des applications, tout ça en appuyant sur l’une des 120 touches de mon clavier Enterpad. Toute la documentation étant sur Internet, j’ai vite fait de me familiariser avec les différentes commandes et le langage de programmation de AutoHotkey, qui est un atout sans égal à mon clavier Enterpad.

 

Désormais, l’Enterpad est plus qu’un simple clavier, il est devenu un outil de travail, un indispensable. Je découvre constamment de nouvelles façons de l’utiliser et je recycle certaines touches dont je ne me sers plus quand j’en ai fini. C’est si simple que je me demande comment j’ai survécu sans mon Enterpad !

 

Edmond

Finding an easier way to get it done

Monday, October 27th, 2008

 

Every single computer user – beginner or savvy – will experiment someday the benefits of using keyboard shortcuts, and adopt them fast enough. The good old copy-and-paste, used with the Ctrl combination key, allows saving precious seconds in the lives of both a programmer and a secretary.

 

As an IT manager, I am of course a regular computer user. I want everything to be as fast as possible. In fact, I realize that I’d rather use the Run command to start up my programs, web pages and files than take the time to (find and) double-click the appropriate icon. That explains the 100+ icons on my desktop and in my taskbar that became useless over time. Therefore, I need speed and efficiency in both my personal and professional use of a computer.

 

I never set up a macro in my computer ever before, and my keyboard is so standard there are no macro-automating system. I never thought of building pre-typed commands to work faster. It is only then that I found out about the Enterpad P120 Programmable Keyboard – but let’s say the keyboard found me: I did not look at the product as to buy something like such, but more as a tool to improve my efficiency.

 

The Enterpad is a programmable keyboard that is smaller in surface than a letter-size paper. Light and portable, I can use it wherever I need to, even if I am not in front of my desk computer. Moreover, it is USB-compliant, meaning there is no driver, no installation to do prior to using the keyboard.

 

At the very beginning, I used the standard version of the keyboard, which suited me well at that time. With the standard version, it is possible to program a sequence of keys for each button on the keyboard, which I used for repetitive tasks, such as typing my name and e-mail address, getting to my favourite websites, copying and pasting, launching a Run prompt, and so on. I was more efficient and everything was so easy to learn: once set up, you save your macro file and upload it into the Enterpad in seconds, and it’s done!

 

As I found the system very powerful, I went on to the company’s website (www.cedeq.com) and they led me to the AutoHotkey freeware, an open-source application that can run code from a macro. As the Enterpad is compatible with AutoHotkey, I installed it and configured my Enterpad to work with it.

 

Since the standard version of the Enterpad was limited to simulating me typing on the keyboard, the Enterpad with AutoHotlkey could get me a step further. AutoHotkey runs with a programming language that is very simple to understand (it looks like a cross-over between VBA and Java). From now on, I can reproduce mouse movement and clicks, make pauses, use conditions, copy files and run programs only by clicking on one single button on the Enterpad. With all the documentation on the Internet, I could easily make my way through the language and commands from AHK, an impressive addition to my Enterpad.

 

My Enterpad is far more than a simple keyboard. It has become a precious tool that I would never be able to replace. Working with it keeps me going faster, and that makes me think of new ways of using it. It is so simple I wonder how I managed to work without the Enterpad!

 

Edmond

AutoHotKey Scripting Basics: The Run Command

Friday, October 10th, 2008

I have already used the Run command in two of my previous posts: Launching Google and Launching Calculator using AutoHotKeys.

The Run command is used to launch a program, document, URL, and even shortcuts.

Most of you must already be familiar with the Windows version of the Run Command. If you are not, try this:

Click on Start –> Run

A Run command window will now open; just type in the name of the program or complete URL of the Web site you want to open. For documents, however, you need to specify the complete path.
For e.g. C:\My Documents\Meghna.doc

Note: The Windows Operating System treats Notepad as a Program and Microsoft Word as a document. Thus, typing Microsft Word in the Run command box will give you an error and instead you need to specify the complete path for it.

AutoHotKeys allows you to have lot more fun with the Run command. You can launch multiple programs or Web sites at once, choose how they open, specify working directories, pass parameters etc. 

Let me just start off with showing you one of its simplest uses: Launching multiple programs at once.

#m::
Run Notepad
Run www.yahoo.com
Run Calculator
Run www.google.com
return

The above script will open the notepad, calculator and the home pages of both yahoo and google as soon as you press the Windows+m keys on your keyboard. Since AutoHotKeys executes scripts top-down, the programs will open in that order, so you can of course write them in order of your own preference.

The above script is an example of a multi-command line script and that is why we have put the commands beneath the hotkey definition. This improves readability and makes it easier to modify the scripts later, especially for larger scripts.

The Return command will exit the script (you will understand its real importance later). In single-line scripts, using the return command was unnecessary as exit was implied.

Let’s see another variation of the above script:

#m::
Run Notepad, , max
Run www.yahoo.com
Run Calculator
Run www.google.com, , min
return

Now when you use this script, the Notepad will open maximized on your screen, while the google browser window will be minimized.

Meghna