Author Topic: F1 HELP !!  (Read 3089 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
F1 HELP !!
« on: October 28, 2004, 09:10:20 AM »
Hi all...

another one...

HOW do I remove or change the F1 button..???
(help file)

this step is very very long.....
before opening the help file.


thanks.
Keep smile...

CADaver

  • Guest
F1 HELP !!
« Reply #1 on: October 28, 2004, 09:20:08 AM »
pliers

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
F1 HELP !!
« Reply #2 on: October 28, 2004, 09:30:02 AM »
Well, you could use a screwdriver and pop that bad boy off the keyboard .. but I think you were referring to a way to programmatically do it ....

There is a registry item you can change that can disable or remap any key(s) you want, but it requires a reboot.

I don't think there is a way to reassign it in AutoCAD... although you might be able to interrupt a keypress by using a VBA API call....
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

ELOQUINTET

  • Guest
F1 HELP !!
« Reply #3 on: October 28, 2004, 09:46:57 AM »
if i recall correctly can't you just go into your .mns file and under accelerators put in

("F1")^C^C

on the same subject i also changed my F4 key to reset my osnaps

("F4")'osmode;127

is this what you're looking for?

Andrea

  • Water Moccasin
  • Posts: 2372
F1 HELP !!
« Reply #4 on: October 28, 2004, 10:39:48 AM »
exact...but i've made a test...

("F1")^C^C

is not working...

the good syntax is..

["F1"]^C^C


thanks.
Keep smile...

whdjr

  • Guest
F1 HELP !!
« Reply #5 on: October 28, 2004, 10:42:32 AM »
I personally like
Quote from: Keith
use a screwdriver and pop that bad boy off the keyboard

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
F1 HELP !!
« Reply #6 on: October 28, 2004, 11:14:59 AM »
Well, I'll be .. I was going to suggest that you try the accellerators, but I couldn't remember if it worked for the F1 key .. there was some issues some time ago on older versions ....

Anyway, I have developed a simple little VBA program that turns off the F1 key (or any key for that matter) in the AutoCAD window. All you need to do is supply the ASCII code of the key to turn off...

Code: [Select]

Option Explicit

Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetCurrentVbaProject Lib "vba332.dll" Alias "EbGetExecutingProj" (hProject As Long) As Long
Private Declare Function GetFuncID Lib "vba332.dll" Alias "TipGetFunctionId" (ByVal hProject As Long, ByVal strFunctionName As String, ByRef strFunctionId As String) As Long
Private Declare Function GetAddr Lib "vba332.dll" Alias "TipGetLpfnOfFunctionId" (ByVal hProject As Long, ByVal strFunctionId As String, ByRef lpfn As Long) As Long
Private Declare Function GlobalAddAtom Lib "kernel32" Alias "GlobalAddAtomA" (ByVal lpString As String) As Long
Private Declare Function GlobalDeleteAtom Lib "kernel32" (ByVal nAtom As Long) As Long
Private Declare Function RegisterHotKey Lib "User32" (ByVal hWND As Long, ByVal id As Long, ByVal fsModifiers As Long, ByVal vk As Long) As Long
Private Declare Function UnregisterHotKey Lib "User32" (ByVal hWND As Long, ByVal id As Long) As Long
Private Sub CreateHotKey(ByVal intKeyCode As Integer, ByVal hWND As Long)
    Dim mlngAtom As Long
    mlngAtom = GlobalAddAtom(CStr(Now))
    RegisterHotKey hWND, mlngAtom, 0, intKeyCode
End Sub
Private Sub DestroyHotKey(ByVal hWND As Long)
    UnregisterHotKey hWND, GlobalDeleteAtom(mlngAtom)
End Sub
Public Sub TurnOff()
    'replace vbKeyF1 with the ascii code of the key to turn off or the vbKey equivalent
    CreateHotKey vbKeyF1, FindAutoCAD
    MsgBox "F1 is now disabled"
End Sub
Private Function MyAddressOf(sFuncName As String) As Long
 Dim lResult As Long
 Dim lHproject As Long
 Dim sFuncID As String
 Dim lFuncPtr As Long
 Dim sFuncNameUnicode As String
 sFuncNameUnicode = StrConv(sFuncName, vbUnicode)
 Call GetCurrentVbaProject(lHproject)
 If lHproject <> 0 Then
   lResult = GetFuncID(lHproject, sFuncNameUnicode, sFuncID)
   If lResult = NO_ERROR Then
     lResult = GetAddr(lHproject, sFuncID, lFuncPtr)
     If lResult = NO_ERROR Then
       MyAddressOf = lFuncPtr
     End If
   End If
 End If
End Function
Private Function FindAutoCAD() As Long
  FindAutoCAD = FindWindow(vbNullString, Application.Caption)
End Function
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

ELOQUINTET

  • Guest
F1 HELP !!
« Reply #7 on: October 28, 2004, 11:42:13 AM »
yeah whoops i was looking at a screenshot i have in a customizing file it [ ] not ( )   :oops:

MikePerry

  • Guest
F1 HELP !!
« Reply #8 on: October 28, 2004, 01:29:03 PM »
Hi

Below comes from an old AUGI Guild post by Ed Jobe -

<snip>
I came to the same conclusion, except that I though it would be good to provide some feedback. I came up with this function in the acad.lsp file.

Code: [Select]
;;;used to remap the F1 key
(defun NoHelp ()
   (setvar "nomutt" 1)
   (princ "You hit the F1 key.")
   (setvar "nomutt" 0)
   (princ)
)


Then, the F1 macro becomes:
["F1"]^C^C(NoHelp)
 
Here is what you get:
Command: *Cancel*
Command: *Cancel*
Command: (NoHelp) You hit the F1 key.
</snip>

Have a good one, Mike

Serge J. Gianolla

  • Guest
F1 HELP !!
« Reply #9 on: October 28, 2004, 07:22:51 PM »
The answer was already given, but there are other tips on the site that may interest other users.
http://www.archidigm.com/Coverpage/cover1-03/lounge-set_autocad_f1_key.htm

Andrea

  • Water Moccasin
  • Posts: 2372
F1 HELP !!
« Reply #10 on: October 31, 2004, 11:46:00 PM »
Quote from: MikePerry
Hi


Code: [Select]
;;;used to remap the F1 key
(defun NoHelp ()
   (setvar "nomutt" 1)
   (princ "You hit the F1 key.")
   (setvar "nomutt" 0)
   (princ)
)




why using the "nomutt" variable ??
Keep smile...

hyposmurf

  • Guest
F1 HELP !!
« Reply #11 on: November 01, 2004, 08:13:48 AM »
I remember a while back my F1 key became associated with a shortcut for my windows explorer.Drove me nuts,everytime I was searching for help.Had to change the properties of the shorcut back to its original pathname.What are you going to re-associate the help key to Andrea?You dont need it anymore? :)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
F1 HELP !!
« Reply #12 on: November 01, 2004, 08:38:27 AM »
Thanks Serge
Very informative link.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

MikePerry

  • Guest
F1 HELP !!
« Reply #13 on: November 01, 2004, 09:02:41 AM »
Quote from: Andrea
why using the "nomutt" variable ??

Hi

Honest answer, pass.... would have to ask Ed why he included, I personally can't see a reason for it in this situation (from the little experiment I just carried out here).

Have a good one, Mike

Bryco

  • Water Moccasin
  • Posts: 1883
Re: F1 HELP !!
« Reply #14 on: May 01, 2006, 11:15:13 PM »
This is the way to do it in 2006
1)Open Cui
2)In the “Command List” box select “New”
3)In the Properties window that pops up on the lower right:
  In the name line  type  NoHelp
  Either leave the macro line as ^C^C
  Or add a c  to ^C^C^C
  In the ElementID line change it to MMU_Nohelp
4)Now Drag and drop that new command to the upper left box  “Customizations in ALL CUI FILES-> Keyboard shortcuts-> Shortcut keys.
5)The Command (NoHelp) will now appear in the top right box that will be called “Shortcuts”. Doubleclick on it to open the information box below.
6)In the line Key(s)    type in F1 or if you click on the word Key(s) a little box to the right with 3 dots will show up. Click on this and you can click on the F1 key and assign it. Beware, if you have caps on  you will get shift +F1, so turn caps off.
7)Apply, ok and you are good to go.

On another note, comparing this to the incredibly easy mns method who wants shares in "CUI".    NOT ME.