Sign in to follow this  
Followers 0
JohnP

Is AutoIT Dyslexic when using AutoCAD?

4 posts in this topic

I am having weird issues using AutoIT with AutoCAD.

In addition to pull-down menus, pop-up dialogue boxes and toolbars, AutoCAD has a command line interface from its pre-Windows days and accepts typed commands. I wrote an Autoit script using the "Send" command to send the text that I would ordinarily type.

For example:

Send("zoom{ENTER}extents{ENTER}zoom{ENTER}.8x{ENTER}")

to execute the "Zoom" command twice.

Most of the time this script works, but occasionally the text is garbled ("zoom" turns into "zomo" on AutoCAD's command line).

Strangely, this occurs sporadically and not always with the same piece of text. It may be because the AutoCAD command line window does not follow Windows protocol.

For pop-up windows in AutoCAD the Control...( ) commands work fine, but I do not know how I would use these commands for the command line, which does not have a title or associated text. Any thoughts?

I am using AutoCAD 2008 Service Pack 1 and AutoIT V3.2.12.1.

Also, is there a way to call the function keys from AutoIT? The F2 key in AutoCAD pops up a Windows style window that is a larger version of the command line window that does have a title and text. I may be able to access this using ControlCommand( ) and thus find a workaround to the "dyslexia" bug, but I do not know how to send a function key call using AutoIT.

Thanks.

Share this post


Link to post
Share on other sites



AutoCAD is set up to be customizable in many ways, including simple scripting, VBA, C++. Unfortunately as a CAD manager in an architecture firm I do not have the resources to dig deep into the API of AutoCAD to program it, and was hoping to use AutoIT as a quick way to automate repetitive tasks.

The dyslexia I described was just so weird - I thought the developers would want to know about it & thought someone else may have encountered it & found a solution.

Share this post


Link to post
Share on other sites

You may have better luck using ControlSend() if the area you are sending keys to is a standard control. You can check using the AutoIt window info tool.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0