Author Topic: How to suppress standard Right Click reaction?  (Read 1010 times)

0 Members and 1 Guest are viewing this topic.

ASMI

  • Guest
How to suppress standard Right Click reaction?
« on: October 03, 2007, 09:09:06 AM »
I wish to leave from the neverending loop (while T.....) by means of VLR-MOSE-REACTOR using a following code (reductive examle):

Code: [Select]
(defun TestReactor()
  (if
    (not at-txtnum:fail)
(setq at-txtnum:fail
(vlr-Mouse-Reactor nil
  '((:vlr-beginRightClick . TextNum_Pasteclip_Failed))
  )
       )
    ); end if
  (princ)
  ); end of TestReactor

(defun TextNum_Pasteclip_Failed(reac arg)
  (vla-eval
      (vlax-get-acad-object)
      "SendKeys \"{ESC}\"")
    (princ)
  ); end of TextNum_Pasteclip_Failed

(TestReactor)

And it works. However at use in the basic program of some commands, for example:

Code: [Select]
(while t(command "_.pasteclip" pause)(princ "\nStop me!"))
after interruption of the program on the screen appears Shortcut menu. Whether there is a way to suppress standard reaction?

Expression:
Code: [Select]
(vla-eval
      (vlax-get-acad-object)
      "SendKeys \"{ESC}{ESC}\"")
too does not work.



T.Willey

  • Needs a day job
  • Posts: 5216
Re: How to suppress standard Right Click reaction?
« Reply #1 on: October 03, 2007, 10:54:21 AM »
Could you use 'grread' and test what is returned?
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

ASMI

  • Guest
Re: How to suppress standard Right Click reaction?
« Reply #2 on: October 03, 2007, 11:09:05 AM »
Quote
Could you use 'grread' and test what is returned?

Unfortunately not. I wish to interrupt a commands _pasteclip (or _move or _insert or _copy). It is necessary for me for a continuous, dynamic insert of the text. If it will not turn out, the user will press Spacebar for  insert of the next text or to press Esc for the termination of a loop. I have one more idea (grdraw)-(redraw) - for dynamic moving imitation with virtual rectangle, but it's without osnaps.

T.Willey

  • Needs a day job
  • Posts: 5216
Re: How to suppress standard Right Click reaction?
« Reply #3 on: October 03, 2007, 11:14:20 AM »
I don't know of any way to stop the standard Acad reaction to the right mouse being clicked.  Reactors don't stop the command (or what they react to) they just allow you to do something with the information that something is happening.  Maybe someone will chime in that has an idea/way.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

LE

  • Guest
Re: How to suppress standard Right Click reaction?
« Reply #4 on: October 03, 2007, 12:00:12 PM »
do not remember if I did something when I played with visual lisp reactors in the past for this.... but maybe if you could change the setting under:

options/user preferences/right-click customization/

and in there maybe if by turning off the "shortcut menus in drawing area" that will force the edit-mode default to Repeat-Last command and use the reactor to cancel that....?

Sorry, no idea if could work and no time to play right now...

ASMI

  • Guest
Re: How to suppress standard Right Click reaction?
« Reply #5 on: October 03, 2007, 01:06:07 PM »
>Luis-ito

Quote
but maybe if you could change the setting under:

options/user preferences/right-click customization/

Thank you. Now my reactor works perfectly. All ingenious is simple - system variable SHORTCUTMENU temporarily equal 0 and all works  :-D

LE

  • Guest
Re: How to suppress standard Right Click reaction?
« Reply #6 on: October 03, 2007, 01:45:31 PM »
>Luis-ito

Quote
but maybe if you could change the setting under:

options/user preferences/right-click customization/

Thank you. Now my reactor works perfectly. All ingenious is simple - system variable SHORTCUTMENU temporarily equal 0 and all works  :-D

Perfect-o !