AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Misc apps
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources
View previous topic :: View next topic  
Author Message
Murp|e



Joined: 12 Jan 2007
Posts: 239
Location: Norway

PostPosted: Sun Apr 15, 2007 2:25 am    Post subject: Misc apps Reply with quote

I'm a bit of a freeware junkie, just stumbled across two tiny but sweet applications (the first two), but figured I'd share some others as well. Sorry if some of these have been posted many times before.

A tiny skinnable "scientific" calculator
http://www.virtualplastic.net/kobi/eq/index.html

Regjump, jump straight to a given registry key:
http://www.eolsoft.com/freeware/registry_jumper

Other programs I use. Great screenshot tool:
http://www.faststone.org/FSCaptureDetail.htm

NirSoft icon extractor:
http://www.nirsoft.net/utils/nirext.html

NirSoft program to see all context menus related to each file type (one of a kind app I think):
http://www.nirsoft.net/utils/shell_menu_view.html
(NirSoft also has a whole bunch of other good apps that AutoHotkeyers could make good use of.)

SIW System Information for Windows:
http://www.gtopala.com

Various system utilities:
www.microsoft.com/technet/sysinternals

Identify unknown file types:
http://mark0.net/soft-tridnet-e.html

Also, for several applications I like to make AutoHotkey scripts which launch the applications. I make the script read the clipboard for relevant information relating to that program, and if the clipboard contains such information I use AutoHotkey to feed it into the program's GUI e.g. for the unknown file identification program, I have an AutoHotkey "launcher" which checks if the clipboard contains a valid path name and it it does it automatically pastes that into the GUI and hits the Enter key. This could also be use to make the program a function like a command line utility, which again could be used to open all unknown files directly in that program.... there's an idea. Err... so what I'm getting at is that I have a question as to how to do this as simply as possible with the program called RegJump.

I want AutoHotkey to check if the clipboard contains a valid registry key name and if it does paste that into RegJump. At first I thought of making a textfile and manually filling in what all regkeys start with "HKEY_LOCAL_MACHINE, HKEY\..., or HKLM\, HKCU\ etc. Then I thought I might write a regular expression instead, but I've never used regular expressions before. So far this is what I've come up with:
FoundPos := RegExMatch("h(?=.*\\)

Which I hoped translates into: any string that starts with the character H and is followed by at least one backslash. Does that seem like a reasonable solution or is there a far better way to do all of this?


Last edited by Murp|e on Sun Apr 15, 2007 2:03 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
BoBo
Guest





PostPosted: Sun Apr 15, 2007 9:48 am    Post subject: Reply with quote

Thx for the links. Cool
Regarding this ...
Quote:
Err... so what I'm getting at is that I have a question as to how to do this as simply as possible with the program called RegJump.

I want AutoHotkey to check if the clipboard contains a valid registry key name and if it does paste that into RegJump. At first I thought of making a textfile and manually filling in what all regkeys start with "HKEY_LOCAL_MACHINE, HKEY\..., or HKLM\, HKCU\ etc. Then I thought I might write a regular expression instead, but I've never used regular expressions before. So far this is what I've come up with:
FoundPos := RegExMatch("h(?=.*\\)

Which I hoped translates into: any string that starts with the character H and is followed by at least one backslash. Does that seem like a reasonable solution or is there a far better way to do all of this?
.. I'd recommend to ask it at the 'Ask For Help"-Section. Good luck.
Back to top
majkinetor



Joined: 24 May 2006
Posts: 3592
Location: Belgrade

PostPosted: Sun Apr 15, 2007 10:33 am    Post subject: Reply with quote

Nope, you are wrong.'

H123\some folder is the valid relative directory name.


Code:
 StringGetPos, j, clipobard, \
 if j = -1
     return
 StringMid, key, clibpoard, 1, j-1
 
 if key not in HKEY_LOCAL_MACHINE,HKEY,HKLM,HKCU....
   return

 Run, regjump %clipboard%

_________________


Last edited by majkinetor on Sun Apr 15, 2007 11:31 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
Titan



Joined: 11 Aug 2004
Posts: 5009
Location: imaginationland

PostPosted: Sun Apr 15, 2007 11:19 am    Post subject: Reply with quote

A simplified regex would be RegExMatch(clipboard, "i)HK(?:LM|U|C[RC])\\.+")
_________________

RegExReplace("irc.freenode.net/autohotkey", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
Murp|e



Joined: 12 Jan 2007
Posts: 239
Location: Norway

PostPosted: Sun Apr 15, 2007 2:20 pm    Post subject: Reply with quote

BoBo, my pleasure. I've always thought I should start my own "This is my website, it contains a database of all the freeware applications I have ever come across." type of website, but there are so many already...


Titan,

Thanks for your help, but I couldn't get it to work at all, did you test it? Here's my code:
Code:
clipboard = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Sr" ;Put valid registry key in clipboard for testing purpouses.
iFoundPos := RegExMatch(clipboard, "i)HK(?:LM|U|C[RC])\\.+") ;Regular expression
msgbox, %iFoundPos%
if iFoundPos > 1 ;Valid registry key was found in clipboard.
Run, regjump.exe %clipboard% ;Run RegJump.exe with registry key as command line argument.


Should I be doing something differently?
Back to top
View user's profile Send private message Visit poster's website
Titan



Joined: 11 Aug 2004
Posts: 5009
Location: imaginationland

PostPosted: Sun Apr 15, 2007 2:46 pm    Post subject: Reply with quote

Try
Code:
clipboard = HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Sr ; see autohotkey.net/go/faq#quotes
If RegExMatch(cx := clipboard, "i)HK(?:EY[a-z_]+|LM|U|C[RC])\\.+") = 1
   Run, regjump.exe %cx%

_________________

RegExReplace("irc.freenode.net/autohotkey", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")


Last edited by Titan on Mon Apr 16, 2007 10:47 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 3592
Location: Belgrade

PostPosted: Mon Apr 16, 2007 8:57 am    Post subject: Reply with quote

lol

I call this obfuscation, plus syntax errors of reg keys will pass as reg keys, like, HKEY_LOCAL_MCHINE

Second of all, u shouldn't work directly with clipboard but with the copy of it.
_________________
Back to top
View user's profile Send private message MSN Messenger
Titan



Joined: 11 Aug 2004
Posts: 5009
Location: imaginationland

PostPosted: Mon Apr 16, 2007 9:31 am    Post subject: Reply with quote

majkinetor wrote:
I call this obfuscation
What the regex?! Didn't I say it was a simplified one a few posts up lol.
Using a copy of the clipboard is faster and prevents other applications from interfering, but for one line expressions it shouldn't be a problem.
_________________

RegExReplace("irc.freenode.net/autohotkey", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
Grumpy
Guest





PostPosted: Mon Apr 16, 2007 9:49 am    Post subject: Reply with quote

Titan wrote:
but for one line expressions it shouldn't be a problem.
That's three lines, ie. at least two opportunities for an interference (low probability, but the kind of problem that brings bug reports extremely hard to reproduce...)
Back to top
Titan



Joined: 11 Aug 2004
Posts: 5009
Location: imaginationland

PostPosted: Mon Apr 16, 2007 10:47 am    Post subject: Reply with quote

Ok, edited. Hope you're happy.
_________________

RegExReplace("irc.freenode.net/autohotkey", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 3592
Location: Belgrade

PostPosted: Mon Apr 16, 2007 1:55 pm    Post subject: Reply with quote

Yeah, I jump around like crazy Razz

Quote:
What the regex?!

The later one. I didn't complain for the first one, which was good enough for simplified scenario like you said.


Quote:
That's three lines, ie. at least two opportunities for an interference (low probability, but the kind of problem that brings bug reports extremely hard to reproduce...)

If you dont' use SetBatchLines -1 this code will probably run more more then 50ms.

I would say that Grumpy is totaly right (well, Grumpy is always right, you can't deny that). As far as I am concerned, Grumpy is our code guardian angel, as we can't contact him, speak with him etc. You just see him around when the coding truth is not obayed.

You did break the coding low, Titan, thats the reason for Grumpy to appear. Exclamation
_________________
Back to top
View user's profile Send private message MSN Messenger
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Mon Apr 16, 2007 2:07 pm    Post subject: Reply with quote

majkinetor wrote:
Grumpy is our code guardian angel
[...]
You did break the coding low, Titan, thats the reason for Grumpy to appear. Exclamation
Yes, unless you see him as the devil jumping out of the box, on his coil spring... Twisted Evil
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Last edited by PhiLho on Mon Apr 16, 2007 2:29 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 3592
Location: Belgrade

PostPosted: Mon Apr 16, 2007 2:21 pm    Post subject: Reply with quote

Nah, you are not Satan.

.... Idea .... or thats what you want us to think Confused

BTW guys, after months of hard work, I devised new RE alghorythm for your nicknames, extremely optimised version Cool


Quote:
RegExReplace("teh_hax0rz: proverbial ownage..", "(?<=(^.))[^\1]+\W\x20[^i]++(.)(?(?=([^b-])).+(.)\3)\S++", "$2$" . ceil(tan(90))*-1 . "$3$4")

PhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2"

Code:
RegExReplace("teh_hax0rz: proverbial ownage..", ".+", "Titan")
PhiLho := RegExReplace("Philippe Lhoste", ".+", "PhiLho")
Micha := for homework


I am testing it now, but first results confirm extreme sophistication and performance of above code.
_________________
Back to top
View user's profile Send private message MSN Messenger
Sean



Joined: 12 Feb 2007
Posts: 1247

PostPosted: Mon Apr 16, 2007 2:26 pm    Post subject: Reply with quote

Is there a reason to use regjump.exe? Isn't it enough?

Code:
key = HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Sr

Run, regedit.exe
WinWait, ahk_class RegEdit_RegEdit
StringReplace, key, key, \, {Right}, All
ControlSend, SysTreeView321, %key%
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 3592
Location: Belgrade

PostPosted: Mon Apr 16, 2007 2:50 pm    Post subject: Reply with quote

No reason at all, the guy just asked.
_________________
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group