Home
Download
Screenshots

Wiki
Plugins
Translations
Developers
Donate

Forums/Help
Contact Us

StrokeIt

Perl script to list gestures

Posted by Michael Kairys 
Michael Kairys
Perl script to list gestures
September 19, 2003 01:48PM
This is not a plugin, so call me off-topic ;-)

This is a Perl script which will list all your defined actions and their gestures. I found it useful to have such a thing while I'm getting to know StrokeIt, to try to keep some consistency among applications of what gestures I use for what.

It will go to your Actions folder and read all the .cfg files there, producing output like this:

Internet Explorer
Back Left
Forward Right

Media Player
Full Screen F
Zoom 50% Up
Zoom 200% Down
Play/Pause P
Zoom 100% Right
Stop S

... etc.

If you don't have Perl installed (I suppose there are a few of you out there ;-) and would like a standalone executable version of this script, send an email to kairys@comcast.net and I'll mail you one.
Michael Kairys
Re: Perl script to list gestures
September 19, 2003 01:49PM
Whoops, here's the script:

# Change to the Strokeit Actions directory.
$actiondir = sprintf "%s\\Strokeit\\Actions", $ENV{PROGRAMFILES};
chdir $actiondir or die "Can't find Strokeit Actions folder\n";

print "\n";

# For each .cfg file ...
foreach ( <*.cfg> )
{
# Print the application name
print "$1\n" if /([\w\s]+)\.cfg/i;

open IN, $_;
while ( <IN> )
{
# Find an action
$action = $1 if /(^.*)\s+\[/;

# Print each associated gesture
printf " %-24s%s\n", $action, $1 if /gesture\s+=\s+(.*$)/;
}

print "\n";
close IN;
}
Michael Kairys
Re: Perl script to list gestures
September 19, 2003 01:59PM
Heck, looks like all my nice indentation got discarded in the final post. Well, both the script and its output look better in real life!
CaneToad
Re: Perl script to list gestures
July 27, 2007 09:53AM
What I really need is a dump of the STROKES.BIN file to see what the movements are for the gestures. A Perl script would do a good job I suspect, but I don't know the format of the file. Is it listed somewhere?
Re: Perl script to list gestures
April 01, 2011 07:23AM
would have been better if you had written a python script. Python in on Lynx computers and I think MAC perl I dont think is on any unless you install it but I dont want too just for one script.
Re: Perl script to list gestures
April 08, 2011 02:11PM
This is pretty cool! I will remember this when I need it.
Author:

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 14 plus 6?
Message: