Leaderboard
Popular Content
Showing content with the highest reputation on 01/14/2015 in all areas
-
Update help
VerteXslaPPy reacted to Valuater for a topic
@jguinch wrote it for you. Did you try his code?1 point -
A few simple BitBlt effects (melt your screen etc.)
argumentum reacted to minxomat for a topic
As it says on the box (in the title). Choose the effect by changing the effect number. Disable Blt acceleration if needed. 3d.au31 point -
Update help
VerteXslaPPy reacted to mLipok for a topic
i'ts never happend as $update = @TempDir & "\update.ini" EDIT: I see @jguinch was faster from me1 point -
Update help
VerteXslaPPy reacted to jguinch for a topic
Try something like this : $sDownloadIni = @TempDir & "\update.ini" InetGet("http://xxxxxxx.net/update.ini", $sDownloadIni, 1) $update = IniRead($sDownloadIni, "update", "update", "0") If $update = "1" Then MsgBox(0,"Update" ,"There is a new update aviable") EndIf You can also use InetRead...1 point -
Update help
VerteXslaPPy reacted to mLipok for a topic
MsgBox(0,"test","Tthere is a new update aviable") you lost some " edit: and ... what you want to do here ? If $update("1") Then1 point -
A few simple BitBlt effects (melt your screen etc.)
mesale0077 reacted to UEZ for a topic
I modified the code a little bit to get a triggering on 11 - Crazy SmOke_N effect: #include <ScreenCapture.au3> _GDIPlus_Startup() ; Animation from 0 to 21 Local $iAnimation = 11 ; ATTENTION! ; This enables GDI acceleration. Disable this if the script does Not ; run as expected (i.e. too slow) Local $bAndyMode = True ; m1, m2, k1, k2, z1, z2 Local $aAnimations[23][6] = [ _ [2, 2, 128, 128, 1, 1], _ ; 0 - Melt (Good) [20, 20, 128, 128, 1, 1], _ ; 1 - Powder Blow [9, 9, 128, 128, 1, 1], _ ; 2 - Powder [0, 0, 128, 128, 1, 1], _ ; 3 - Evaporate [3, 3, 128, 128, 1, 1], _ ; 4 - Water Color [5, 5, 128, 128, 1, 1], _ ; 5 - Accumulate [10000, 10000, 128, 128, 1, 1], _ ; 6 - Checks [1000, 1000, 128, 128, 1, 1], _ ; 7 - Extreme Checks (Fast) [10, 2, 128, 128, 1, 1], _ ; 8 - Wind Blow (Good) [2, 10, 128, 128, 1, 1], _ ; 9 - Pour Down (Quite) [10, 10, 128, 128, 1, 1], _ ; 10 - Running [20, 10, 128, 128, 10, 10], _ ; 11 - Crazy Smoke (Good) [2, 2, 128, 128, -100, 2], _ ; 12 - Super Fast Stream (Good) [2, 2, 100, 10, 1, 1], _ ; 13 - Moving Water (Good) [10, 8, 100, 10, 1, 1], _ ; 14 - Sort of Powder & Water [50, 10, 1, 25, 80, 10], _ ; 15 - Dissolve [2, 10, 12, 1, 5, 10], _ ; 16 - Blinds [1, 1, 1, 1, -2, 10], _ ; 17 - Stars [5, 5, 8, 4, -2, 10], _ ; 18 - Arrows (sort of.) [2, 10, 200, 4, -2, 10], _ ; 19 - Fire [30, 30, 10, 10, 10, 10], _ ; 20 - Grained [25, 25, 25, 255, 250, 25], _ ; 21 - Shake [Random(1, 2^8, 1), Random(1, 2^8, 1), Random(1, 2^8, 1), Random(1, 2^8, 1), Random(1, 2^8, 1), Random(1, 2^8, 1)]] If $iAnimation = 22 Then ConsoleWrite($aAnimations[$iAnimation][0] & "," & $aAnimations[$iAnimation][1] & "," & $aAnimations[$iAnimation][2] & "," & $aAnimations[$iAnimation][3] & "," & $aAnimations[$iAnimation][4] & "," & $aAnimations[$iAnimation][5] & @CRLF) Global Const $hDwmApiDll = DllOpen("dwmapi.dll") Global $sChkAero = DllStructCreate("int;") DllCall($hDwmApiDll, "int", "DwmIsCompositionEnabled", "ptr", DllStructGetPtr($sChkAero)) Global $aero = DllStructGetData($sChkAero, 1) If $aero Then DllCall($hDwmApiDll, "int", "DwmEnableComposition", "uint", False) ;Sleep(500) Opt("GUIOnEventMode", 1) Local $c = b(0), $a = @DesktopWidth, $b = @DesktopHeight _ScreenCapture_Capture("m.bmp", 0, 0, -1, -1, False) $d = GUICreate(0, $a, $b, 0, 0, 0x80000000) GUISetOnEvent(-3, "a") GUICtrlCreatePic("m.bmp", 0, 0, $a, $b) $e = b($d) $g_hDC = _WinAPI_GetDC($d) $g_hDC_Backbuffer = _WinAPI_CreateCompatibleDC($g_hDC) $g_hBITMAP = _GDIPlus_ImageLoadFromFile("m.bmp") $g_hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($g_hBITMAP) $g_oDC_Obj = _WinAPI_SelectObject($g_hDC_Backbuffer, $g_hHBITMAP) $g_hGfxCtxt = _GDIPlus_GraphicsCreateFromHDC($g_hDC_Backbuffer) GUISetState() $t = TimerInit() $r = Random(0.5, 1.5) While 1;. $f = ($a - $aAnimations[$iAnimation][2]) * Random(0, 1) $g = ($b - $aAnimations[$iAnimation][3]) * Random(0, 1) $h = $aAnimations[$iAnimation][0] * Random(0, 1) - $aAnimations[$iAnimation][4] $i = $aAnimations[$iAnimation][1] * Random(0, 1) - $aAnimations[$iAnimation][5] If Not $bAndyMode Then DllCall("gdi32.dll", "bool", "BitBlt", "handle", $e, "int", $f + $h, "int", $g + $i, "int", $aAnimations[$iAnimation][2], "int", $aAnimations[$iAnimation][3], "handle", $c, "int", $f, "int", $g, "dword", 0x00CC0020); Else DllCall("gdi32.dll", "bool", "BitBlt", "handle", $e, "int", Int($f + $h), "int", Int($g + $i), "int", 128, "int", 128, "handle", $e, "int", Int($f), "int", Int($g), "dword", 0x00CC0020) ;Andy's Variante EndIf If TimerDiff($t) > 1500 * $r Then DllCall("gdi32.dll", "bool", "BitBlt", "handle", $g_hDC, "int", 0, "int", @DesktopHeight - 50, "int", @DesktopWidth, "int", 50, "handle", $g_hDC_Backbuffer, "int", 0, "int", @DesktopHeight - 50, "dword", 0x00CC0020) $r = Random(0.5, 1.5) $t = TimerInit() EndIf WEnd; Func a(); If $aero Then DllCall($hDwmApiDll, "int", "DwmEnableComposition", "uint", True) DllCall("user32.dll", "int", "ReleaseDC", "hwnd", $d, "handle", $e) DllCall("user32.dll", "int", "ReleaseDC", "hwnd", 0, "handle", $c) _WinAPI_SelectObject($g_hDC_Backbuffer, $g_oDC_Obj) _GDIPlus_GraphicsDispose($g_hGfxCtxt) _WinAPI_DeleteObject($g_hHBITMAP) _WinAPI_ReleaseDC($d, $g_hDC) _GDIPlus_ImageDispose($g_hBITMAP) _GDIPlus_Shutdown() Exit; EndFunc ;==>a Func b($j); Return DllCall("user32.dll", "handle", "GetDC", "hwnd", $j)[0]; EndFunc ;==>b This effect probably makes sense only for this effect! For the other effect it has to be disabled or modified appropriately. Br, UEZ1 point -
Thanks kylomas I will play a bit with that listing...1 point
-
pcjunki, I suppose you could do something like... ; *** Start added by AutoIt3Wrapper *** #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ; *** End added by AutoIt3Wrapper *** #AutoIt3Wrapper_Add_Constants=n $Form1 = GUICreate("PC TOOLS V2", 1001, 724, 147, 131, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP, $WS_HSCROLL, $WS_VSCROLL)) $Tab1 = GUICtrlCreateTab(8, 8, 1257, 985) Global $cursor = "GUICtrlSetCursor(-1, 0)" Global $font = "GUICtrlSetFont(-1, 14, 400, 0, ""MS Sans Serif"")" Global $resize = "GUICtrlSetResizing ( -1, 1)" $TabSheet1 = GUICtrlCreateTabItem("WOL") $Button1 = GUICtrlCreateButton("1stFloor", 24, 56, 179, 153) execute($cursor) execute($font) execute($resize) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd but it is not saving alot and is far less readable. kylomas1 point
-
Here you go..._GUIToolTip_Update #include <GuiToolTip.au3> $sPrevious = @HOUR& ":" & @MIN & ":"& @SEC TraySetToolTip($sPrevious) While True $a = WinList("[CLASS:tooltips_class32]") For $i = 1 To UBound($a)-1 If WinGetTitle($a[$i][1]) = $sPrevious Then $sNew = @HOUR& ":" & @MIN & ":"& @SEC If $sNew <> $sPrevious Then ConsoleWrite(WinGetTitle($a[$i][1]) & @CRLF) TraySetToolTip($sNew) WinSetTitle($a[$i][1],"",$sNew) ControlSetText($a[$i][1],"","",$sNew) _GUIToolTip_Update($a[$i][1]) $sPrevious = $sNew EndIf EndIf Next Sleep(10) WEnd1 point
-
The transpose method can not handle cells with more than 255 characters. That might have caused the problem.1 point
-
Did you have a look at the the help file? @error = 5 means: Error occurred when reading data using the transpose method. @extended is set to the COM error code Could you try: $aArrayM = _Excel_RangeRead($oExcelM, $oExcelM.ActiveSheet, $oExcelM.ActiveSheet.Usedrange.Columns("A:Z"), 1, True)1 point
-
Use Variable in Variablename
czardas reacted to VVind0wM4ker for a topic
@water no cant use an array. The variable part hast to look clean and i have about 20 sets wich have like 25 variables each and the variables are 6-10 letters/numbers. so would look clean in a way, but also would be pretty confusing when making changes for same of the values @jedelane That's what I was looking for @czardas Thanks for explanation! also gave me an idea how to change other part of mycode Eval was what i needed. Thanks to all. Problem solved! VVind0wM4ker1 point -
It's still a checkbox, so after getting the checkbox object (missing an underscore Danp2, but I suggest using _IEGetObjByID instead anyway.) use the .fireEvent() option: Global $goChkBox = _IEGetObjById($oIE, "ckDisponibili") _myCheckThatBox($goChkBox, True) Func _myCheckThatBox(ByRef $oObj, $bCheck = True) If Not IsObj($oObj) Then Return SetError(1, 0, 0) EndIf If $bCheck Then If Not $oObj.checked Then $oObj.checked = True $oObj.fireEvent("onchange") $oObj.fireEvent("onclick") EndIf Else If $oObj.checked Then $oObj.checked = False $oObj.fireEvent("onchange") $oObj.fireEvent("onclick") EndIf EndIf Return 1 EndFunc1 point
-
Sorry, but your code doesn't make any sense to me. Try this: Local $oChk = _IEGetObjByName ($oIE,"ckDisponibili") _IEAction($oChk,"click") Edit: Fixed missing underscore ;-)1 point
-
key command collection
SorryButImaNewbie reacted to orbs for a topic
"Help" menu > "SciTE Help" > in contents pane, expand "SciTE4AutoIt3" > "Keyboard Shortcuts"1 point -
HREF tag syntax errors
SorryButImaNewbie reacted to Geir1983 for a topic
Yes, its the end of the html, but the problem here is not related to html, it is passing a variable to the object that is failing. A string variable is always between two " (or '), when he closes the string and then writes the <a> after it creates a syntax error.1 point -
GuiBuilderNxt - Reboot [08/18/2016]
mikell reacted to jaberwacky for a topic
A program called ByHand.exe.1 point -
Better say "11 - Crazy SmOke_N". Br, UEZ1 point
-
I may have found a solution for you. I played with your code for ages and couldn't get it to work. Then I did a search for "advapi32.dll" LogonUser and found http://www.autoitscript.com/forum/index.php?showtopic=14710 Try this out and see if it works for you. #include <WinAPI.au3> $test = _checkUserCredentials("user", "password") MsgBox(64, "Username/password Valid", $test) Func _checkUserCredentials($sUserName, $sPassword, $sServer = '.') $stToken = DllStructCreate("int") Local $aRet = DllCall("advapi32.dll", "int", "LogonUser", _ "str", $sUserName, _ "str", $sServer, _ "str", $sPassword, _ "dword", 2, _ "dword", 0, _ "ptr", DllStructGetPtr($stToken)) If Not @error And $aRet[0] <> 0 Then Return True EndIf Return False EndFunc ;==>_checkUserCredentials Keep on coding John Morrison1 point
-
This Script:- - Choose and open a gif file to view its color palette; - Hold left button down over square color sample on Color Palette GUI for tool tip. Tool tip displays color in 0xAARRGGBB format. If the AA part of that hexadecimal number is 00, then that color is transparent. So for that invisible color, what you see is the GUI (Graphical User Interface) color behind it. - The gif file opened, displays at the bottom right corner of desktop. This script does not open any other image file types apart from gif files. I tried and ran out of ideas. I am thinking now that gdi32.dll functions may be better suited to play with color palettes. I don't intent to find out. Other points of interest in script. (To my mind) - Using _WinAPI_PtInRect() function on an array of rectangle structures to check if mouse is over a particular area. Goes well with _WinAPI_GetMousePos() which returns an x, y structure which can be used as a parameter for _WinAPI_PtInRect(). - The GDIPlus_BrushSetSolidColor() wrapper for the GdipSetSolidFillColor export function in gdiplus.dll. Instead of creating and disposing of a brush, this wrapper/function changes the color of the one brush. - The Color Palette GUI has double buffering. The gif display GUI does not. Therefore, gif display graphics is easily erased by moving off screen, or covering it with another window. The GDIPlus curse. The double buffering is not my creation. The hex output of a gif file makes more sense to me now, having see its color palette. #include <GDIPlus.au3> #include <GUIConstantsEx.au3> ;ref http://www.autoitscript.com/forum/index.php?s=&showtopic=55443&view=findpost&p=420440 Opt('MustDeclareVars', 1) Opt("GUIOnEventMode", 1) Global $hGraphics, $iExit = 0, $aRect[257][2], $aData[267][6] Local $File,$hImage1,$hImage,$iImageWidth,$iImageHeight,$hBitmap,$nSize,$ColPal Local $hGraphic,$hGraphicGUI,$hBMPBuff,$hBrush Local $iX = 1, $iY = 1, $iWidth = 23, $iHeight = 23 Local $File = FileOpenDialog("Choose Image File", @MyDocumentsDir & "", "Images (*.gif;*.png;*.jpg;*.bmp)| All (*.*)") If $File <> "" Then _GDIPlus_Startup() $hImage1 = _GDIPlus_ImageLoadFromFile($File) $iImageWidth = _GDIPlus_ImageGetWidth($hImage1) $iImageHeight = _GDIPlus_ImageGetHeight($hImage1) $hBitmap = _GDIPlus_BitmapCreateFromFile($File) ; not necessary gif also woks with $hImage1 $hImage = _GDIPlus_BitmapCloneArea($hBitmap, 0, 0, $iImageWidth, $iImageHeight, $GDIP_PXF32ARGB) ;ConsoleWrite("$hImage " & Hex($hImage) & @CRLF) $nSize = GDIPlus_GetImagePaletteSize($hImage) ;ConsoleWrite("$nSize " & $nSize & @CRLF) ;----- Color Palette Structure --- Global Const $tagColorPalette = "int Flags;int Count;int Entries[256]" Local $tColorPalette = DllStructCreate($tagColorPalette) ;DllStructSetData($tColorPalette, "Flags", 0x0005) ;DllStructSetData($tColorPalette, "Count", 256) ;-----> End of Color Palette Structure --- ;ConsoleWrite("$tColorPalette,Flags Before = " & Hex(DllStructGetData($tColorPalette, "Flags")) & @CRLF) ;ConsoleWrite("$tColorPalette,Count Before = " & Hex(DllStructGetData($tColorPalette, "Count")) & @CRLF) $ColPal = GDIPlus_GetImagePalette($hImage, $tColorPalette, $nSize) ;ConsoleWrite("$tColorPalette,Flags After = " & Hex(DllStructGetData($tColorPalette, "Flags")) & @CRLF) ;ConsoleWrite("$tColorPalette,Count After = " & Hex(DllStructGetData($tColorPalette, "Count")) & @CRLF) ;Write colors in palette to console ;For $x = 1 To 5 ; 256 ; ConsoleWrite("Entries[" & $x & "] = " & Hex(DllStructGetData($tColorPalette, 3, $x)) & @CRLF) ;Next ;ConsoleWrite("=======" & @CRLF) Global $hGui = GUICreate($File, $iImageWidth, $iImageHeight, @DesktopWidth - $iImageWidth - 20, @DesktopHeight - $iImageHeight - 60) GUISetOnEvent($GUI_EVENT_CLOSE, "Quit") GUISetState() $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui) _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0) Global $hGuiPal = GUICreate("Color Palette", 400, 400, 10, 10) $aRect[0][0] = _WinAPI_GetWindowRect($hGuiPal) ; GUI rect struct GUISetOnEvent($GUI_EVENT_CLOSE, "Quit") GUISetOnEvent($GUI_EVENT_PRIMARYDOWN, "MouseDwn") GUISetOnEvent($GUI_EVENT_PRIMARYUP, "PrimMouseUp") GUISetState() ; Create Double Buffer, so the doesn't need to be repainted on PAINT-Event $hGraphicGUI = _GDIPlus_GraphicsCreateFromHWND($hGuiPal) $hBMPBuff = _GDIPlus_BitmapCreateFromGraphics(400, 400, $hGraphicGUI) $hGraphics = _GDIPlus_ImageGetGraphicsContext($hBMPBuff) ;End Double Buffer add-in 1 of 3 $hBrush = _GDIPlus_BrushCreateSolid(0xffffffff) ;Initialize Brush For $x = 1 To 256 $hBrush = GDIPlus_BrushSetSolidColor($hBrush, "0x" & Hex(DllStructGetData($tColorPalette, 3, $x))) _GDIPlus_GraphicsFillRect($hGraphics, $iX, $iY, $iWidth, $iHeight, $hBrush) $aRect[$x][0] = CreateRectStruct($iX, $iY, $iX + $iWidth, $iY + $iHeight) $aRect[$x][1] = "0x" & Hex(DllStructGetData($tColorPalette, 3, $x)) ; For ToolTip $iX += 25 If $iX >= (16 * 25) Then $iY += 25 $iX = 1 EndIf Next ; Create Double Buffer, so the doesn't need to be repainted on PAINT-Event GUIRegisterMsg(0xF, "MY_PAINT") _WinAPI_RedrawWindow($hGuiPal, 0, 0, 2);$RDW_INTERNALPAINT = 0x0002 from WindowsConstants.au3 ;End Double Buffer add-in 2 of 3 While $iExit = 0 Sleep(10) WEnd _GDIPlus_BrushDispose($hBrush) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_GraphicsDispose($hGraphicGUI) _GDIPlus_ImageDispose($hImage1) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() _WinAPI_DeleteObject($hBMPBuff) EndIf Exit ;GdipGetImagePaletteSize(GpImage *image, INT *size) ; http://msdn.microsoft.com/en-us/library/ms535385(VS.85).aspx ; Func GDIPlus_GetImagePaletteSize($hImage) Local $aResult, $res $aResult = DllCall($ghGDIPDll, "int", "GdipGetImagePaletteSize", "hwnd", $hImage, "int*", 0) _WinAPI_Check("GDIPlus_GetImagePaletteSize ", $aResult[0] <> 0, 3, True) ;ConsoleWrite("GDIPlus_GetImagePaletteSize" & @CRLF) ;For $x = 0 To UBound($aResult) - 1 ; ConsoleWrite("$aResult[" & $x & "] = " & $aResult[$x] & @CRLF) ;Next ;ConsoleWrite("=============" & @CRLF) Return $aResult[2] EndFunc ;==>GDIPlus_GetImagePaletteSize ;=========GDIPlus_GetImagePalette ============= ;Parameters: ;$hImage - [in] Handle to Image Object ;$ColorPalette - [out] Pointer to a ColorPalette structure that receives the palette. ;$Size - [in] Integer that specifies the size, in bytes, of the palette. ; - Call GdipGetImagePaletteSize function to determine the size. ; --------------------------------------------- ;ColorPalette Structure - The ColorPalette structure defines an array of colors that make up a color palette. ; The colors are 32-bit ARGB colors. ;Syntax - typedef struct {UINT Flags; UINT Count; ARGB Entries[1] } ColorPalette; ;Members - ; Flags - Combination of flags from the PaletteFlags enumeration. ; - PaletteFlagsHasAlpha = 0x0001, - Indicates that one or more of the palette entries contains ; alpha (transparency) information. ; - PaletteFlagsGrayScale = 0x0002, - Indicates that the palette contains only grayscale entries. ; - PaletteFlagsHalftone = 0x0004, - Indicates that the palette is the Microsoft Windows halftone palette. ; Count - Number of elements in the Entries array. ; Entries - Array of ARGB colors. ; GdipGetImagePalette(GpImage *image, ColorPalette *palette, INT size) ; Ref - http://msdn.microsoft.com/en-us/library/ms535384(VS.85).aspx ; Func GDIPlus_GetImagePalette($hImage, ByRef $ColorPalette, $Size) Local $aResult $aResult = DllCall($ghGDIPDll, "int", "GdipGetImagePalette", "hwnd", $hImage, _ "ptr", DllStructGetPtr($ColorPalette), "int", $Size) ;ConsoleWrite("GDIPlus_GetImagePalette" & @CRLF) ;For $x = 0 To UBound($aResult) - 1 ; ConsoleWrite("$aResult[" & $x & "] = " & $aResult[$x] & @CRLF) ;Next ;ConsoleWrite("=============" & @CRLF) _WinAPI_Check("GDIPlus_GetImagePalette ", $aResult[0] <> 0, 3, True) Return $aResult[2] EndFunc ;==>GDIPlus_GetImagePalette Func MouseDwn() $aRect[0][0] = _WinAPI_GetWindowRect($hGuiPal); Update $hGuiPal GUI Rect struct Local $tPoint = _WinAPI_GetMousePos() ; Desktop coordinates If _WinAPI_PtInRect($aRect[0][0], $tPoint) Then ; Check if mouse is over $hGuiPal GUI Do $tPoint = _WinAPI_GetMousePos(True, $hGuiPal); GUI coordinates For $x = 1 To 256 If _WinAPI_PtInRect($aRect[$x][0], $tPoint) Then TtipColor($x) EndIf Next Until $GUI_EVENT_PRIMARYUP EndIf EndFunc ;==>MouseDwn Func PrimMouseUp() ToolTip("") EndFunc ;==>PrimMouseUp ; TtColXY() Shows Tooltip With Colour, X & Y position of Cursor Func TtipColor($x) Local $aPos,$sColor,$iPosX,$iPosY $aPos = MouseGetPos() $sColor = "0x" & Hex(PixelGetColor($aPos[0], $aPos[1]), 6) $iPosX = ($aPos[0] - 100) * ($aPos[0] > @DesktopWidth * 0.90) + ($aPos[0] <= @DesktopWidth * 0.90) * ($aPos[0] + 3) $iPosY = ($aPos[1] - 30) * ($aPos[1] > @DesktopHeight * 0.96) + ($aPos[1] <= @DesktopHeight * 0.96) * ($aPos[1] + 3) ToolTip(" Number: " & $x & @CRLF & "Color is: " & $aRect[$x][1], $iPosX, $iPosY) Return EndFunc ;==>TtColXY Func CreateRectStruct($iLeft, $iTop, $iRight, $iBottom) Local $tRect $tRect = DllStructCreate("int Left;int Top;int Right;int Bottom") DllStructSetData($tRect, "Left", $iLeft) DllStructSetData($tRect, "Top", $iTop) DllStructSetData($tRect, "Right", $iRight) DllStructSetData($tRect, "Bottom", $iBottom) Return $tRect EndFunc ;==>CreateRectStruct Func Quit() $iExit = 1 EndFunc ;==>Quit ;===== GDIPlus_BrushSetSolidColor ====== ; Description : Sets a color of an existing brush ; GdipSetSolidFillColor(GpSolidFill *brush, ARGB color) ;Ref http://msdn.microsoft.com/en-us/library/ms534051(VS.85).aspx Func GDIPlus_BrushSetSolidColor($hBrush, $iARGB = 0xFF000000) Local $aResult $aResult = DllCall($ghGDIPDll, "int", "GdipSetSolidFillColor", "hwnd", $hBrush, "int", $iARGB) If @error Then Return SetError(@error, @extended, 0) ;For $x = 0 To UBound($aResult) - 1 ; ConsoleWrite("$aResult[" & $x & "] = " & $aResult[$x] & @CRLF) ;Next Return SetError($aResult[0], 0, $aResult[1]) EndFunc ;==>GDIPlus_BrushSetSolidColor ;Func to redraw the BMP on PAINT MSG Func MY_PAINT($hWnd, $msg, $wParam, $lParam) ; Check, if the GUI with the Graphic should be repainted If $hWnd = $hGuiPal Then $aRect[0][0] = _WinAPI_GetWindowRect($hGuiPal) _GDIPlus_GraphicsDrawImage($hGraphicGUI, $hBMPBuff, 0, 0) EndIf EndFunc ;==>MY_PAINT ;End Double Buffer add-in 3 of 3 This may help someone, somehow.1 point
-
How to check if current user has blank password in Windows
Michiel reacted to LarryDalooza for a topic
To check credentials use RunAs() to run a CMD at @SW_HIDE ... if it fails with blank password credentials then there must be a password... $err = RunAs(@UserName,@LogonDomain,"",2,"cmd /c","",@SW_HIDE) MsgBox(4096,"",$err & @LF & @error)1 point