woeiwoei 发表于 2010-5-14 15:05:10

GUID排序问题如何解决【已解决】

本帖最后由 woeiwoei 于 2010-5-14 15:57 编辑

#Include <WinAPI.au3>
FileInstall("ai.ico",@TempDir&"\ai.ico")
FileInstall("qi.ico",@TempDir&"\qi.ico")
FileInstall("mo.ico",@TempDir&"\mo.ico")
FileInstall("fa.ico",@TempDir&"\fa.ico")
Dim $Guid
$Guid=_CreateGuid()
$Guid=_CreateGuid()
$Guid=_CreateGuid()
$Guid=_CreateGuid()
$url = 'http://www.aiqmofa.cn/?webownerId=18131&childid=' & StringRegExpReplace(@ScriptName,'[^\d]', '')
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "Default Visible", "REG_SZ", "Yes" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "ButtonText", "REG_SZ", "爱请魔法" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "CLSID", "REG_SZ", "{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "Icon", "REG_SZ", @TempDir&"\ai.ico" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "HotIcon", "REG_SZ", @TempDir&"\ai.ico")
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "IeakPolicy", "REG_SZ", "" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "Exec", "REG_SZ", $url)

RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "Default Visible", "REG_SZ", "Yes" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "ButtonText", "REG_SZ", "爱请魔法" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "CLSID", "REG_SZ", "{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "Icon", "REG_SZ", @TempDir&"\qi.ico" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "HotIcon", "REG_SZ", @TempDir&"\qi.ico")
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "IeakPolicy", "REG_SZ", "" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "Exec", "REG_SZ", $url)

RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "Default Visible", "REG_SZ", "Yes" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "ButtonText", "REG_SZ", "爱请魔法" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "CLSID", "REG_SZ", "{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "Icon", "REG_SZ", @TempDir&"\mo.ico" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "HotIcon", "REG_SZ", @TempDir&"\mo.ico")
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "IeakPolicy", "REG_SZ", "" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "Exec", "REG_SZ", $url)

RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "Default Visible", "REG_SZ", "Yes" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "ButtonText", "REG_SZ", "爱请魔法" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "CLSID", "REG_SZ", "{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "Icon", "REG_SZ", @TempDir&"\fa.ico" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "HotIcon", "REG_SZ", @TempDir&"\fa.ico")
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "IeakPolicy", "REG_SZ", "" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Extensions\"&$Guid, "Exec", "REG_SZ", $url)
Func _CreateGuid()
    Local $Guid = DllStructCreate($tagGUID)
    $Result = DllCall("OLE32.DLL", "dword", "CoCreateGuid", "ptr", DllStructGetPtr($Guid))
    $Result = _WinAPI_StringFromGUID(DllStructGetPtr($Guid))
    Return $Result
EndFuncGUID 随机生成,但是也分‘大小’。我的问题是,在标准按钮栏创建4个按钮。每个按钮字不同。组合在一起是‘爱情魔法’这样的顺序。
我现在写的其他都成功了,就是排序问题。怎么对比生成的GUID 的大小并且按大小分配给 爱 请 魔 法 四个按钮啊?最小的为 爱 下来是情 依次这样。。。。
大大们帮帮忙啊。给下思路。。不胜感激!!:face (31):

woeiwoei 发表于 2010-5-14 15:58:12

StringReplace自己搞定!:face (39):

case 发表于 2011-8-21 12:21:20

回复 2# woeiwoei


    问一下LZ怎么写查看本机的GUID值啊??
页: [1]
查看完整版本: GUID排序问题如何解决【已解决】