Author Topic: HELP: grread and picking a toolbar-button  (Read 1386 times)

0 Members and 1 Guest are viewing this topic.

lothar.s

  • Guest
HELP: grread and picking a toolbar-button
« on: May 26, 2015, 09:30:15 AM »
I want to get the macro of a toolbar-button when the button is pressed during a grread-loop.
grread will return with code 11 an id of the button
for example (11 1632)

has anybody got an idea ??

test-program:

Code - Auto/Visual Lisp: [Select]
  1. (defun c:test( / gr1 gr2 )
  2.         (princ "\nPick a toolbar-button")
  3.         (while
  4.                 (progn
  5.                         (setq gr1 (grread t 15 )
  6.                                 gr2 (cadr gr1)
  7.                                 gr1 (car  gr1)
  8.                                 pRes nil
  9.                         )
  10.                        
  11.                         (cond
  12.                                 (       (= 11 gr1)
  13.                                         (princ (strcat "\n" (itoa gr1) " : " (itoa gr2)))
  14.                                 )
  15.                                 (T)
  16.                         )
  17.                 )
  18.         )
  19.         (princ)
  20. )
[/font]