Leaderboard
Popular Content
Showing content with the highest reputation on 04/29/2019 in all areas
-
I am proud to announce an UDF collection for FreeImage. The Library contains all functions of the 3.15.0.0-release (the documentaition is located here (PDF) ) If you need more informatin about the functions, you have to read the PDF since i did not include comments in the AU3-file. If you want to download it, click here: [uDF] FreeImage library Downloads: And now an example for resizing an image (it saves the resized image in a new file, e.g. image.png will be saved as image_rsz.png) #include <FreeImage.au3> _FreeImage_LoadDLL(@ScriptDir&"\FreeImage.dll") _FreeImage_Initialise() $sFile = "800x600.jpg" ; new sizes $width = 400 $height = 300 $FIF = _FreeImage_GetFileTypeU($sFile) If $FIF = $FIF_UNKNOWN Then $FIF = _FreeImage_GetFIFFromFilenameU($sFile) EndIf $hImage = _FreeImage_LoadU($FIF, $sFile) $hImageResized = _FreeImage_Rescale($hImage, $width, $height, $FILTER_LANCZOS3) $dot = StringInStr($sFile,".",1,-1) $Name = StringLeft($sFile,$dot-1) $Ext = StringMid($sFile,$dot) _FreeImage_SaveU($FIF, $hImageResized, $Name &"_rsz"&$Ext) _FreeImage_Unload($hImage) _FreeImage_Unload($hImageResized) _FreeImage_DeInitialise()</div>And an other example for Flip and Rotate: #include <FreeImage.au3> Global $ImageHandle=-1, $WorkingFileName, $FIF _FreeImage_LoadDLL(@ScriptDir&"\FreeImage.dll") _FreeImage_Initialise() Func OnAutoItExit() If $ImageHandle <>-1 Then _FreeImage_Unload($ImageHandle) _FreeImage_DeInitialise() EndFunc GUICreate("FreeImage Test GUI",800,700) $ShowPic = GUICtrlCreatePic("",0,0, 800,600) $btnOpen = GUICtrlCreateButton("Choose File", 10, 610, 100, 30) GUICtrlSetTip(-1,"Only a copy of the image will be used") $btnFlipH = GUICtrlCreateButton("Flip Horizontal", 120, 610, 100, 30) $btnFlipV = GUICtrlCreateButton("Flip Vertical", 230, 610, 100, 30) $btnRotate = GUICtrlCreateButton("Rotate ...", 340, 610, 100, 30) GUISetState() While 1 Switch GUIGetMsg() Case -3 Exit Case $btnOpen _OpenImage() Case $btnFlipH If $ImageHandle <> -1 Then _FreeImage_FlipHorizontal($ImageHandle) _FreeImage_SaveU($FIF, $ImageHandle, $WorkingFileName) _ShowImage() EndIf Case $btnFlipV If $ImageHandle <> -1 Then _FreeImage_FlipVertical($ImageHandle) _FreeImage_SaveU($FIF, $ImageHandle, $WorkingFileName) _ShowImage() EndIf Case $btnRotate If $ImageHandle <> -1 Then $hImageNew = _FreeImage_RotateClassic($ImageHandle, Number(InputBox("Rotate", "angle for rotation", 90))) _FreeImage_SaveU($FIF, $hImageNew, $WorkingFileName) _FreeImage_Unload($ImageHandle) $ImageHandle = $hImageNew _ShowImage() EndIf EndSwitch WEnd Func _OpenImage() Local $sFile = FileOpenDialog("Choose Image","", "Image Files (*.jpg;*.jpeg;*.bmp;*.gif)", 3) If @error Then Return If $ImageHandle <> -1 Then _FreeImage_Unload($ImageHandle) Local $dot = StringInStr($sFile,".",1,-1) Local $Name = StringLeft($sFile,$dot-1) Local $Ext = StringMid($sFile,$dot) $WorkingFileName = $Name &"_FI4AU3"&$Ext FileCopy($sFile,$WorkingFileName) $FIF = _FreeImage_GetFileTypeU($WorkingFileName) If $FIF = $FIF_UNKNOWN Then $FIF = _FreeImage_GetFIFFromFilenameU($WorkingFileName) EndIf $ImageHandle = _FreeImage_LoadU($FIF, $sFile) _ShowImage() EndFunc Func _ShowImage() Local $Width, $Height _SizeProportional($Width, $Height, 800, 600, _FreeImage_GetWidth($ImageHandle), _FreeImage_GetHeight($ImageHandle)) GUICtrlSetPos($ShowPic,0,0,$Width, $Height) GUICtrlSetImage($ShowPic, $WorkingFileName) EndFunc Func _SizeProportional(ByRef $Width, ByRef $Height, $WDesired, $HDesired, $WSrc, $HSrc) ; Prog@ndy Local $RatioDes = ($WDesired / $HDesired) Local $CurrentRatio = ($WSrc / $HSrc) If $CurrentRatio > $RatioDes Then ; scale height $Width = $WDesired $Height = $WDesired / $CurrentRatio Else ; scale width $Width = $HDesired * $CurrentRatio $Height = $HDesired EndIf EndFunc ;==>_SizeProportional1 point
-
You can use the id of the tab directly with something like this : $oTag = _IEGetObjById ($oIE, "ctl00_MainContent_ucViewControl_IntegratedFedWatchTool_uccv_lvMeetings_ctrl1_lbMeeting") _IEAction ($oTag, "click") _IELoadWait ($oIE) Each tab has its own number if you look carefully the ids...1 point
-
process XML file
FrancescoDiMuro reacted to mikell for a topic
For the fun... #Include <Array.au3> $txt = '<eta xmlns="http://www.eta.co.at/rest/v1" version="1.0">' & @crlf & _ ' <errors uri="/user/errors/121/10441">' & @crlf & _ ' <fub uri="/121/10441" name="Raum 1.1">' & @crlf & _ ' <error msg="Sicherung VE-C 0 (angeschlossen an GM-C 1) - F1 Zuleitung" priority="Fehler" time="2019-04-18 12:36:02">' & @crlf & _ ' Sicherung am Ventilcontroller 0 defekt oder keine 230VAC-Spannungsversorgung' & @crlf & _ ' </error>' & @crlf & _ ' </fub>' & @crlf & _ ' </errors>' & @crlf & _ '</eta>' ; Msgbox(0,"", $txt) $res = StringRegExp($txt, '(?|(?:name|msg|priority|time)="([^"]*)|(?m)^\h*([^<]+?)$)', 3) _ArrayDisplay($res)1 point -
After a run command its allways more robust to use winexists winwaitactive winactive winactivate before proceding with other code. Sleep is sometimes needed to give your gui some time to draw.1 point
-
#NoTrayIcon Opt("WinTitleMatchMode", 2) $url = "https://google.com" ;Edge starten Run(@ComSpec & " /c start microsoft-edge:" & $url ,"",@SW_HIDE) ;Edge Vollbild Do Until sleep(10) And WinActive("- Microsoft Edge") sleep(250) Send("^!{F4}") Does this help at all?1 point
-
Hello. Check this. https://www.autoitscript.com/forum/topic/191990-webdriver-udf-w3c-compliant-version-4232019 Saludos1 point
-
Hi guys! Itยดs update time again! ISN AutoIt Studio version 1.09 is online! A special thanks for beta testing this time goes to the user @Rex ! ๐ Happy testing, and as always: Feedback desired ๐ Changelog (translated with google):1 point
-
Attached is what I use, successfully. I see that I got at least one of the files (probably the .au3) from a post by a forum member called lczer AutoIt FreeImage 3_15_0_0 x86x64 lczer.zip1 point
-
Here FreeImage_GetMemorySize() function (its only for 3.17+ versions - 3.15. dont have it - see FreeImage3170.pdf) to update dll-version info on-the-fly some corrections to UDF are needed (also updated version of UDF uploaded): Global $FREEIMAGE_MAJOR_VERSION = 0 Global $FREEIMAGE_MINOR_VERSION = 0 Global $FREEIMAGE_RELEASE_SERIAL = 0 ;------------------------------------------------------------------------------------------ Func _FreeImage_GetVersion() ;Author: Prog@ndy Local $result = DllCall($__g_hFREEIMAGEDLL, "str", (($b___FeeImageIsx64)?("FreeImage_GetVersion"):("_FreeImage_GetVersion@0"))) If @error Then Return SetError(1, @error, "") Local $aVersion = StringRegExp($result[0],"(\d+)",3) If @error Then Return SetError(1, @error, "") $FREEIMAGE_MAJOR_VERSION = $aVersion[0] $FREEIMAGE_MINOR_VERSION = $aVersion[1] $FREEIMAGE_RELEASE_SERIAL = $aVersion[2] Return $result[0] EndFunc ;==>_FreeImage_GetVersion ;------------------------------------------------------------------------------------------ ;~ DLL_API unsigned DLL_CALLCONV FreeImage_GetMemorySize(FIBITMAP *dib); Func _FreeImage_GetMemorySize($pDIB) ;Author: Prog@ndy Local $result = DllCall($__g_hFREEIMAGEDLL, "uint", (($b___FeeImageIsx64)?("FreeImage_GetMemorySize"):("_FreeImage_GetMemorySize@4")), $lpFIBITMAP, $pDIB) If @error Then Return SetError(1, @error, 0) Return $result[0] EndFunc ;==>_FreeImage_GetMemorySize ;------------------------------------------------------------------------------------------ FreeImage_x86x64.au31 point
-
#AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 Opt("MustDeclareVars", 1) #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <GuiStatusbar.au3> #include <Constants.au3> Global Const $tagNMLVCUSTOMDRAW = "hwnd hWndFrom;int IDFrom;int Code;dword dwDrawStage;hwnd hdc;int Left;int Top;int Right;int Bottom;" & _ "dword dwItemSpec;uint uItemState;long lItemlParam;int clrText;int clrTextBk;int iSubItem;dword dwItemType;int clrFace;int iIconEffect;" & _ "int iIconPhase;int iPartId;int iStateId;int TextLeft;int TextTop;int TextRight;int TextBottom;uint uAlign" Global Const $WM_LBUTTONUP = 0x202 Global Const $WM_MOUSEMOVE = 0x200 Global Const $CDDS_PREPAINT = 0x00000001 Global Const $CDDS_ITEMPREPAINT = 0x00010001 Global Const $CDRF_NEWFONT = 0x00000002 Global Const $CDRF_NOTIFYITEMDRAW = 0x00000020 #region Globals ************************************************************************* Global $hDragImageList, $h_ListView, $bDragging = False, $LV_Height, $StatusBar1 Global $a_index[2] ; from and to Global Const $DebugIt = 1 #endregion End Global variables Opt("WinTitleMatchMode", 2) _TestDragItemWithImages() Func _TestDragItemWithImages() Local Const $image_width = 20 Local Const $image_height = 20 Local $h_images, $main_GUI, $iIndex $main_GUI = GUICreate("GuiRegisterMsg Test", 225, 400) $h_ListView = _GUICtrlListView_Create($main_GUI, "Entry Name|Category", 5, 75, 220, 280, -1, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) $LV_Height = 280 - 75 _GUICtrlListView_SetColumnWidth($h_ListView, 0, 100) _GUICtrlListView_SetColumnWidth($h_ListView, 1, 100) _GUICtrlListView_SetExtendedListViewStyle($h_ListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES)) ;------------------------------------------------------ ; Using subitem images ;------------------------------------------------------ _GUICtrlListView_SetExtendedListViewStyle($h_ListView, BitOR($LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_SUBITEMIMAGES)) $h_images = _GUIImageList_Create($image_width, $image_height, 5, 1) For $x = 1 To 21 _GUIImageList_AddIcon($h_images, @SystemDir & "\shell32.dll", $x) Next _GUICtrlListView_SetImageList($h_ListView, $h_images, $LVSIL_SMALL) ;Register WM_NOTIFY events GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUIRegisterMsg($WM_LBUTTONUP, "WM_LBUTTONUP") GUIRegisterMsg($WM_MOUSEMOVE, "WM_MOUSEMOVE") GUIRegisterMsg($WM_SIZE, "WM_SIZE") ;------------------------------------------------------ Local $y = 1 For $x = 0 To 9 $iIndex = _GUICtrlListView_AddItem($h_ListView, "Name " & $x + 1, $y) ; handle, string, image index _GUICtrlListView_AddSubItem($h_ListView, $iIndex, "Category " & $x + 1, 1, $y + 1) ; handle, index, string, subitem, image index $y += 2 Next GUISetState() While 1 Switch GUIGetMsg() ;----------------------------------------------------------------------------------------- ;This case statement exits and updates code if needed Case $GUI_EVENT_CLOSE ExitLoop ;----------------------------------------------------------------------------------------- ;put all the misc. stuff here Case Else ;;; EndSwitch WEnd ;------------------------------------------------------ ;------------------------------------------------------ ;------------------------------------------------------ _GUIImageList_Destroy($h_images) ;------------------------------------------------------ ;------------------------------------------------------ ;------------------------------------------------------ GUIDelete() EndFunc ;==>_TestDragItemWithImages ;~ #region Item Function(s) ********************************************************************************************** Func _LVInsertItem($i_FromItem, $i_ToItem) Local $struct_LVITEM = DllStructCreate($tagLVITEM) If @error Then Return SetError(-1, -1, -1) Local $struct_String = DllStructCreate("char Buffer[4096]") If @error Then Return SetError(-1, -1, -1) Local $sBuffer_pointer = DllStructGetPtr($struct_String) DllStructSetData($struct_LVITEM, "Mask", BitOR($LVIF_STATE, $LVIF_IMAGE, $LVIF_INDENT, $LVIF_PARAM, $LVIF_TEXT)) DllStructSetData($struct_LVITEM, "StateMask", $LVIS_STATEIMAGEMASK) DllStructSetData($struct_LVITEM, "Item", $i_FromItem) DllStructSetData($struct_LVITEM, "SubItem", 0) DllStructSetData($struct_LVITEM, "TextMax", 4096) DllStructSetData($struct_LVITEM, "Text", $sBuffer_pointer) _GUICtrlListView_GetItemEx($h_ListView, $struct_LVITEM) If @error Then Return SetError(-1, -1, -1) Local $item_state = DllStructGetData($struct_LVITEM, "State") DllStructSetData($struct_LVITEM, "Item", $i_ToItem) Local $i_newIndex = _GUICtrlListView_InsertItem($h_ListView, DllStructGetData($struct_String, "Buffer"), $i_ToItem, DllStructGetData($struct_LVITEM, "Image")) If @error Then Return SetError(-1, -1, -1) If $DebugIt Then _DebugPrint("$i_newIndex = " & $i_newIndex) DllStructSetData($struct_LVITEM, "Mask", $LVIF_STATE) DllStructSetData($struct_LVITEM, "Item", $i_newIndex) DllStructSetData($struct_LVITEM, "State", $item_state) DllStructSetData($struct_LVITEM, "StateMask", $LVIS_STATEIMAGEMASK) _GUICtrlListView_SetItemState($h_ListView, $i_newIndex, $item_state, $LVIS_STATEIMAGEMASK) If @error Then Return SetError(-1, -1, -1) Return $i_newIndex EndFunc ;==>_LVInsertItem Func _LVCopyItem($i_FromItem, $i_ToItem, $i_SubItem = 0) Local $struct_LVITEM = DllStructCreate($tagLVITEM) Local $struct_String = DllStructCreate("char Buffer[4096]") Local $sBuffer_pointer = DllStructGetPtr($struct_String) ; get from item info DllStructSetData($struct_LVITEM, "Mask", BitOR($LVIF_STATE, $LVIF_IMAGE, $LVIF_INDENT, $LVIF_PARAM, $LVIF_TEXT)) DllStructSetData($struct_LVITEM, "StateMask", $LVIS_STATEIMAGEMASK) DllStructSetData($struct_LVITEM, "Item", $i_FromItem) DllStructSetData($struct_LVITEM, "SubItem", $i_SubItem) DllStructSetData($struct_LVITEM, "TextMax", 4096) DllStructSetData($struct_LVITEM, "Text", $sBuffer_pointer) _GUICtrlListView_GetItemEx($h_ListView, $struct_LVITEM) ; set to DllStructSetData($struct_LVITEM, "Item", $i_ToItem) ; set text DllStructSetData($struct_LVITEM, "Mask", $LVIF_TEXT) DllStructSetData($struct_LVITEM, "Text", $sBuffer_pointer) DllStructSetData($struct_LVITEM, "TextMax", 4096) _GUICtrlListView_SetItemEx($h_ListView, $struct_LVITEM) If @error Then Return SetError(@error, @error, @error) ; set status DllStructSetData($struct_LVITEM, "Mask", $LVIF_STATE) _GUICtrlListView_SetItemEx($h_ListView, $struct_LVITEM) ; set image DllStructSetData($struct_LVITEM, "Mask", $LVIF_IMAGE) DllStructSetData($struct_LVITEM, "State", $LVIF_IMAGE) _GUICtrlListView_SetItemEx($h_ListView, $struct_LVITEM) ; set state DllStructSetData($struct_LVITEM, "Mask", $LVIF_STATE) DllStructSetData($struct_LVITEM, "State", $LVIF_STATE) _GUICtrlListView_SetItemEx($h_ListView, $struct_LVITEM) ; set indent DllStructSetData($struct_LVITEM, "Mask", $LVIF_INDENT) DllStructSetData($struct_LVITEM, "State", $LVIF_INDENT) _GUICtrlListView_SetItemEx($h_ListView, $struct_LVITEM) ; set Param DllStructSetData($struct_LVITEM, "Mask", $LVIF_PARAM) DllStructSetData($struct_LVITEM, "State", $LVIF_PARAM) _GUICtrlListView_SetItemEx($h_ListView, $struct_LVITEM) EndFunc ;==>_LVCopyItem #endregion Item Function(s) ******************************************************************************************* #region Event Function(s) ********************************************************************************************** ;------------------------------------------------------ ;------------------------------------------------------ ;------------------------------------------------------ Func WM_SIZE() _GUICtrlStatusBar_Resize($StatusBar1) Return $GUI_RUNDEFMSG EndFunc ;==>WM_SIZE ;------------------------------------------------------ ;------------------------------------------------------ ;------------------------------------------------------ Func ListView_Click() ;---------------------------------------------------------------------------------------------- If $DebugIt Then _DebugPrint("$NM_CLICK") _GUICtrlStatusBar_SetText($StatusBar1, "$NM_CLICK: " & _GUICtrlListView_GetItemText($h_ListView, Int(_GUICtrlListView_GetSelectedIndices($h_ListView))), $SB_SIMPLEID) EndIf ;---------------------------------------------------------------------------------------------- EndFunc ;==>ListView_Click ;------------------------------------------------------ ;------------------------------------------------------ ;------------------------------------------------------ Func ListView_DoubleClick() ;---------------------------------------------------------------------------------------------- If $DebugIt Then _DebugPrint("$NM_DBLCLK") _GUICtrlStatusBar_SetText($StatusBar1, "$NM_DBLCLK: " & _GUICtrlListView_GetItemText($h_ListView, Int(_GUICtrlListView_GetSelectedIndices($h_ListView))), $SB_SIMPLEID) EndIf ;---------------------------------------------------------------------------------------------- ;~ MsgBox(0, "Double Clicked", _GUICtrlListView_GetItemText($h_ListView, _GUICtrlListView_GetSelectedIndices($h_ListView))) EndFunc ;==>ListView_DoubleClick ;------------------------------------------------------ ;------------------------------------------------------ ;------------------------------------------------------ Func WM_MOUSEMOVE($hWndGUI, $MsgID, $wParam, $lParam) #forceref $MsgID, $wParam If $bDragging = False Then Return $GUI_RUNDEFMSG Local $lpos = ControlGetPos($hWndGUI, "", $h_ListView) Local $x = BitAND($lParam, 0xFFFF) - $lpos[0] Local $y = BitShift($lParam, 16) - $lpos[1] If $y > $LV_Height - 20 Then _GUICtrlListView_Scroll($h_ListView, 0, $y) ElseIf $y < 20 Then _GUICtrlListView_Scroll($h_ListView, 0, $y * - 1) EndIf _GUIImageList_DragMove($x, $y) Return $GUI_RUNDEFMSG EndFunc ;==>WM_MOUSEMOVE ;------------------------------------------------------ ;------------------------------------------------------ ;------------------------------------------------------ Func WM_LBUTTONUP($hWndGUI, $MsgID, $wParam, $lParam) #forceref $MsgID, $wParam $bDragging = False Local $lpos = ControlGetPos($hWndGUI, "", $h_ListView) Local $x = BitAND($lParam, 0xFFFF) - $lpos[0] Local $y = BitShift($lParam, 16) - $lpos[1] If $DebugIt Then _DebugPrint("$x = " & $x) If $DebugIt Then _DebugPrint("$y = " & $y) _GUIImageList_DragLeave($h_ListView) _GUIImageList_EndDrag() _GUIImageList_Destroy($hDragImageList[0]) _WinAPI_ReleaseCapture() Local $struct_LVHITTESTINFO = DllStructCreate($tagLVHITTESTINFO) DllStructSetData($struct_LVHITTESTINFO, "X", $x) DllStructSetData($struct_LVHITTESTINFO, "Y", $y) $a_index[1] = _SendMessage($h_ListView, $LVM_HITTEST, 0, DllStructGetPtr($struct_LVHITTESTINFO), 0, "wparam", "ptr") Local $flags = DllStructGetData($struct_LVHITTESTINFO, "Flags") If $DebugIt Then _DebugPrint("$flags: " & $flags) ;~ // Out of the ListView? If $a_index[1] == -1 Then Return $GUI_RUNDEFMSG ;~ // Not in an item? If BitAND($flags, $LVHT_ONITEMLABEL) == 0 And BitAND($flags, $LVHT_ONITEMSTATEICON) == 0 And BitAND($flags, $LVHT_ONITEMICON) = 0 Then Return $GUI_RUNDEFMSG If $a_index[0] < $a_index[1] - 1 Or $a_index[0] > $a_index[1] + 1 Then ; make sure insert is at least 2 items above or below, don't want to create a duplicate If $DebugIt Then _DebugPrint("To = " & $a_index[1]) Local $i_newIndex = _LVInsertItem($a_index[0], $a_index[1]) If @error Then Return SetError(-1, -1, $GUI_RUNDEFMSG) Local $From_index = $a_index[0] If $a_index[0] > $a_index[1] Then $From_index = $a_index[0] + 1 For $x = 1 To _GUICtrlListView_GetColumnCount($h_ListView) - 1 _LVCopyItem($From_index, $i_newIndex, $x) If @error Then Return SetError(-1, -1, $GUI_RUNDEFMSG) Next _GUICtrlListView_DeleteItem($h_ListView, $From_index) EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_LBUTTONUP ; ; WM_NOTIFY event handler Func WM_NOTIFY($hWndGUI, $MsgID, $wParam, $lParam) #forceref $hWndGUI, $MsgID, $wParam Local $tNMHDR, $code, $x, $y, $tNMLISTVIEW, $hwndFrom, $tDraw, $dwDrawStage, $dwItemSpec $tNMHDR = DllStructCreate($tagNMHDR, $lParam) ;NMHDR (hwndFrom, idFrom, code) If @error Then Return $code = DllStructGetData($tNMHDR, "Code") $hwndFrom = DllStructGetData($tNMHDR, "hWndFrom") Switch $hwndFrom Case $h_ListView Switch $code Case $LVN_BEGINDRAG If $DebugIt Then _DebugPrint("$LVN_BEGINDRAG") $x = BitAND($lParam, 0xFFFF) $y = BitShift($lParam, 16) $tNMLISTVIEW = DllStructCreate($tagNMLISTVIEW, $lParam) $a_index[0] = DllStructGetData($tNMLISTVIEW, "Item") $hDragImageList = _GUICtrlListView_CreateDragImage($h_ListView, $a_index[0]) If @error Then Return SetError(-1, -1, $GUI_RUNDEFMSG) _GUIImageList_BeginDrag($hDragImageList[0], 0, 0, 0) If @error Then Return SetError(-1, -1, $GUI_RUNDEFMSG) If $DebugIt Then _DebugPrint("From = " & $a_index[0]) _GUIImageList_DragEnter($h_ListView, $x, $y) _WinAPI_SetCapture($hWndGUI) $bDragging = True Case $NM_CUSTOMDRAW If $DebugIt Then _DebugPrint("$NM_CUSTOMDRAW") $tDraw = DllStructCreate($tagNMLVCUSTOMDRAW, $lParam) $dwDrawStage = DllStructGetData($tDraw, "dwDrawStage") $dwItemSpec = DllStructGetData($tDraw, "dwItemSpec") Switch $dwDrawStage Case $CDDS_PREPAINT If $DebugIt Then _DebugPrint("$CDDS_PREPAINT") Return $CDRF_NOTIFYITEMDRAW Case $CDDS_ITEMPREPAINT If $DebugIt Then _DebugPrint("$CDDS_ITEMPREPAINT") If BitAND($dwItemSpec, 1) = 1 Then DllStructSetData($tDraw, "clrTextBk", $CLR_AQUA) Else DllStructSetData($tDraw, "clrTextBk", $CLR_WHITE) EndIf Return $CDRF_NEWFONT EndSwitch EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY #endregion Event Function(s) *********************************************************************************************** Func _DebugPrint($s_text) $s_text = StringReplace($s_text, @LF, @LF & "-->") ConsoleWrite("!===========================================================" & @LF & _ "+===========================================================" & @LF & _ "-->" & $s_text & @LF & _ "+===========================================================" & @LF) EndFunc ;==>_DebugPrint1 point
-
This isn't CAPTCHA, it's an html file that generates two random numbers from 0-9. Unfortunatelly i can't share this link since it's supposed to be used only for employees of workplace im in.0 points