Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Misc apps


  • Please log in to reply
22 replies to this topic
Murp-e
  • Members
  • 531 posts
  • Last active: Sep 27 2011 11:44 AM
  • Joined: 12 Jan 2007
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.virtualpl...i/eq/index.html

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

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

NirSoft icon extractor:
http://www.nirsoft.n...ils/nirext.html

NirSoft program to see all context menus related to each file type (one of a kind app I think):
http://www.nirsoft.n..._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:
<!-- m -->http://www.gtopala.com<!-- m -->

Various system utilities:
<!-- w -->www.microsoft.com/technet/sysinternals<!-- w -->

Identify unknown file types:
<!-- m -->http://mark0.net/soft-tridnet-e.html<!-- m -->

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?

BoBo
  • Guests
  • Last active:
  • Joined: --
Thx for the links. 8)
Regarding this ...

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.

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
Nope, you are wrong.'

H123\some folder is the valid relative directory name.


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%

Posted Image

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
A simplified regex would be RegExMatch(clipboard, "i)HK(?:LM|U|C[RC])\\.+")

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


Murp-e
  • Members
  • 531 posts
  • Last active: Sep 27 2011 11:44 AM
  • Joined: 12 Jan 2007
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:
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?

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
Try
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%

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
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.
Posted Image

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012

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.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


Grumpy
  • Guests
  • Last active:
  • Joined: --

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...)

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
Ok, edited. Hope you're happy.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
Yeah, I jump around like crazy :p

What the regex?!

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


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. :!:
Posted Image

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005

Grumpy is our code guardian angel
[...]
You did break the coding low, Titan, thats the reason for Grumpy to appear. :!:

Yes, unless you see him as the devil jumping out of the box, on his coil spring... :twisted:
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
Nah, you are not Satan.

.... :idea: .... or thats what you want us to think :?

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


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"

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.
Posted Image

Sean
  • Members
  • 2462 posts
  • Last active: Feb 07 2012 04:00 AM
  • Joined: 12 Feb 2007
Is there a reason to use regjump.exe? Isn't it enough?

key = HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Sr

Run, regedit.exe
WinWait, ahk_class RegEdit_RegEdit
StringReplace, key, key, \, {Right}, All
ControlSend, SysTreeView321, %key%


majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
No reason at all, the guy just asked.
Posted Image