Brian, I think we have a disconnect somewhere. I thought you were looking for something to allow you to reload scripts dynamically.
If what you want is to display your current MoI shortcuts, the following Python script I just wrote should do it (at least for Vista/Windows 7):
from os import environ
from os.path import join
def key_sort ( l, r ):
result = cmp( len( l ), len( r ) )
if result != 0: return result
return cmp( l, r )
shortcuts = {}
ini = open( join( environ[ 'APPDATA' ], 'Moi', 'moi.ini' ), 'rb' )
lines = [ line.strip() for line in ini.readlines() ]
max_key = 0
ini.close()
for i in xrange( lines.index( '[Shortcut Keys]' ) + 1, len( lines ) ):
line = lines[i]
if line[:1] == '[':
break
col = line.find( '=' )
if col >= 0:
key = line[ :col ].strip()
max_key = max( max_key, len( key ) )
shortcuts[ key ] = line[ col + 1: ].strip()
pad = ' ' * max_key
keys = shortcuts.keys()
keys.sort( key_sort )
n = len( keys[0] )
c = ' '
for key in keys:
if (n != len( key )) or ((n > 1) and (key[:1] != c)):
n = len( key )
c = key[:1]
print
print (key + pad)[ : max_key], '=', shortcuts[ key ]
When I run this on my system, it produces the following output:
A = Rotate
C = Circle
D = BooleanDifference
F = Fillet
H = script:moi.geometryDatabase.hide();
J = Join
L = Line
M = Move
O = Offset
R = Rectangle
T = Trim
U = BooleanUnion
V = Mirror
X = Extrude
F1 = script:moi.launchHelp();
Ctrl+A = script:moi.geometryDatabase.selectAll();
Ctrl+C = CopyClipboard
Ctrl+N = New
Ctrl+O = Open
Ctrl+S = Save
Ctrl+V = Paste
Ctrl+X = Cut
Ctrl+Y = script:moi.command.redo();
Ctrl+Z = script:moi.command.undo();
Delete = Delete
Ctrl+Shift+C = CopyClipboardWithOrigin
Ctrl+Shift+V = PastePart
Let me know if this is something like what you had in mind...
- Dave Morrill
|