Author Topic: CapsLOCK on ?  (Read 4895 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
CapsLOCK on ?
« on: August 10, 2005, 04:47:13 PM »
Is there any function to use for setting the capslock ?

something like......(dos_capslock t)

from DosLib ??
Keep smile...

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
CapsLOCK on ?
« Reply #1 on: August 10, 2005, 04:54:47 PM »
Not that I am aware, but I have a windows based program that turns capslock on whenever AutoCAD is the topmost window
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

Bob Wahr

  • Guest
CapsLOCK on ?
« Reply #2 on: August 10, 2005, 05:02:14 PM »
I have a acad vba routine that turns it on for text commands and off after the command.

JohnK

  • Administrator
  • Seagull
  • Posts: 10664
CapsLOCK on ?
« Reply #3 on: August 10, 2005, 05:09:40 PM »
Or you could do something like this... (See last few lines for example use.)

Code: [Select]
(defun String->IntList (str / alst cntr)
  ;; Convert a string to a ascii number list of intigers
  ;;
  ;; $ (String->IntList "test")
  ;; $ (116 101 115 116)
  ;;
  ;; Author: John K (Se7en)
  (if (= cntr '()) (setq cntr 1))
  (while (<= cntr (strlen str))
         (setq alst (cons (ascii (substr str cntr 1)) alst)
               cntr (1+ cntr)))
  (reverse alst) )


(defun IntList->String (StrList / strlst)
  ;; Take a list of intigers and return the string.
  ;;
  ;; $ (IntList->String '(116 101 115 116))
  ;; $ "test"
  ;;
  ;; Author: John K (Se7en)
  (cond
    ((eq (type StrList) 'LIST)
     (setq strlst "")
     (mapcar
       '(lambda (x) (setq strlst (strcat strlst (chr x))))  
       strlist)))
  strlst )
;; Capatilize the fist letter of a word.
(setq myintlist (String->IntList "test"))
(IntList->String (append (list (boole 6 (car myintlist) 32)) (cdr myintlist)))
;; ...okay, so this inst really a usefull example, but its fun.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Berend

  • Guest
CapsLOCK on ?
« Reply #4 on: August 10, 2005, 05:36:52 PM »
Quote from: Bob Wahr
I have a acad vba routine that turns it on for text commands and off after the command.


bob could you post the code I like to have a look at it. I'm really intrested in it.

Bob Wahr

  • Guest
CapsLOCK on ?
« Reply #5 on: August 10, 2005, 05:45:15 PM »
I give you everything.
Code: [Select]
Option Explicit
Private Const VK_CAPITAL = &H14

Private Type KeyboardBytes
     kbByte(0 To 255) As Byte
End Type

Private kbArray As KeyboardBytes

Private Declare Function GetKeyState Lib "user32" _
   (ByVal nVirtKey As Long) As Long

Private Declare Function GetKeyboardState Lib "user32" _
   (kbArray As KeyboardBytes) As Long

Private Declare Function SetKeyboardState Lib "user32" _
   (kbArray As KeyboardBytes) As Long
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)
  If CommandName = "TEXT" Or CommandName = "DTEXT" Or _
  CommandName = "DDEDIT" Or CommandName = "MTEDIT" Or _
  CommandName = "ATTEDIT" Or CommandName = "EATTEDIT" Or _
  CommandName = "DIMLINEAR" Or CommandName = "QLEADER" Or _
  CommandName = "MTEXT" Then
  'add any other command names you want caps on for
  'be sure to add them to the endcommand section below as well
    GetKeyboardState kbArray
    kbArray.kbByte(VK_CAPITAL) = 1
    SetKeyboardState kbArray
  End If
End Sub

Private Sub AcadDocument_EndCommand(ByVal CommandName As String)
  If CommandName = "TEXT" Or CommandName = "DTEXT" Or _
  CommandName = "DDEDIT" Or CommandName = "MTEDIT" Or _
  CommandName = "ATTEDIT" Or CommandName = "EATTEDIT" Or _
  CommandName = "DIMLINEAR" Or CommandName = "QLEADER" Or _
  CommandName = "MTEXT" Then
    GetKeyboardState kbArray
    kbArray.kbByte(VK_CAPITAL) = 0
    SetKeyboardState kbArray
  End If
End Sub

Berend

  • Guest
CapsLOCK on ?
« Reply #6 on: August 10, 2005, 06:02:26 PM »
Kewl!!!!!!! 8)

I know I just active for a few days but this is stuff for a code archive
with a little bit of commenting....
I don't want to recreate another forum here but what do you think Bob?
should we request a code archive to store  stuff like this?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
CapsLOCK on ?
« Reply #7 on: August 10, 2005, 06:08:52 PM »
http://www.theswamp.org/phpBB2/viewforum.php?f=11

Just make the ThreadTitle descriptive and add some body text to make the search engines job a little easier.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Berend

  • Guest
CapsLOCK on ?
« Reply #8 on: August 10, 2005, 06:29:43 PM »
Quote from: Kerry Brown
http://www.theswamp.org/phpBB2/viewforum.php?f=11

Just make the ThreadTitle descriptive and add some body text to make the search engines job a little easier.



not the same in some respects. it was better organized and far more important, code wouldn't sink.
I´ve learned a lot by looking at the Filefind code at CV Codearchive it introduceud API and collections to me. I´m sure I would not have found it if it was on page 8 of the link you provided.

What do you think about a code archive link like CV had Kerry?
I won´t request it if there´s no support to build it.

Berend

  • Guest
CapsLOCK on ?
« Reply #9 on: August 10, 2005, 06:33:12 PM »
Quote from: Bob Wahr
I give you everything


Bank, account number security code?

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
CapsLOCK on ?
« Reply #10 on: August 10, 2005, 07:22:54 PM »
Quote from: Berend
not the same in some respects. it was better organized and far more important, code wouldn't sink.
I´ve learned a lot by looking at the Filefind code at CV Codearchive it introduceud API and collections to me. I´m sure I would not have found it if it was on page 8 of the link you provided.

What do you think about a code archive link like CV had Kerry?
I won´t request it if there´s no support to build it.


While I cannot speak for Mark (site owner) or the other the moderators, I would suspect that a couple of things would likely not ever happen.

a) theswamp.org will not take the same path as other forums
b) theswamp.org does not seek to be "like" any other forum, currently operating or not.

You have an array of tools to use that you can use to do exactly what you want. As far as I know you can archive code in the CVS repository you can post it in this thread, you can upload it to the lilly pond, you can just leave it in the thread where it is ....

At any rate, this is what we have to work with .. like it or not ... you can suggest that a code archive be added in the Suggestion Box Forum
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

Bob Wahr

  • Guest
CapsLOCK on ?
« Reply #11 on: August 10, 2005, 07:30:05 PM »
The east bank.
I was sitting quietly at home that evening.
I was always 88 before I gave softball up.
Blanket usually, occassionally thumb.
Not very well.

JohnK

  • Administrator
  • Seagull
  • Posts: 10664
CapsLOCK on ?
« Reply #12 on: August 10, 2005, 08:27:48 PM »
Keith, you hit the nail right on the head! The CVS is/was intended EXACTLY for that purpose. (Being a "one stop shop" for code and document snips.)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

JohnK

  • Administrator
  • Seagull
  • Posts: 10664
CapsLOCK on ?
« Reply #13 on: August 10, 2005, 08:29:25 PM »
...hey, why didnt anybody comment on my code?!
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
CapsLOCK on ?
« Reply #14 on: August 10, 2005, 08:35:14 PM »
Let's not forget the *new* subversion!!
TheSwamp.org  (serving the CAD community since 2003)

t-bear

  • Guest
CapsLOCK on ?
« Reply #15 on: August 10, 2005, 08:58:41 PM »
Seven....
You got nice code kidd0!





There....feel better? LOLOL

JohnK

  • Administrator
  • Seagull
  • Posts: 10664
CapsLOCK on ?
« Reply #16 on: August 10, 2005, 09:04:56 PM »
Y3s. I f33l b3tt3r.

get it, i flipped the letters for numbers ...like i fliped the bit on the letter?!? --Bawahahah! ...Oh, I kill me. (Okay, i need to get some sleep; im going nuts.)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Bob Wahr

  • Guest
CapsLOCK on ?
« Reply #17 on: August 11, 2005, 11:22:41 AM »
Sorry se7en, there's something wrong with my eyes.  For some reason I can't see anything between ( and )  WTH?  I thought I typed the word "and."

daron

  • Guest
CapsLOCK on ?
« Reply #18 on: August 11, 2005, 11:31:32 AM »
Quote from: Mark Thomas
Let's not forget the *new* subversion!!
Is subversion ever going to get on the pulldown? How does one find it otherwise?

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
CapsLOCK on ?
« Reply #19 on: August 11, 2005, 01:44:01 PM »
Quote from: daron
Is subversion ever going to get on the pulldown?

Depends!!

Quote
How does one find it otherwise?

Good question! I believe most of the active members have already seen the thread.

I was going to write up a nice tutorial on how to use Tortise-Subversion for the Windows users but no one really showed any interest in it so I didn't bother. I believe it would be a great addition to theswamp, IMO it's beats the heck out of the lilly pond. I use it every day for my personal stuff!! It is truly a life saver if you're behind a proxy server that's rather strict like myself.
TheSwamp.org  (serving the CAD community since 2003)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
CapsLOCK on ?
« Reply #20 on: August 11, 2005, 06:31:56 PM »
Quote
I was going to write up a nice tutorial on how to use Tortise-Subversion for the Windows users but no one really showed any interest in it so I didn't bother.


Can we make you an offer that you can't refuse ?

kwb
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

daron

  • Guest
CapsLOCK on ?
« Reply #21 on: August 12, 2005, 08:02:04 AM »
Quote from: Kerry Brown
Quote
I was going to write up a nice tutorial on how to use Tortise-Subversion for the Windows users but no one really showed any interest in it so I didn't bother.


Can we make you an offer that you can't refuse ?

kwb

Make that two people interested. Sorry I didn't sound interested enough earlier. Guess I'm just too patient. I've seen it but had not clue how to load anything in it.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
CapsLOCK on ?
« Reply #22 on: August 12, 2005, 08:44:03 AM »
InterestedParties.Add ("MP") ;
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
CapsLOCK on ?
« Reply #23 on: August 12, 2005, 08:51:50 AM »
3 interested parties noted.

Maybe this afternoon, we'll see!
TheSwamp.org  (serving the CAD community since 2003)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
CapsLOCK on ?
« Reply #24 on: August 12, 2005, 10:02:41 AM »
Me too, Me too!
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

whdjr

  • Guest
CapsLOCK on ?
« Reply #25 on: August 12, 2005, 11:40:38 AM »
InterestedParties.Add ("whdjr") ;


sorry MP,

the technique was so kool.

Bob Wahr

  • Guest
CapsLOCK on ?
« Reply #26 on: August 12, 2005, 11:48:35 AM »
I'll make it easier for future people

Code: [Select]
Dim intP As Peeps
Dim strMe As Member
Set intP = TheSwamp.InterestedParties
strMe = TheSwamp.CurrentPost.MemberName
intP.Add(strMe)

daron

  • Guest
CapsLOCK on ?
« Reply #27 on: August 12, 2005, 11:51:35 AM »
Now how do I run that, Bob? :lol:

Bob Wahr

  • Guest
CapsLOCK on ?
« Reply #28 on: August 12, 2005, 11:57:48 AM »
I used my forum majic so it's active in this thread. All that is needed now is the intP.Add(strMe) bit.  If there is a widespread need for it on the board I could make it a funtion.  Maybe an Interested class.

daron

  • Guest
CapsLOCK on ?
« Reply #29 on: August 12, 2005, 12:22:47 PM »
:D cool. For some reason, your explanation made your entire piece of code click for me.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
CapsLOCK on ?
« Reply #30 on: August 12, 2005, 01:22:18 PM »
Quote from: Bob Wahr
Code: [Select]
Dim intP As Peeps
Dim strMe As Member
Set intP = TheSwamp.InterestedParties
strMe = TheSwamp.CurrentPost.MemberName
intP.Add(strMe)

Eek, too many errors.

If strMe is an object variable it needs to be set (data type Member is not an intrinsic type thus must be a UDC*; if it were a UDT the call would reference an element via dot delineation), so ...

Set strMe = TheSwamp.CurrentPost.MemberName

(even though it appears by inference to be a string type variable).

Also, you cannot invoke code like this:

intP.Add (strMe)

Either

intP.Add strMe

or

Call intP.Add (strMe)

However, since we want the addition of names to be persistant perhaps this would suffice --

With TheSwamp
    Call .Tutorials.Item("Tortoise/Subversion").InterestedParties.Add (.CurrentPost.MemberName)
End With


Forgive me, I'm such a geek I couldn't stop myself (ya I know, I'm a bstrd).

:oops: :oops: :oops:

* UDC = User Defined Class; UDT = User Defined Type
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

JohnK

  • Administrator
  • Seagull
  • Posts: 10664
CapsLOCK on ?
« Reply #31 on: August 12, 2005, 02:20:09 PM »
^
...Stig, you do realize that you have competition for passing out headaches right?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
CapsLOCK on ?
« Reply #32 on: August 12, 2005, 03:09:38 PM »
TheSwamp.org  (serving the CAD community since 2003)

Bob Wahr

  • Guest
CapsLOCK on ?
« Reply #33 on: August 12, 2005, 03:44:59 PM »
Oh crap!

I've been geek served.