Mar. 16th, 2011

alexpgp: (Default)
It turns out Microsoft Word ignores a depressed shift key if you hit the spacebar. It also turns out I often am late in releasing the shift key before depressing the spacebar.

I learned this while using the standalone Windows version of Wordfast, which launches a long and distracting "job analysis" task upon receiving a Shift + Space key combination.

I've been using an application Autohotkey for a while now, pretty much in "beginner mode." But even at my rather modest level, I've got it to where I can pop up a variety of programs by pressing the Windows key together with some other key (e.g., "Windows + 6" runs my home-rolled glossary search program).

Autohotkey excels in the area of replacing text, so I can roll my own keyboard shorthand, e.g.
::tekreks::technical requirements
which expands 'tekreks' into 'technical requirements' as soon as I type a space, tab, comma, period, or any other "end of word" symbol.

Alternatively, I can set such replacement macros to execute as soon as I type the last character, e.g.
:*?:\euro\::{ASC 0128}
which replaces \euro\ with € instantly (which is really great, because you can type r\ea\sum\ea\ and get résumé without any fuss at all).

So on a hunch, I tried the following definition in my Autohotkey code file:
shift & space::
Send {space}
return
And what do you know? It works like a charm.

It sure will make Wordfast easier to use!

Cheers...
alexpgp: (Default)
Some work came in this morning, but not enough to keep me busy for very long. Galina and I contemplated going to Durango but decided against it; with no specific purpose in mind, and with gas getting more expensive, the trek begins to resemble an unnecessary expense.

We went downtown instead and made the usual rounds, looking for a caster that's gone missing on something that needs to be rolling around, with no luck. I picked up a copy of Marguerite Duras' Le square from the bookshelf at the Humane Society's shop.

* * *
I first mentioned using the runas program back in September 2009, where I described how to display two PowerPoint files in separate windows. The technique is applicable to pretty much any applications, but the only fly in the ointment is that it requires you to create a separate, password-protected user account on your machine, so that when the runas command line is invoked, you have to pause and enter the appropriate password.

In dealing with this morning's problem having to do with pressing the spacebar while the shift key was still depressed, I took a fresh look at the Autohotkey macro I had created to create a second PowerPoint window and then dug into the Autohotkey documentation. With a little tweaking, the macro now pauses until the Windows CMD window opens with a prompt for the password, and then enters the password and hits the Enter key.

So, for example, if your phantom user is 'gertrude' and her password is 'stein', the macro—assigned to the "Windows+p" key combination—might look like this:
#p::
Run runas /user:gertrude "c:\[...path-to...]\powerpnt.exe"
WinWaitActive, C:\Windows\system32\runas.exe, , 2
Send stein{Enter}
return
I inadvertently stumbled into quite a cache of useful code at the utility's web site, but there are only so many hours in the day.

And some of them have to be devoted to marketing. ;^)

Cheers...

Profile

alexpgp: (Default)
alexpgp

January 2018

S M T W T F S
  1 2 3456
7 8910111213
14 15 16 17181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 23rd, 2025 12:26 pm
Powered by Dreamwidth Studios