Leaderboard
Popular Content
Showing content with the highest reputation on 12/09/2011 in all areas
-
_UskinLibrary.au3 (UDF) - Skin with DLL free (no ads) and fully functional!
abberration reacted to JScript for a topic
Hello everyone! Use skins for free is not an easy task and not very elegant, so I developed this UDF that I had been using in some programs that I did but that was not in the way of UDF! Are just two files: 1 - _USkinDLL.au3 2 - _UskinLibrary.au3 And only these three lines to add to your scripts: ; #include "_UskinLibrary.au3" _Uskin_LoadDLL() _USkin_Init(@ScriptDir & "SkinsOldSkool.msstyles"); <-- Put here your favorite skin... ;Run or compile the script and enjoy! Note: You can use the FileInstall() to attach the skin you want in your executable, or use the program ?do=embed' frameborder='0' data-embedContent> to embed the skin you want, there you will have to use this case as follows: ; #include "_UskinLibrary.au3" #include ".SkinsOldSkool.au3"; <-- This is an skin ".msstyles" embedded _Uskin_LoadDLL() _USkin_Init(_OldSkool(True)); <-- Put here your favorite Skin!!! ;See the program documentation ?do=embed' frameborder='0' data-embedContent> for more information about how to call files embedded! Note: Some skins have problems if the program is compiled using UPX compression, to circumvent this problem compile your program with the following options added to the top of the source code: #AutoIt3Wrapper_Compression=0 ;Compression parameter 0-4 0=Low 2=normal 4=High. Default=2 #AutoIt3Wrapper_UseUpx=n ;(Y/N) Compress output program. Default=YExample image Download (Updated 14/07/2012) Source with 57 Skins (.msstyles) and embedded (.au3): Example_UskinLibrary_(RedirectLink).html 17.8k (Previous downloads: 588) More Skins downloads http://www.skinbase.org/Skins/msstyles/135 http://www.lotsofskins.com/?num=41&page=browse_category Note: Only files are supported is "msstyles", but it is not a bother, since there are many sites with free downloads of these skins! The use of this DLL is free, ad-free and fully functional! About dll: http://www.neemedia.com João Carlos.1 point -
SearchReg-example
JoshuaBarnette reacted to Holger for a topic
Just for learning, looking or leaving Search for a value in the registry. Take it and modify like you want #include <GUIConstants.au3> GUICreate("Test",500,80) $info_text = GUICtrlCreateLabel("",10,10,480,60) GUISetState() Global $found = "" SearchReg("HKCU","Version") ;SearchReg("HKLM","ProductName") GUIDelete() Msgbox(0,"",$found) Exit ;***************************************************** ; Recursive search-function ;***************************************************** Func SearchReg($startkey,$searchval) Local $startkey,$val,$i,$key,$searchval,$z $i = 1 While 1 $key = RegEnumKey($startkey,$i) If @error <> 0 Then ExitLoop GUICtrlSetData($info_text,$startkey & "\" & $key) $z = 1 While 1 $val = RegEnumVal($startkey & "\" & $key,$z) If @error <> 0 Then ExitLoop If StringInStr($val,$searchval) Then $found = $found & "ValueName, " & $startkey & "\" & $key & ", " & $val & @LF $readval = RegRead($startkey & "\" & $key,$val) If $readval <> "" And StringInStr($readval,$searchval) Then $found = $found & "Value, " & $startkey & "\" & $key & ", " & $val & ", " & $readval & @LF $z = $z + 1 WEnd SearchReg($startkey & "\" & $key,$searchval) $i = $i + 1 WEnd ;Sleep(1); just 1 idle milli second -> not used at the moment EndFunc Regards Holger1 point -
Discontinued Projects. Please delete.1 point
-
SearchReg-example
JoshuaBarnette reacted to PsaltyDS for a topic
New version 2.1.0.0: - Added $iType flag for RegExp pattern - Added Pseudo-pattern "*" to match all (internally translates to "." RegExp pattern) Demo script (only shows new functionallity): #include <Array.au3>; Only for _ArrayDisplay() in demo $SearchKey = "HKLM\SOFTWARE\AutoIt v3" ; Find only values, return as an array $SearchString = "*" ; find all values $Timer = TimerInit() $Results = _RegSearch($SearchKey, $SearchString, 2, 1) $Timer = TimerDiff($Timer) / 1000 _ArrayDisplay($Results, "Results (data only) in " & $Timer & " seconds") ; Find only values, by RegExp, return as an array $SearchString = "(?<=Install)Dir" ; find "Dir", only where preceded by "Install", using a RegExp look-behind assertion $Timer = TimerInit() $Results = _RegSearch($SearchKey, $SearchString, 2+8, 1) $Timer = TimerDiff($Timer) / 1000 _ArrayDisplay($Results, "Results (data only) in " & $Timer & " seconds") _RegSearch() Function: ;***************************************************** ; Function: _RegSearch ; ; Purpose: Performs a recursive search of the registry starting at $sStartKey, looking for $sSearchVal ; ; Syntax: _RegSearch($sStartKey, $sSearchVal, $iType = 0x07, $fArray = False) ; ; Where: $sStartKey = Reg path at which to begin search ; $sSearchVal = The string to search for, or RegExp pattern to use if $iType bit 3 is set ; $iType = Matching types to return: ; 1 = Key names ; 2 = Value names ; 4 = Value data ; 8 = $sSearchVal is a RegExp pattern (default is StringInStr) ; Add bits together for multiple match types, default is 7 (all types, StringInStr matching) ; $fArray = Return an array of results vice the string ([0] = count) ; ; Return value: On success, returns a string containing a @LF delimited list of matching key names and values: ; Where a key name matches, it is listed as a reg path with trailing backslash: ; i.e. HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ ; Where a value name matches, it is listed as a reg path without trailing backslash: ; i.e. HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WallPaperDir ; Where the data matches, the format is path = data: ; i.e. HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WallPaperDir = %SystemRoot%\Web\Wallpaper ; On failure, returns 0 and sets @error. ; ; Notes: No matches is not an error, returns "" or an array with [0] = 0 depending on $fArray ; Default StringInStr() matches are not case sensitive. ;***************************************************** ; Change Log: ; v1.0.0.0 | 03/17/05 | Original SearchReg() by Holger ; v2.0.0.0 | 08/10/06 | Native AutoIt version by PsaltyDS ; v2.0.0.1 | 08/16/06 | Fixed bug reported by markloman ; v2.0.1.0 | 07/30/08 | Added $iType and $fArray parameters ; v2.0.2.0 | 11/12/08 | Fixed bug returning array [0] = 1 vice 0 for none found ; v2.0.3.0 | 06/22/10 | Fixed bug appending some result strings together reported by squid808 ; v2.1.0.0 | 06/23/10 | Added $iType option for RegExp patterns, and pseudo wildcard "*" ;***************************************************** Func _RegSearch($sStartKey, $sSearchVal, $iType = 0x07, $fArray = False) Local $v, $sVal, $k, $sKey, $sFound = "", $sFoundSub = "", $avFound[1] = [0] ; Trim trailing backslash, if present If StringRight($sStartKey, 1) = "\" Then $sStartKey = StringTrimRight($sStartKey, 1) ; Generate type flags If Not BitAND($iType, 0x07) Then Return SetError(1, 0, 0); No returns selected Local $fKeys = BitAND($iType, 0x1), $fValue = BitAND($iType, 0x2), $fData = BitAND($iType, 0x4), $fRegExp = BitAND($iType, 0x8) ; Check for wildcard If (Not $fRegExp) And ($sSearchVal == "*") Then ; Use RegExp pattern "." to match anything $iType += 0x8 $fRegExp = 0x8 $sSearchVal = "." EndIf ; This checks values and data in the current key If ($fValue Or $fData) Then $v = 1 While 1 $sVal = RegEnumVal($sStartKey, $v) If @error = 0 Then ; Valid value - test its name If $fValue Then If $fRegExp Then If StringRegExp($sVal, $sSearchVal, 0) Then $sFound &= $sStartKey & "\" & $sVal & @LF Else If StringInStr($sVal, $sSearchVal) Then $sFound &= $sStartKey & "\" & $sVal & @LF EndIf EndIf ; test its data If $fData Then $readval = RegRead($sStartKey, $sVal) If $fRegExp Then If StringRegExp($readval, $sSearchVal, 0) Then $sFound &= $sStartKey & "\" & $sVal & " = " & $readval & @LF Else If StringInStr($readval, $sSearchVal) Then $sFound &= $sStartKey & "\" & $sVal & " = " & $readval & @LF EndIf EndIf $v += 1 Else ; No more values here ExitLoop EndIf WEnd EndIf ; This loop checks subkeys $k = 1 While 1 $sKey = RegEnumKey($sStartKey, $k) If @error = 0 Then ; Valid key - test it's name If $fKeys Then If $fRegExp Then If StringRegExp($sKey, $sSearchVal, 0) Then $sFound &= $sStartKey & "\" & $sKey & "\" & @LF Else If StringInStr($sKey, $sSearchVal) Then $sFound &= $sStartKey & "\" & $sKey & "\" & @LF EndIf EndIf ; Now search it $sFoundSub = _RegSearch($sStartKey & "\" & $sKey, $sSearchVal, $iType, False) ; use string mode to test sub keys If $sFoundSub <> "" Then $sFound &= $sFoundSub & @LF Else ; No more keys here ExitLoop EndIf $k += 1 WEnd ; Return results If StringRight($sFound, 1) = @LF Then $sFound = StringTrimRight($sFound, 1) If $fArray Then If StringStripWS($sFound, 8) <> "" Then $avFound = StringSplit($sFound, @LF) Return $avFound Else Return $sFound EndIf EndFunc ;==>_RegSearch Edit: Added clarifying verbiage to definition of $sSearchVal in header.1 point -
Border / GuiCtrlCreateGroup alternative?
Annonyreeder reacted to martin for a topic
That works quite well Cusem. Here's a variation. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 633, 300, 197, 123) ;--->>> Example GroupBox(30, 30, 300, 100, 120, 26, "Group box Number 1") GroupBox(30, 170, 300, 100, 120, 0, "Group box Number 2") ;<<<--- Example GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func GroupBox($x, $y, $w, $h, $lw = 0, $lh = 0, $lText = '') ;X-Pos, Y-Pos, Width, Height If $lh = 0 And $lText = '' Then $lw = 0 ;--->>> Top Local $lbltoL = GUICtrlCreateLabel("", $x + 1, $y, 10 - 1, 2) Local $lbltoR = GUICtrlCreateLabel("", $x + 10 + $lw, $y, $w - 10 - $lw, 2) Local $lbltiL = GUICtrlCreateLabel("", $x, $y + 2, 10, 1, $WS_CLIPSIBLINGS) Local $lbltiR = GUICtrlCreateLabel("", $x + 10 + $lw, $y + 2, $w - 2 - 10 - $lw, 1, $WS_CLIPSIBLINGS) Local $lblrbL = GUICtrlCreateLabel("", $x + 4, $y + 4, 10 - 4, 1, $WS_CLIPSIBLINGS) Local $lblrbR = GUICtrlCreateLabel("", $x + 10 + $lw, $y + 4, $w - 4 - 10 - $lw, 1, $WS_CLIPSIBLINGS) GUICtrlSetBkColor($lbltoL, 0xD4D0C8) GUICtrlSetBkColor($lbltiL, 0x808080) GUICtrlSetBkColor($lblrbL, 0xC0C0C0) GUICtrlSetBkColor($lbltoR, 0xD4D0C8) GUICtrlSetBkColor($lbltiR, 0x808080) GUICtrlSetBkColor($lblrbR, 0xC0C0C0) ;<<<--- Top ;--->>> Bottom Local $lblbo = GUICtrlCreateLabel("", $x, $y + $h + 1, $w, 2) Local $lblbi = GUICtrlCreateLabel("", $x + 1, $y + $h, $w - 3, 1, $WS_CLIPSIBLINGS) Local $lblbb = GUICtrlCreateLabel("", $x + 4, $y + $h - 1, $w - 8, 1, $WS_CLIPSIBLINGS) GUICtrlSetBkColor($lblbo, 0xA0A0A4) GUICtrlSetBkColor($lblbi, 0xFFFFE1) GUICtrlSetBkColor($lblbb, 0xC0C0C0) ;<<<--- Bottom ;--->>> Left Local $lbllo = GUICtrlCreateLabel("", $x, $y, 2, $h + 2) Local $lblli = GUICtrlCreateLabel("", $x + 2, $y + 3, 1, $h - 3) Local $lbllb = GUICtrlCreateLabel("", $x + 4, $y + 4, 1, $h - 4, $WS_CLIPSIBLINGS) GUICtrlSetBkColor($lbllo, 0xD4D0C8) GUICtrlSetBkColor($lblli, 0xA0A0A4) GUICtrlSetBkColor($lbllb, 0xC0C0C0) ;<<<--- Left ;--->>> Right Local $lblro = GUICtrlCreateLabel("", $x + $w - 1, $y, 2, $h + 3) Local $lblri = GUICtrlCreateLabel("", $x + $w - 2, $y + 2, 1, $h - 1) Local $lblrb = GUICtrlCreateLabel("", $x + $w - 4, $y + 4, 1, $h - 4, $WS_CLIPSIBLINGS) GUICtrlSetBkColor($lblro, 0xD4D0C8) GUICtrlSetBkColor($lblri, 0x808080) GUICtrlSetBkColor($lblrb, 0xC0C0C0) ;<<<--- Right If $lw > 0 And $lh > 0 Then GroupBox($x + 10, $y - $lh / 2, $lw, $lh) If $lText <> "" Then If $lh = 0 Then $lh = 22;needs real way to decide label height here, just done to make example work GUICtrlCreateLabel($lText, $x + 18, $y - $lh / 2 + 7) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) EndIf EndFunc ;==>GroupBox1 point -
Border / GuiCtrlCreateGroup alternative?
JoshuaBarnette reacted to Cusem for a topic
I created a function based on Martin's code. It's different though, I moved the inner box against the outer box and changed the color of the right-bar. So I guess it loses it's 3D effect, at this moment I thought it looked better this way (haven't tested a lot). #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 633, 470, 197, 123) ;--->>> Example GroupBox(30, 30, 300, 200) ;<<<--- Example Func GroupBox($x, $y, $w, $h) ;X-Pos, Y-Pos, Width, Height ;--->>> Top Local $lblto = GUICtrlCreateLabel("", $x+1, $y, $w, 2) Local $lblti = GUICtrlCreateLabel("", $x, $y+2, $w-2, 1, $WS_CLIPSIBLINGS) Local $lblrb = GUICtrlCreateLabel("", $x+4, $y+4, $w-8, 1, $WS_CLIPSIBLINGS) GUICtrlSetBkColor($lblto, 0xD4D0C8) GUICtrlSetBkColor($lblti, 0x808080) GUICtrlSetBkColor($lblrb, 0xC0C0C0) ;<<<--- Top ;--->>> Bottom Local $lblbo = GUICtrlCreateLabel("", $x, $y+$h+1, $w, 2) Local $lblbi = GUICtrlCreateLabel("", $x+1, $y+$h, $w-3, 1, $WS_CLIPSIBLINGS) Local $lblbb = GUICtrlCreateLabel("", $x+4, $y+$h-1, $w-8, 1, $WS_CLIPSIBLINGS) GUICtrlSetBkColor($lblbo, 0xA0A0A4) GUICtrlSetBkColor($lblbi, 0xFFFFE1) GUICtrlSetBkColor($lblbb, 0xC0C0C0) ;<<<--- Bottom ;--->>> Left Local $lbllo = GUICtrlCreateLabel("", $x, $y, 2, $h+2) Local $lblli = GUICtrlCreateLabel("", $x+2, $y+3, 1, $h-3) Local $lbllb = GUICtrlCreateLabel("", $x+4, $y+4, 1, $h-4, $WS_CLIPSIBLINGS) GUICtrlSetBkColor($lbllo, 0xD4D0C8) GUICtrlSetBkColor($lblli, 0xA0A0A4) GUICtrlSetBkColor($lbllb, 0xC0C0C0) ;<<<--- Left ;--->>> Right Local $lblro = GUICtrlCreateLabel("", $x+$w-1, $y, 2, $h+3) Local $lblri = GUICtrlCreateLabel("", $x+$w-2, $y+2, 1, $h-1) Local $lblrb = GUICtrlCreateLabel("", $x+$w-4, $y+4, 1, $h-4, $WS_CLIPSIBLINGS) GUICtrlSetBkColor($lblro, 0xD4D0C8) GUICtrlSetBkColor($lblri, 0x808080) GUICtrlSetBkColor($lblrb, 0xC0C0C0) ;<<<--- Right EndFunc GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd1 point