Author Topic: How to check the hotkey?  (Read 9715 times)

0 Members and 1 Guest are viewing this topic.

mikd

  • Guest
How to check the hotkey?
« on: January 08, 2004, 09:30:08 AM »
Has anybody ideas how to check does any autocad command or loaded applications use the hotkey?
For example "CO" is used by "COPY" but how to check it without reading acad.pgp?

SMadsen

  • Guest
How to check the hotkey?
« Reply #1 on: January 08, 2004, 09:35:13 AM »
Hey mikd,
Welcome to the forums.

Nope, no ideas (although I do have an idea that it can't be done).
If you're looking for "can CO be called to invoke a command or a loaded app", you could search the acad.pgp and run through the atoms-family searching for C:CO.
Sorry for the vaque answer.

hendie

  • Guest
How to check the hotkey?
« Reply #2 on: January 08, 2004, 09:35:14 AM »
check the help under
Quote
shortcuts (aliases) for commands, table listing of

daron

  • Guest
How to check the hotkey?
« Reply #3 on: January 08, 2004, 09:37:09 AM »
CO as COPY is just an alias to the actual command. You can set it with the pgp file or you could write lisp routines that shorten the name of many functions. Autocad is programmed to know what to look for. Other than that, I don't understand your question.

mikd

  • Guest
How to check the hotkey?
« Reply #4 on: January 08, 2004, 10:11:17 AM »
Thanks all
I have idea that for some my routines user be able to change the shortcut by own and programm should notify if it already used.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
How to check the hotkey?
« Reply #5 on: January 08, 2004, 10:15:40 AM »
So you are planning on reading the pgp file?
TheSwamp.org  (serving the CAD community since 2003)

daron

  • Guest
How to check the hotkey?
« Reply #6 on: January 08, 2004, 10:18:16 AM »
The best way I've found to do what I think you're trying to say is, type the command before writing it. If you don't get "Unknown command "cmd-name". Press F1 for help." then you need to consider a different name.

BTW, where are you hailing from. Your English is difficult to read.

ELOQUINTET

  • Guest
How to check the hotkey?
« Reply #7 on: January 08, 2004, 10:44:22 AM »
or if you have express tools just use alias editor. like daron i'm not sure what you're asking...

mikd

  • Guest
How to check the hotkey?
« Reply #8 on: January 08, 2004, 10:46:40 AM »
Sorry for my English,
I am from Kazakhstan
I plan there steps:

- aks user about shortcut
- check it if it doesn't use write tmp.lsp with this shortcut
- and load this file

But if this shotcut use any other routine last one doesn't work...
As a poor solution I can create a list file of shortcut for all loaded routines read the pgp file... I don't like this it may work too slow

SMadsen

  • Guest
How to check the hotkey?
« Reply #9 on: January 08, 2004, 10:58:38 AM »
You could set up a command reactor that reports unknown commands. Only problem is how to stop commands that do exist  :D

Running through all items in the atoms-family that starts with C: is pretty fast and so is reading the .pgp file (just remember to close it after reading). I wouldn't worry about speed.

If your users are using A2K4, remember to look up the .pgp belonging to their profiles.

daron

  • Guest
How to check the hotkey?
« Reply #10 on: January 08, 2004, 11:02:52 AM »
Kazakhstan, huh. So your primary language is Russian?

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
How to check the hotkey?
« Reply #11 on: January 08, 2004, 11:07:32 AM »
For the LISP counterparts you could test the existence of a command by using this syntax...

(= nil lispcommand)

Exmaple ...

(= nil C:CO)

If there is a command C:CO then it will return nil, if it does exist then it will return T and you will know the lisp command exists.

I am not sure about PGP aliases
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

daron

  • Guest
How to check the hotkey?
« Reply #12 on: January 08, 2004, 11:12:29 AM »
This is what I got when I tried it
Quote
Command: (= nil C:C)
T
Command: (= nil C:MOVE)
T
Command: (= nil C:WHATSITALLABOUT)
T
Command: (= nil C:ESA)
nil

    pgp
    actual command
    non-command or lisp
    lisp
    [/list:u]

deegeecees

  • Guest
How to check the hotkey?
« Reply #13 on: January 08, 2004, 11:17:42 AM »
try this:

at the command prompt, type   (atoms-family 1)
this will give you a list of strings of all defined functions, is that what you are asking?

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
How to check the hotkey?
« Reply #14 on: January 08, 2004, 11:26:02 AM »
oops I was thinking faster than I was typing and forgot a few words...

the fact is....
If the return value is T then the the command name equals NIL and as such does not exist.

If the return value is NIL, then the command does exist because it is already set to a value...
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie