//注册表快速定位
import win.ui;
/*DSG{{*/
var winform = win.form(parent=...; right=512;text="注册表快速定位 www.aau.cn";bottom=131 )
winform.add( 
button={ bottom=101;text="快速定位";left=296;top=68;z=2;right=440;cls="button" };
edit={ bottom=61;right=482;left=39;top=32;z=1;text="HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_TABBED_BROWSING";edge=1;cls="edit" }
)
/*}}*/

import win.reg;
import process;
import win.clip

var str  = win.clip.read();
if( string.startWith(str,"HKEY_") ){
	winform.edit.text = str;
}

winform.button.oncommand = function(id,event){
	var reg = win.reg("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit")
	reg.setSzValue("LastKey",winform.edit.text)
 	process.execute("regedit.exe")  
}

winform.show() 
win.loopMessage();
