TheSwamp
CAD Forums => CAD General => Topic started by: Andrea 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 ??
-
Not that I am aware, but I have a windows based program that turns capslock on whenever AutoCAD is the topmost window
-
I have a acad vba routine that turns it on for text commands and off after the command.
-
Or you could do something like this... (See last few lines for example use.)
(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.
-
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.
-
I give you everything.
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
-
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?
-
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.
-
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.
-
I give you everything
Bank, account number security code?
-
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 (http://www.theswamp.org/cgi-bin/cvsweb.cgi/) you can post it in this thread (http://www.theswamp.org/phpBB2/viewforum.php?f=11), you can upload it to the lilly pond (http://www.theswamp.org/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 (http://www.theswamp.org/phpBB2/viewforum.php?f=6)
-
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.
-
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.)
-
...hey, why didnt anybody comment on my code?!
-
Let's not forget the *new* subversion!!
-
Seven....
You got nice code kidd0!
There....feel better? LOLOL
-
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.)
-
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."
-
Let's not forget the *new* subversion!!
Is subversion ever going to get on the pulldown? How does one find it otherwise?
-
Is subversion ever going to get on the pulldown?
Depends!!
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.
-
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
-
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.
-
InterestedParties.Add ("MP") ;
-
3 interested parties noted.
Maybe this afternoon, we'll see!
-
Me too, Me too!
-
InterestedParties.Add ("whdjr") ;
sorry MP,
the technique was so kool.
-
I'll make it easier for future people
Dim intP As Peeps
Dim strMe As Member
Set intP = TheSwamp.InterestedParties
strMe = TheSwamp.CurrentPost.MemberName
intP.Add(strMe)
-
Now how do I run that, Bob? :lol:
-
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.
-
:D cool. For some reason, your explanation made your entire piece of code click for me.
-
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
-
^
...Stig, you do realize that you have competition for passing out headaches right?
-
Part I
[ http://www.theswamp.org/phpBB2/viewtopic.php?t=6290 ]
-
Oh crap!
I've been geek served.