Search the Community
Showing results for tags 'clipreg'.
-
Hi guys, i've seen some scripts that do the same, but hey, i did this myself 90% the other 10 is for the help file so im proud, and want to share it for anyone who needs a small tool, that can be incorporated with anything you'd like. So what is the difference from this to the others? it's basic, simple, so more functions that you'd expect, and i hate that. #region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=ResourcesClipReg.ico #AutoIt3Wrapper_Res_Icon_Add=ResourcesClipReg.ico #AutoIt3Wrapper_Run_Tidy=y #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** Local $LastKey1, $LastKey2, $LastKey3, $LastKey4 $LastKey1 = ClipGet() $LastKey2 = StringReplace($LastKey1, "", "") $LastKey3 = StringReplace($LastKey2, '"', '') $LastKey4 = StringRegExp($LastKey3, '^(HK(LM|U|CU|CR|CC|EY)_?(CLASSES|CURRENT|LOCAL)?_?(USER(S)?|ROOT|CONFIG|MACHINE)?)', 0) = 1 If $LastKey4 = False Then MsgBox(4096, "Info", "Clipboard content is NOT a registry key!") Exit Else Write() EndIf Func Write() If ProcessExists("regedit.exe") Then ProcessClose("regedit.exe") EndIf RegWrite("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionAppletsRegedit", "LastKey", "REG_SZ", $LastKey3) Sleep(100) Run("regedit") EndFunc ;==>Write Usage: Copy the key (path) from anywhere and run this it will open the regedit tool on the key you copied. doesn't get much simpler than this. It uses the simple method of writing the key path to the registry itself, and when regedit opens, it will open there. Update: Added "is registry key" check, string format, removes " and double automatically, closes and reopens regedit if open.