I use VS2008, and I lose focus by pressing (alt + tab). For exercise reasons I still try to create a "boss" key. Which sets the focus. I came across some code, but I can't figure out where things go wrong... In this case it shows/hides the form.
Imports System.Threading
Private Declare Auto...
A neat way would be using another thread that checks the "f" being pressed. Some sort of "boss" button, no mather what program is in focus, by pressing the "f" my program that is always on top comes to focus.. I couldn't find a way because I didn't had the time jet, any suggestions are welcome...
Woaw, that looks great! Many thanks! I changed the TopMost property to True so it stays on top of other applications. It works like a charm. However as soon as I select another program or select a text the program loses it's focus.
I'm trying to figure a neat way to get the focus back, because...
[concept]
i'm trying to create a form that follows - at a fixed position (x = 100px, y = 100px) - the cursor until a key (e.g. windows key + c) gets pressed. as soon as the key (combination) is pressed the program stops 'following' the cursor, the program becomes the 'active window' (in focus)...
I can't figure it out... :-( I still get to the point where I can't uppercase a character after a "_" (underscore)
strIn = "`a~a!a@a#a$a%a^a&a*a(a)a-a=a+a}a{a]a[a:a|a;a'a\a<a>a?a,a.a/a_a"
...
strOut = "`A~A!A@A#A$A%A^A&A*A(A)A-A=A+A}A{A]A[A:A|A;A'A\A<A>A?A,A.A/A_a"
...
.Pattern = "\b([a-z])"
Why?
Thanks! I read the articles and it's quite clear now! It also became quite clear my goal will be a bit of a struggle (as beginner) ;-)
So please take a look at my reasoning on resolving the problem:
1. I have a string i.e.: "the..___test i_the_ ##the"
2. I know how find all special characters...
I found a neat little script here @ tek-tips, but I don't fully understand the script. I know what it doest but don't know why. [ponder]
data = " 21"",""BOB D."",""StePH_hens"",""SA052"",""CALL REAL ESTATE"",""CALL01"",""(804)411-2222"" "
...
.Pattern = "\b(\w)(\w*?)\b"
...
Function...
Well, now it's time to get some sleep.. I didn't figure out if I need the last regex, I just want to prevent any "special" character at the beginning or end of the filename (i.e. test.file..txt). Any suggestions are still welcome (to make the code shorter or something like that..)
With...
Well it works =) any improvements/suggestions are welcome! (As said in previous posts I am quite new to VBScript, any feedback is welcome). The next objective will be (after replacement) to prevent repeated characters.... hint hint :p ;)
Set RegularExpressionObject = New RegExp
...
For Each...
dm4ever thanks for you quick reaction, indeed the wscript.echo just shows the renamed value (and doesn't rename) but that was just show what I would like to apply to rename files. I'm trying to figure out how to apply the function on renaming files. My first idea was something like this:
For...
Hi again,
Hopefully one of my last questions ;) I really start enjoying to solve problems these day's and I learned a lot so far :D I found this simple script that replaces bad characters.
WScript.Echo RenFile("bad%file&name.txt")
Function RenFile(FileName)
With New RegExp...
You're right, you can't rename a folder when the "path" is in use. One other question though; I'd like to make the script a little more flexible by declaring a variable which determinse the case. To clarify:
Dim theCase
theCase = UCase
...
If oSubFolder.Name <> theCase(oSubFolder.Name) Then...
Thanks but as soon as I enter your line of code the script doesn't show any results... (I created the folder c:\temp with several folders which contains names abcd). Without the line it does show these folders I created...
I use the following script to find folders with a specific name on my PC. However this script searches the whole computer every time. I am quite new to regular expressions. I'd like to modify the script in a way it limits the search to a folder, lets say: c:\temp
I understand the code except...
Thanks, that indeed prevents the error from occurring. But also leaves the folder unchanged. Is it even possible to change the name in the situation I described? Because lowercasing files doesn't give the error (when opened...)
I use the following script to lowercase names from folders. The script works fine. It produces an error (Permission Denied) however if I have a file opened which stands in a to be renamed directory. Is there a way to prevent this error from occurring? Any help, suggestions (even for the script I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.