PDA

View Full Version : Autocad one-key shortcuts and custom menus using AutoHotKey



Rainy-Day
3rd Jun 2007, 07:46 am
Hi, I made some shortcuts and menus for AutoCad with AutoHotKey. The shortcuts require one key, i.e. you hit 'e' for erase without having to hit enter or space. You can also hit 'gq' for fillet, 'wr' for mirror, etc etc, and easily change the shortcuts, of course.

The menu appears on screen right under the cursor as a bunch of buttons that are clustered together, saving you time as you don't need to move your cursor all the way to toolbars and back. The page has a screenshot. Hope you enjoy this..

http://silmarill.org/index.html?AutoCad

Please let me know if it's useful and what can be improved, suggestions, etc.

BenfrmWynne
31st Jul 2008, 06:22 pm
I am trying to set up a AutoHotkey script to simplify some AutoCad actions that I do over and over hundreds of times a day. I need something that will record a process that I'm doing. Example: Edit>Select All> Change Color of drawing
and
Edit>Select All>Format>Text Style> change font style

I've tried using the AutoScriptWriter to capture what I'm doing, but it will only save the script such that it will work with a file of the same name as it was recorded on.

ex: WinWait, AutoCAD 2008 - [D:\My Documents\Manuals\801-817 from GGS\801-817 WDM dwg\24-59-026-105.dwg],
IfWinNotActive, AutoCAD 2008 - [D:\My Documents\Manuals\801-817 from GGS\801-817 WDM dwg\24-59-026-105.dwg], , WinActivate, AutoCAD 2008 - [D:\My Documents\Manuals\801-817 from GGS\801-817 WDM dwg\24-59-026-105.dwg],
WinWaitActive, AutoCAD 2008 - [D:\My Documents\Manuals\801-817 from GGS\801-817 WDM dwg\24-59-026-105.dwg],
MouseClick, left, 62, 40
Sleep, 100
MouseClick, left, 97, 323
Sleep, 100
MouseClick, left, 712, 97
Sleep, 100
MouseClick, left, 702, 227
Sleep, 100
Send, {ESC}
MouseClick, left, 166, 43
Sleep, 100
MouseClick, left, 181, 209
Sleep, 100
WinWait, Text Style,
IfWinNotActive, Text Style, , WinActivate, Text Style,
WinWaitActive, Text Style,
MouseClick, left, 273, 113
Sleep, 100
MouseClick, left, 275, 154
Sleep, 100
MouseClick, left, 275, 154
Sleep, 100
MouseClick, left, 326, 120
Sleep, 100
MouseClick, left, 312, 150
Sleep, 100
MouseClick, left, 354, 113
Sleep, 100
MouseClick, left, 332, 142
Sleep, 100
MouseClick, left, 395, 391
Sleep, 100
MouseClick, left, 359, 113
Sleep, 100
MouseClick, left, 324, 160
Sleep, 100
MouseClick, left, 396, 384
Sleep, 100
MouseClick, left, 478, 390
Sleep, 100
WinWait, AutoCAD 2008 - [D:\My Documents\Manuals\24-59-026-105.dwg],
IfWinNotActive, AutoCAD 2008 - [D:\My Documents\Manuals\24-59-026-105.dwg], , WinActivate, AutoCAD 2008 - [D:\My Documents\Manuals\24-59-026-105.dwg],
WinWaitActive, AutoCAD 2008 - [D:\My Documents\Manuals\24-59-026-105.dwg],
MouseClick, left, 573, 888
MouseClick, left, 573, 888
Sleep, 100
MouseClick, left, 573, 888
MouseClick, left, 573, 888
Sleep, 100
MouseClick, left, 573, 888
Sleep, 100
MouseClick, left, 691, 739
Sleep, 100
WinWait, Text Formatting,
IfWinNotActive, Text Formatting, , WinActivate, Text Formatting,
WinWaitActive, Text Formatting,
MouseClick, left, 536, 176
Sleep, 100
WinWait, AutoCAD 2008 - [D:\My Documents\Manuals\801\24-59-026-105.dwg],
IfWinNotActive, AutoCAD 2008 - [D:\My Documents\Manuals\24-59-026-105.dwg], , WinActivate, AutoCAD 2008 - [D:\My Documents\Manuals\24-59-026-105.dwg],
WinWaitActive, AutoCAD 2008 - [D:\My Documents\Manuals\24-59-026-105.dwg],
MouseClick, left, 756, 741
Sleep, 100
MouseClick, left, 864, 66
Sleep, 100
MouseClick, left, 76, 58
Sleep, 100

This works like a charm until I open up the next file in the series, 24-59-026-106.dwg. I think it's waiting until it sees that "105" in the file name before it starts working.

CAN YOU HELP??

Thanks!