Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/09/2021 in all areas

  1. Trong

    Image Search UDF

    Version 2021.8.30.2

    10,231 downloads

    Use MouseClick() need: #RequireAdmin Dll is already integrated in UDF ! ; #INDEX# =============================================================== ; Title .........: ImageSearch ; AutoIt Version : 3.x ; Language ......: English ; Description ...: Check image Appears or Not and Return the position of an image on the desktop ; Author(s) .....: Dao Van Trong - TRONG.LIVE ; ======================================================================= ; #CURRENT# ============================================================= ; _ImageSearch ; _ImageSearch_Area ; _ImageSearch_Wait ; _ImageSearch_WaitArea ; ======================================================================== ;========================================================================= ; ; Author:...........: AutoIT VietNam : Dao Van Trong - TRONG.LIVE ; Description:......: Check image Appears or Not ; Find and return the position of an image on the desktop ; Syntax:........... _ImageSearch_Area, _ImageSearch ; Parameter(s):..... $_ImagePath: The image to locate on the desktop ; May be a list of image by delimited by "|" ; i.e: $_ImagePath = "image1.bmp|image2.bmp|image3.bmp" ; $P_x1 $P_y1: Position of 1st point ; $P_x2 $P_y2: Position of 2nd point - Default is last botton right of desktop ; $_Tolerance: 0 for no tolerance (0-255). Needed when colors of image differ from desktop. e.g GIF ; $_CenterPos: boolen. True will return $array[1] x $array[2] is center of image found. ; False will return top-left position ; Return Value(s):.. Return an array has 3 item ; On Success: $array[0] 1 ; On Failure: $array[0] 0 ; DLL not found or other error: $array[0] -1 ; $array[1] x $array[2]: position of image what found on desktop ; ; Note:............. Use _ImageSearch to search the entire desktop ; _ImageSearch_Area to specify a desktop region to search ; $_ImagePath with more item need more time appear on screen before function can detect. ; Decrease sleep time in the loop to detect faster. But less performance. I.e CPULoad increased ; ;======================================================================== EG 1: ;~ Opt("MustDeclareVars", 1) ;~ #AutoIt3Wrapper_UseX64=y ;~ #AutoIt3Wrapper_Change2CUI=y #RequireAdmin #include "_ImageSearch_UDF.au3" HotKeySet("{Esc}", "_Exit") ; Press ESC for exit Func _Exit() Exit 0 EndFunc ;==>_Exit Global Const $Ask_On_Found = 0 Global Const $Mouse_Move_On_Found = 1 Global Const $Mouse_Click_On_Found = 0 Global Const $iSleep_Time=500 Global $sCount = 0, $_Image_1 = @ScriptDir & "\example.bmp" ; First, use this function to create a file bmp, maybe a desktop icon for example') MsgBox(64 + 262144, 'ImageSearch', 'At first, create a file bmp,' & @CRLF & 'photos that will search on the screen!') _ImageSearch_Create_BMP($_Image_1) ConsoleWrite("! Search for images: " & $_Image_1 & @CRLF & '! Searching on the screen ...' & @CRLF) While 1 ToolTip('(Press ESC for EXIT) Searching ...', 1, 1) Sleep($iSleep_Time) $sCount += 1 Local $return = _ImageSearch($_Image_1) If $return[0] = 1 Then ConsoleWrite('- [' & $sCount & '] Image found:' & " X=" & $return[1] & " Y=" & $return[2] & @CRLF) If $Mouse_Move_On_Found Then MouseMove($return[1], $return[2]) Sleep($iSleep_Time) EndIf If $Mouse_Click_On_Found Then MouseClick("left", $return[1], $return[2]) ToolTip('(Press ESC for EXIT) - [' & $sCount & "] Image found:" & " X=" & $return[1] & " Y=" & $return[2], 1, 1) If $Ask_On_Found Then Local $ask = MsgBox(6 + 262144, 'Success [' & $sCount & ']', 'Image found:' & " X=" & $return[1] & " Y=" & $return[2]) If $ask = 2 Or $ask = 3 Or $ask = 5 Or $ask = 7 Then Exit ;No, Abort, Cancel, and Ignore If $ask = 10 Then _ImageSearch_Create_BMP($_Image_1) ; Continue ;Try Again EndIf EndIf Sleep(200) WEnd Video demo: [+] When any problem or error occurs, please make sure that:- Downloaded and used the latest version.- Set screen Screen Scale and layout = 100%- Installed display driver.- Tried turning off the antivirus- Full installation: Microsoft Visual C++ Redistributable 2005->2022 [+] You can download the AIO version of the Visual C++ Redistributable here: -> https://www.mediafire.com/file/0ak8dcj9mdn7nyq/VisualCppRedist_AIO_2005-2022_x86_x64_%5Btrong.live%5D.zip/file -> FOR Windows XP: https://www.mediafire.com/file/5m5lnr1kfg73tc9/VisualCppRedist_AIO_2005-2019_x86_XP_%5Btrong.live%5D.zip/file <!> Password for Extract: trong.live [+] The last full version of SCITE4AutoIT supports windows XP: https://www.autoitscript.com/autoit3/scite/download/archive/v19.1127.1402.0-SciTE4AutoIt3.exe
    1 point
  2. Hi Norm73 It's not obvious to have both options (your combo "Scroll" and "Filter") in the same script, because it may require to work on different sub-arrays when you choose each option. Also the fact that we can sort on a column while searching in another column makes it hard too. Plus this "All" option in the Combo, all these permanent and temporary indexes etc... LarsJ himself splitted both options in 2 separate scripts (which were both very inspiring), named : 1) Incremental text search.au3 2) Show matching rows only A couple of days ago, I ended a script (named "2s") mixing both options as you will see below, but it still requires some testing. I didn't want to post it because it will be a bit hard to maintain and my health isn't going really well (eyes, ears... you name it) so I won't come on the Forum as frequently as I used to, Times are changing, unfortunately... Anyway, in case it may help you (or other users) here is the most interesting functionality in this version (a context menu allowing to display only matching rows, or all rows) . Pics being better than words : The context menu option "Right-click Headers" is checkable too. When checked, it allows to switch quickly from a search column to another. Now the full script "2s" : #include <ComboConstants.au3> #include <EditConstants.au3> #include <GuiListView.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include "RandomArray.au3" ; LarsJ #include "DrawItem.au3" ; " Opt("MustDeclareVars", 1) Global $g_iRows = 1000, $g_iCols = 6, $g_hGui, $g_hListView, $g_hHeader, $g_hEdit Global $g_aCols = ["Strings", "Integers", "Floats", "Dates", "Times", "R/C"], $g_aWidths = [230, 61, 124, 70, 60, 60] Global $g_aColAligns[$g_iCols] = [2, 1, 1, 1, 1, 1] ; $HDF_LEFT = 0, $HDF_RIGHT = 1, $HDF_CENTER = 2 Global $g_idListView, $g_idMarker, $g_idComboCol, $g_idComboColDummy, $g_idEditDummy Global $g_sSearch, $g_iSearchCol, $g_iSortDir, $g_iSearch = $g_iRows, $g_iLvItem = -1 Global $g_aArray, $g_aSubArray, $g_aSubArray2, $g_tDefaultIndex, $g_tIndex = DllStructCreate("uint arr[" & $g_iRows & "]") Global $g_aIndex[$g_iCols], $g_aIndexTemp[$g_iCols] ; VarGetType's : $g_aIndex => "Array", $g_aIndex[0] => "String" Global $g_idContextDummy, $g_hContextmenu, $g_iItem = -1, $g_iSubItem = -1, $g_bShowAllRows = False, $g_bRightClickHeaders = True Global $fListViewHasFocus = 1 ; trying this for now, we'll see... Example() Func Example() ; Generate array & one index _Generate_All($g_aArray) $g_aSubArray = $g_aArray $g_aSubArray2 = $g_aArray $g_tDefaultIndex = $g_tIndex ; Compute LV_Height based on 40 full visible rows, no additional vertical pixel. Local $iLV_Height = _ComputeLV_Height(40) ; only 1 param => LV got headers & border ConsoleWrite("Computed LV height = " & $iLV_Height & " pixels" & @crlf) ; Create GUI $g_hGui = GUICreate("Virtual ListView + Incr. Search + Show matching or All rows (2s)", 630 + 20, $iLV_Height + 30 + 20) ; Create Edit control (search) + dummy control Local $idEdit = GUICtrlCreateEdit("", 120, 10, 182, 20, BitXOR($GUI_SS_DEFAULT_EDIT, $WS_HSCROLL, $WS_VSCROLL)) $g_hEdit = GUICtrlGetHandle($idEdit) $g_idEditDummy = GUICtrlCreateDummy() ; Create 2 Search Buttons (Prev / Next) & 2 Accelerator Keys (F3 / Shift+F3) Local $idPrev = GUICtrlCreateButton("Prev", 312, 10, 50, 20) Local $idNext = GUICtrlCreateButton("Next", 370, 10, 50, 20) GUICtrlSetState($idPrev, $GUI_DISABLE) GUICtrlSetState($idNext, $GUI_DISABLE) Local $aAccelKeys[2][2] = [ [ "{F3}", $idNext ], [ "+{F3}", $idPrev ] ] GUISetAccelerators($aAccelKeys) ; Create ComboBox control (how to search : RegEx or Normal ?) Local $idSearchHow = GUICtrlCreateCombo("RegEx search", 11, 9, 100, 20, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_DROPDOWNLIST)) Local $sSearchHow = "RegEx search", $sSearchHowPrev = $sSearchHow ; default way of searching (changeable) GUICtrlSetData($idSearchHow, "Normal search", $sSearchHow) ; Create ComboBox control (column where to search) + dummy control GUICtrlCreateLabel("Col", 429, 10, 20, 20, BitOR($SS_CENTERIMAGE, $SS_CENTER)) $g_idComboCol = GUICtrlCreateCombo("0", 452, 9, 41, 20, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_DROPDOWNLIST)) $g_iSearchCol = 0 ; default column where to search (changeable) Local $iSearchColPrev = $g_iSearchCol For $i = 1 To $g_iCols - 1 GUICtrlSetData($g_idComboCol, $i & "|", $g_iSearchCol) Next $g_idComboColDummy = GUICtrlCreateDummy() ; Create Label control (number of matching results) Local $idResult = GUICtrlCreateLabel(" " & $g_iRows & " rows (no pattern)", 501, 10, 135, 20, BitOR($SS_CENTERIMAGE, $SS_SUNKEN)) ; Create ListView $g_idListView = GUICtrlCreateListView("", 10, 40, 630, $iLV_Height, BitOr($GUI_SS_DEFAULT_LISTVIEW, $LVS_OWNERDATA, $LVS_OWNERDRAWFIXED), $WS_EX_CLIENTEDGE) _GUICtrlListView_SetExtendedListViewStyle($g_idListView, BitOr($LVS_EX_DOUBLEBUFFER, $LVS_EX_FULLROWSELECT)) $g_hListView = GUICtrlGetHandle($g_idListView) $g_hHeader = _GUICtrlListView_GetHeader($g_idListView) For $i = 0 To $g_iCols - 1 _GUICtrlListView_AddColumn($g_idListView, $g_aCols[$i], $g_aWidths[$i]) _GUICtrlHeader_SetItemFormat($g_hHeader, $i, $HDF_STRING + $g_aColAligns[$i]) Next Local $iGetItemSpacingY = _GUICtrlListView_GetItemSpacingY($g_idListView, True) ; No ListView column resizing by dragging header dividers (LarsJ) ;_WinAPI_SetWindowLong( $hHeader, $GWL_STYLE, _WinAPI_GetWindowLong( $hHeader, $GWL_STYLE ) + $HDS_NOSIZING ) ; AutoIt 3.3.14.5 issue DllCall( "user32.dll", "long_ptr", @AutoItX64 ? "SetWindowLongPtrW" : "SetWindowLongW", "hwnd", $g_hHeader, "int", $GWL_STYLE, "long_ptr", _ DllCall( "user32.dll", "long_ptr", @AutoItX64 ? "GetWindowLongPtrW" : "GetWindowLongW", "hwnd", $g_hHeader, "int", $GWL_STYLE )[0] + $HDS_NOSIZING ) ; Create Marker (an orange line placed above the header of the column being searched) $g_idMarker = GUICtrlCreateLabel("", 0, 0) GUICtrlSetBkColor(-1, 0xFFA060) ; orange _MoveMarker($g_iSearchCol) _GUICtrlListView_SetSelectedColumn($g_idListView, $g_iSearchCol) ; Create Context menu $g_idContextDummy = GUICtrlCreateDummy() Local $idContextMenu = GUICtrlCreateContextMenu($g_idContextDummy) Local $idContext_GetText = GUICtrlCreateMenuItem("Get text", $idContextMenu) GUICtrlCreateMenuItem("", $idContextMenu) Local $idContext_ShowAll = GUICtrlCreateMenuItem("Show all rows", $idContextMenu) Local $idContext_RightClickHeaders = GUICtrlCreateMenuItem("Right-click Headers", $idContextMenu) GUICtrlSetState(-1, 1) ; $GUI_CHECKED = 1 $g_hContextMenu = GuiCtrlGetHandle($idContextMenu) ; Sorting information $g_iSortDir = 0x0400 ; $HDF_SORTUP = 0x0400 Local $iSortCol = -1, $iSortColPrev = -1 ; Register message handlers GUIRegisterMsg($WM_DRAWITEM, "WM_DRAWITEM") GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") ; Sets the virtual number of items in a virtual list-view control GUICtrlSendMsg($g_idListView, $LVM_SETITEMCOUNT, $g_iRows, 0) GUISetState(@SW_SHOW) ; Message loop Local $aSearch[$g_iRows], $iStart While 1 Switch GUIGetMsg() Case $g_idComboCol, $g_idComboColDummy, $idSearchHow $g_iSearchCol = GUICtrlRead($g_idComboCol) $sSearchHow = GUICtrlRead($idSearchHow) Select Case $g_iSearchCol <> $iSearchColPrev _MoveMarker($g_iSearchCol) ; Search column will be selected below, after ContinueCase $iSearchColPrev = $g_iSearchCol Case $sSearchHow <> $sSearchHowPrev $sSearchHowPrev = $sSearchHow Case Else ; no change in both Combo controls (same search column, same search way) ContinueLoop EndSelect ContinueCase Case $g_idEditDummy _GUICtrlHeader_SetItemFormat($g_hHeader, $iSortCol, $HDF_STRING + ($iSortCol > -1 ? $g_aColAligns[$iSortCol] : 0)) $g_sSearch = GUICtrlRead($idEdit) $g_tIndex = $g_tDefaultIndex ; Sorting information (same as 1st launch, to avoid descending displays when all unsorted rows are shown) $g_iSortDir = 0x0400 ; $HDF_SORTUP = 0x0400 $iSortCol = -1 $iSortColPrev = -1 If $g_sSearch = "" Then ; Empty search string, display all rows $g_aSubArray = $g_aArray $g_aSubArray2 = $g_aArray $g_iSearch = $g_iRows GUICtrlSetState($idPrev, $GUI_DISABLE) GUICtrlSetState($idNext, $GUI_DISABLE) Else ; Find rows matching the search string $g_iSearch = 0 If $sSearchHow = "Normal search" Then ; all searches use RegEx => escape 12 + 1 metacharacters $g_sSearch = StringRegExpReplace($g_sSearch, "(\\|\.|\^|\$|\||\[|\(|\{|\*|\+|\?|\#|\))" , "\\$1") EndIf ; ConsoleWrite("$sSearchHow = " & $sSearchHow & @TAB & "$g_sSearch = " & $g_sSearch & @lf) Dim $aSearch[$g_iRows] For $i = 0 To $g_iRows - 1 If StringRegExp($g_aArray[$i][$g_iSearchCol], "(?i)" & $g_sSearch) Then For $j = 0 To $g_iCols - 1 $g_aSubArray2[$g_iSearch][$j] = $g_aArray[$i][$j] Next $aSearch[$i] = 1 ; include row ($aSearch will serve if user wants to show all rows and click Next / Prec) $g_iSearch += 1 EndIf Next ; Delete eventual temporary subindexes For $i = 0 To $g_iCols - 1 If VarGetType($g_aIndexTemp[$i]) = "DLLStruct" Then $g_aIndexTemp[$i] = "" ; "String" Next $g_aSubArray = $g_bShowAllRows ? $g_aArray : $g_aSubArray2 GUICtrlSetState($idPrev, ($g_bShowAllRows And $g_iSearch And $g_iSearch < $g_iRows) ? $GUI_ENABLE : $GUI_DISABLE) GUICtrlSetState($idNext, ($g_bShowAllRows And $g_iSearch And $g_iSearch < $g_iRows) ? $GUI_ENABLE : $GUI_DISABLE) EndIf GUICtrlSetData($idResult, " " & $g_iSearch & ($g_sSearch = "" ? " rows (no pattern)" : " matching rows")) GUICtrlSendMsg($g_idListView, $LVM_SETITEMCOUNT, $g_bShowAllRows ? $g_iRows : $g_iSearch, 0) _GUICtrlListView_SetSelectedColumn($g_hListView, $g_iSearchCol) ; seems ok here (after $LVM_SETITEMCOUNT) Case $g_idListView ; Sort $iSortCol = GUICtrlGetState($g_idListView) If $iSortCol <> $iSortColPrev Then _GUICtrlHeader_SetItemFormat($g_hHeader, $iSortColPrev, $HDF_STRING + ($iSortColPrev > -1 ? $g_aColAligns[$iSortColPrev] : 0)) EndIf ; Set $g_tIndex + eventual update of $g_aIndex[$iSortCol] OR $g_aIndexTemp[$iSortCol] If $g_bShowAllRows Or $g_sSearch = "" Or $g_iSearch = $g_iRows Then _UpdateIndex($g_aIndex, $iSortCol) Else _UpdateIndex($g_aIndexTemp, $iSortCol) EndIf $g_iSortDir = (($iSortCol = $iSortColPrev) ? ($g_iSortDir = $HDF_SORTUP ? $HDF_SORTDOWN : $HDF_SORTUP) : ($HDF_SORTUP)) _GUICtrlHeader_SetItemFormat($g_hHeader, $iSortCol, $HDF_STRING + $g_aColAligns[$iSortCol] + $g_iSortDir) GUICtrlSendMsg($g_idListView, $LVM_SETSELECTEDCOLUMN, $iSortCol, 0) GUICtrlSendMsg($g_idListView, $LVM_SETITEMCOUNT, $g_bShowAllRows ? $g_iRows : $g_iSearch, 0) $iSortColPrev = $iSortCol ; Update $aSearch (eventually) + automatic display of 1st match (eventually too) If $g_bShowAllRows And $g_sSearch And $g_iSearch And $g_iSearch < $g_iRows Then _Update_aSearch($aSearch, $iSortCol, $idPrev, $idNext) EndIf Case $idNext $iStart = $g_iLvItem = - 1 ? 0 : $g_iLvItem < $g_iRows - 1 ? $g_iLvItem + 1 : 0 While 1 ; The while loop is used to start all over when last row in the listview is reached For $i = $iStart To $g_iRows - 1 If $aSearch[$i] And $i > $g_iLvItem Then ExitLoop Next If $i < $g_iRows Then ExitLoop $g_iLvItem = -1 $iStart = 0 Wend If $g_iLvItem > - 1 Then _GUICtrlListView_SetItemSelected($g_idListView, $g_iLvItem, False, False) _GUICtrlListView_ClickItem($g_idListView, $i) If $iStart = 0 Then Local $iGetTopIndex = _GUICtrlListView_GetTopIndex($g_idListView) _GUICtrlListView_Scroll($g_idListView, 0, ($i - $iGetTopIndex) * $iGetItemSpacingY) EndIf _GUICtrlListView_SetItemSelected($g_idListView, $i, True, True) Case $idPrev $iStart = $g_iLvItem = - 1 ? $g_iRows - 1 : $g_iLvItem > 0 ? $g_iLvItem - 1 : $g_iRows - 1 While 1 ; The while loop is used to start all over when first row in the listview is reached For $i = $iStart To 0 Step -1 If $aSearch[$i] And $i < $g_iLvItem Then ExitLoop Next If $i > -1 Then ExitLoop $g_iLvItem = $g_iRows $iStart = $g_iRows - 1 Wend If $g_iLvItem > - 1 Then _GUICtrlListView_SetItemSelected($g_idListView, $g_iLvItem, False, False) _GUICtrlListView_ClickItem($g_idListView, $i) If $iStart = 0 Then Local $iGetTopIndex = _GUICtrlListView_GetTopIndex($g_idListView) _GUICtrlListView_Scroll($g_idListView, 0, ($i - $iGetTopIndex) * $iGetItemSpacingY) EndIf _GUICtrlListView_SetItemSelected($g_idListView, $i, True, True) Case $g_idContextDummy If $g_iItem > - 1 Then _GUICtrlListView_SetSelectedColumn($g_hListView, $g_iSubItem) GUICtrlSetState($idContext_GetText, $g_iItem = - 1 ? $GUI_DISABLE : $GUI_ENABLE) Local $iMenu_Choice = _TrackPopupMenu($g_hContextMenu, $g_hGui, MouseGetPos(0), MouseGetPos(1)) If $iMenu_Choice Then Switch $iMenu_Choice Case $idContext_GetText ; Get text Local $sGetText = _GetText($g_iItem, $g_iSubItem) MsgBox($MB_TOPMOST, "Context menu", "Row = " & $g_iItem & " Column = " & $g_iSubItem & " Text = " & $sGetText & @lf) Case $idContext_ShowAll ; Show all rows ? If BitAND(GUICtrlRead($idContext_ShowAll), 4) = 4 Then ; $GUI_UNCHECKED = 4 GUICtrlSetState($idContext_ShowAll, 1) ; $GUI_CHECKED = 1 $g_bShowAllRows = True $g_aSubArray = $g_aArray ; Set $g_tIndex + eventual update $g_aIndex[$iSortCol] If $iSortCol > - 1 Then _UpdateIndex($g_aIndex, $iSortCol) ; Update $aSearch (eventually) + automatic display of 1st match (eventually too) If $g_sSearch And $g_iSearch And $g_iSearch < $g_iRows Then _Update_aSearch($aSearch, $iSortCol, $idPrev, $idNext) Else GUICtrlSetState($idContext_ShowAll, 4) ; $GUI_UNCHECKED = 4 $g_bShowAllRows = False $g_aSubArray = $g_aSubArray2 ; Set $g_tIndex + eventual update of $g_aIndexTemp[$iSortCol] If $iSortCol > - 1 Then _UpdateIndex($g_aIndexTemp, $iSortCol) ; No eventual update of $aSearch because $g_bShowAllRows = False (2 buttons Prev & Next are disable in this case) EndIf GUICtrlSetState($idPrev, ($g_bShowAllRows And $g_sSearch And $g_iSearch And $g_iSearch < $g_iRows) ? $GUI_ENABLE : $GUI_DISABLE) GUICtrlSetState($idNext, ($g_bShowAllRows And $g_sSearch And $g_iSearch And $g_iSearch < $g_iRows) ? $GUI_ENABLE : $GUI_DISABLE) GUICtrlSendMsg($g_idListView, $LVM_SETITEMCOUNT, $g_bShowAllRows ? $g_iRows : $g_iSearch, 0) Case $idContext_RightClickHeaders ; Activate headers right-click ? If BitAND(GUICtrlRead($idContext_RightClickHeaders), 4) = 4 Then ; $GUI_UNCHECKED = 4 GUICtrlSetState($idContext_RightClickHeaders, 1) ; $GUI_CHECKED = 1 $g_bRightClickHeaders = True Else GUICtrlSetState($idContext_RightClickHeaders, 4) ; $GUI_UNCHECKED = 4 $g_bRightClickHeaders = False EndIf EndSwitch Endif Case $GUI_EVENT_RESTORE ; needed, or Marker goes back in 0, 0 after Restore (why ?) _MoveMarker($g_iSearchCol) Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd ; Cleanup GUIDelete($g_hGui) EndFunc ;==>Example ;======================================================================== Func WM_DRAWITEM($hWnd, $iMsg, $wParam, $lParam) ; Display items in an owner drawn ListView (called once per item : no separate messages for each subitem +++) Local Static $tRect = DllStructCreate( $tagRECT ), $pRect = DllStructGetPtr( $tRect ), $tSize = DllStructCreate( $tagSIZE ) Local Static $hBrushYellow = _WinAPI_CreateSolidBrush( 0xFFFF00 ), $hBrushCyan = _WinAPI_CreateSolidBrush( 0x00FFFF ) ; Yellow and cyan, BGR Local Static $hBrushHighLight = _WinAPI_GetSysColorBrush( $COLOR_HIGHLIGHT ), $hBrushButtonFace = _WinAPI_GetSysColorBrush( $COLOR_BTNFACE ) Local $tDrawItem = DllStructCreate( $tagDRAWITEM, $lParam ), $itemID = DllStructGetData( $tDrawItem, "itemID" ), $iState = DllStructGetData( $tDrawItem, "itemState" ), $hDC = DllStructGetData( $tDrawItem, "hDC" ), $sItemText ; Loop through columns ($i is the column index) For $i = 0 To $g_iCols - 1 ; Subitem rectangle DllStructSetData( $tRect, 2, $i ) ; Top DllStructSetData( $tRect, 1, $LVIR_BOUNDS ) ; Left GUICtrlSendMsg( $g_idListView, $LVM_GETSUBITEMRECT, $itemID, $pRect ) DllStructSetData( $tRect, 1, DllStructGetData( $tRect, 1 ) + 0 ) ; Left margin ; If $i = 0 (first column), the rectangle is calculated for the entire listview item. ; Compensate for this by setting the width of the rectangle to the width of the first column. ; Before that, if item is selected, fill the entire listview item with the highlight background color. If $i = 0 Then If BitAND( $iState, $ODS_SELECTED ) Then DllCall( "user32.dll", "int", "FillRect", "handle", $hDC, "struct*", $tRect, "handle", $fListViewHasFocus = 1 ? $hBrushHighLight : $hBrushButtonFace ) ; _WinAPI_FillRect DllStructSetData( $tRect, 3, DllStructGetData( $tRect, 1 ) + GUICtrlSendMsg( $g_idListView, $LVM_GETCOLUMNWIDTH, 0, 0 ) ) EndIf ; Retrieve subitem text If $g_iSortDir = 0x0400 Then ; $HDF_SORTUP = 0x0400 $sItemText = $g_aSubArray[$g_tIndex.arr($itemID + 1)][$i] Else $sItemText = $g_aSubArray[$g_tIndex.arr(($g_bShowAllRows ? $g_iRows : $g_iSearch) - $itemID)][$i] EndIf ; Subitem rectangle for right and center aligned columns If $g_aColAligns[$i] Then ; $HDF_LEFT = 0, $HDF_RIGHT = 1, $HDF_CENTER = 2 DllCall( "gdi32.dll", "bool", "GetTextExtentPoint32W", "handle", $hDC, "wstr", $sItemText, "int", StringLen( $sItemText ), "struct*", $tSize ) ; _WinAPI_GetTextExtentPoint32 Switch $g_aColAligns[$i] Case 1 ; $HDF_RIGHT DllStructSetData( $tRect, "Left", DllStructGetData( $tRect, "Right" ) - DllStructGetData( $tSize, "X" ) - 6 ) Case 2 ; $HDF_CENTER DllStructSetData( $tRect, "Left", DllStructGetData( $tRect, "Left" ) + ( DllStructGetData( $tRect, "Right" ) - DllStructGetData( $tRect, "Left" ) - DllStructGetData( $tSize, "X" ) ) / 2 - 3 ) EndSwitch EndIf ; Subitem text color DllCall( "gdi32.dll", "int", "SetTextColor", "handle", $hDC, "int", BitAND( $iState, $ODS_SELECTED ) ? $fListViewHasFocus = 1 ? 0xFFFFFF : 0x000000 : 0x000000 ) ; _WinAPI_SetTextColor ; Draw subitem text DllCall( "user32.dll", "int", "DrawTextW", "handle", $hDC, "wstr", $sItemText, "int", StringLen( $sItemText ), "struct*", $tRect, "uint", 0 ) ; _WinAPI_DrawText ; $i is column index, $g_iSearchCol is the search column ; Mark matching substring only if column index = search column If $i <> $g_iSearchCol Then ContinueLoop ; Matching substring? If $g_sSearch Then Local $sMatch = StringRegExp( $sItemText, "(?i)" & $g_sSearch, 1 ) If Not @error Then ; match found Local $extended = @extended, $iLen = StringLen( $sMatch[0] ) ; Rectangle for matching substring DllCall( "gdi32.dll", "bool", "GetTextExtentPoint32W", "handle", $hDC, "wstr", $sItemText, "int", $extended - $iLen - 1, "struct*", $tSize ) ; _WinAPI_GetTextExtentPoint32 DllStructSetData( $tRect, "Left", DllStructGetData( $tRect, "Left" ) + DllStructGetData( $tSize, "X" ) ) DllCall( "gdi32.dll", "bool", "GetTextExtentPoint32W", "handle", $hDC, "wstr", $sMatch[0], "int", $iLen, "struct*", $tSize ) ; _WinAPI_GetTextExtentPoint32 DllStructSetData( $tRect, "Right", DllStructGetData( $tRect, "Left" ) + DllStructGetData( $tSize, "X" ) ) ; Fill rectangle with yellow or cyan (selected) background color DllStructSetData( $tRect, 2, DllStructGetData( $tRect, 2 ) + 1 ) ; Top margin DllCall( "user32.dll", "int", "FillRect", "handle", $hDC, "struct*", $tRect, "handle", BitAND( $iState, $ODS_SELECTED ) ? $hBrushCyan : $hBrushYellow ) ; _WinAPI_FillRect ; Draw matching substring in rectangle DllStructSetData( $tRect, 2, DllStructGetData( $tRect, 2 ) - 1 ) ; Top margin DllCall( "gdi32.dll", "int", "SetTextColor", "handle", $hDC, "int", 0x000000 ) ; _WinAPI_SetTextColor DllCall( "user32.dll", "int", "DrawTextW", "handle", $hDC, "wstr", $sMatch[0], "int", $iLen, "struct*", $tRect, "uint", 0 ) ; _WinAPI_DrawText EndIf EndIf Next Return $GUI_RUNDEFMSG #forceref $hWnd, $iMsg, $wParam EndFunc ;======================================================================== Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) Local $tNMHDR = DllStructCreate($tagNMHDR, $lParam) Switch HWnd(DllStructGetData($tNMHDR, "hWndFrom")) Case $g_hListView Switch DllStructGetData($tNMHDR, "Code") Case $LVN_ITEMCHANGED Local $tNMListView = DllStructCreate($tagNMLISTVIEW, $lParam) Local $iNewState = DllStructGetData($tNMListView, "NewState") If BitAND($iNewState, $LVIS_FOCUSED) Then $g_iLvItem = DllStructGetData($tNMListView, "Item") Case $NM_RCLICK Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) $g_iItem = DllStructGetData($tInfo, "Index") ;~ If $g_iItem > -1 Then ; valid row $g_iSubItem = DllStructGetData($tInfo, "SubItem") GUICtrlSendToDummy($g_idContextDummy) ;~ EndIf EndSwitch Case $g_hHeader Switch DllStructGetData($tNMHDR, "Code") Case $NM_RCLICK If $g_bRightClickHeaders Then Local $aHit = _GUICtrlListView_SubItemHitTest($g_hListView) ; $aHit[1] : 0-based index of the LV subitem... i.e. the column in our case (may be -1 if right click on empty part of header) If $aHit[1] > - 1 Then ; valid column GUICtrlSetData($g_idComboCol, $aHit[1]) GUICtrlSendToDummy($g_idComboColDummy) EndIf EndIf Case $HDN_ENDTRACKW ; keep it, in case someone needs it _MoveMarker(GUICtrlRead($g_idComboCol)) Case $HDN_DIVIDERDBLCLICKW ; keep it, in case someone needs it Local $tNMHEADER = DllStructCreate($tagNMHEADER, $lParam) Local $iCol = DllStructGetData($tNMHEADER, "Item") _GUICtrlListView_SetColumnWidth($g_idListView, $iCol, $g_aWidths[$iCol]) ; initial size _MoveMarker(GUICtrlRead($g_idComboCol)) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY ;======================================================================== Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) Local $hWndFrom = $lParam Local $iCode = BitShift($wParam, 16) ; High word Switch $hWndFrom Case $g_hEdit Switch $iCode Case $EN_CHANGE GUICtrlSendToDummy($g_idEditDummy) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND ;======================================================================== Func _Generate_All(ByRef $g_aArray) ConsoleWrite("$g_iRows = " & $g_iRows & " $g_iCols = " & $g_iCols & @CRLF) $g_aArray = FAS_Random2DArrayAu3($g_iRows, "sifdtr", "abcdefghijklmnopqrstuvwxyz") ; $g_aArray = FAS_Random2DArrayAu3($g_iRows, "sifdtr", "abcdefghijklmnopqrstuvwxyz" & "\.^$|[({*+?#)") ; 12 + 1 RegEx metacharacters For $i = 0 To $g_iRows - 1 $g_tIndex.arr($i + 1) = $i Next EndFunc ;==>_Generate_All ;======================================================================== Func _SortArrayStruct(Const ByRef $aArray, $iCol, $iRows) Local $tIndex = DllStructCreate("uint arr[" & $iRows & "]") Local $pIndex = DllStructGetPtr($tIndex) Local Static $hDll = DllOpen("kernel32.dll") Local Static $hDllComp = DllOpen("shlwapi.dll") Local $lo, $hi, $mi, $r ; Sorting by one column For $i = 1 To $iRows - 1 $lo = 0 $hi = $i - 1 Do $mi = Int(($lo + $hi) / 2) $r = DllCall($hDllComp, 'int', 'StrCmpLogicalW', 'wstr', $aArray[$i][$iCol], 'wstr', $aArray[DllStructGetData($tIndex, 1, $mi + 1)][$iCol])[0] Switch $r Case -1 $hi = $mi - 1 Case 1 $lo = $mi + 1 Case 0 ExitLoop EndSwitch Until $lo > $hi DllCall($hDll, "none", "RtlMoveMemory", "struct*", $pIndex + ($mi + 1) * 4, "struct*", $pIndex + $mi * 4, "ulong_ptr", ($i - $mi) * 4) DllStructSetData($tIndex, 1, $i, $mi + 1 + ($lo = $mi + 1)) Next Return $tIndex EndFunc ;==>_SortArrayStruct ;======================================================================== Func _UpdateIndex(ByRef $aIndex, $iCol) If VarGetType($aIndex[$iCol]) = "DLLStruct" Then $g_tIndex = $aIndex[$iCol] Else $g_tIndex = _SortArrayStruct($g_aSubArray, $iCol, $g_bShowAllRows ? $g_iRows : $g_iSearch) $aIndex[$iCol] = $g_tIndex ; "DLLStruct" (or "Int32" when no match found +++) EndIf EndFunc ;==>_UpdateIndex ;======================================================================== Func _Update_aSearch(ByRef $aSearch, $iSortCol, $idPrev, $idNext) $g_iSearch = 0 Dim $aSearch[$g_iRows] For $i = 0 To $g_iRows - 1 If StringRegExp($g_aArray[$g_tIndex.arr($g_iSortDir = 0x0400 ? $i + 1 : $g_iRows - $i)][$g_iSearchCol], "(?i)" & $g_sSearch) Then $aSearch[$i] = 1 ; include row $g_iSearch += 1 EndIf Next If $g_iSearch And $iSortCol = $g_iSearchCol Then GUICtrlSetState($idPrev, $GUI_ENABLE) GUICtrlSetState($idNext, $GUI_ENABLE) $g_iLvItem = - 1 ; comment this line if 1st match not to be displayed on 1st row ControlClick($g_hGui, "", $idNext) EndIf EndFunc ;==>_Update_aSearch ;======================================================================== Func _MoveMarker($iCol) Local $aRect = _GUICtrlHeader_GetItemRect($g_hHeader, $iCol) ControlMove($g_hGui, "", $g_idMarker, 10 + $aRect[0], 40 - 3, $aRect[2] - $aRect[0] + 1, 3) ; 10 / 40 are LV coords EndFunc ;==>_MoveMarker ;======================================================================== Func _TrackPopupMenu($hMenu, $hWnd, $iX, $iY) ; $TPM_RETURNCMD (0x0100) returns the menu item identifier of the user's selection in the return value. Return DllCall("user32.dll", "int", "TrackPopupMenuEx", "hwnd", $hMenu, "int", 0x0100, "int", $iX, "int", $iY, "hwnd", $hWnd, "ptr", 0)[0] EndFunc ;==>_TrackPopupMenu ;======================================================================== Func _GetText($iItem, $iSubItem) Local $sGetText If $g_iSortDir = 0x0400 Then ; $HDF_SORTUP = 0x0400 $sGetText = $g_aSubArray[$g_tIndex.arr($iItem + 1)][$iSubItem] Else $sGetText = $g_aSubArray[$g_tIndex.arr(($g_bShowAllRows ? $g_iRows : $g_iSearch) - $iItem)][$iSubItem] EndIf Return $sGetText EndFunc ;==>_GetText ;======================================================================== Func _ComputeLV_Height($iNb_Rows, $bHeader = True, $bBorder = True) Local $hGui = GUICreate("", 170, 200) ; test values not to be changed Local $idListView = GUICtrlCreateListView("Col 0", 10, 10, 150, 180) ; border $WS_EX_CLIENTEDGE Local $iClient_Height = WinGetClientSize(GUICtrlGetHandle($idListView))[1] Local $iBorder_Height = 180 - $iClient_Height Local $hHeader = GUICtrlSendMsg($idListView, $LVM_GETHEADER, 0, 0) Local $iHeader_Height = _WinAPI_GetWindowHeight($hHeader) Local $iGetItemSpacingY = _GUICtrlListView_GetItemSpacingY($idListView, True) GUIDelete($hGui) Return ($iNb_Rows * $iGetItemSpacingY) + ($bHeader ? $iHeader_Height : 0) + ($bBorder ? $iBorder_Height : 0) EndFunc ;==>_ComputeLV_Height Concerning a new function _ComputeLV_Height() found at the very end of the script, it should deserve explanations in a separate post. Basically, the function computes an accurate ListView height, which will be used during Gui and LV creation. For example, in the script, we want 40 full rows in LV, without having any additional vertical pixels (half rows) at the bottom of the LV. If I'm not mistaken, this is how LarsJ's "788" listview height (40 full rows) is computed : LarsJ's 788 LV height = => 40 rows X 19 = 760 => Header height = 24 => 2 x 2 borders = 4 ($WS_EX_CLIENTEDGE) 760 + 24 + 4 = 788 When we run the script, each one of us will have a different ListView height because of our different OS's (or the modif. we did in Windows parameters). On my computer, it's not 788 but 624 which is returned by _ComputeLV_Height (to have 40 full rows). Here is a pic of my last 40th row, without a single additional or missing pixel (1st row is 0, which explains "39" written at the end of the last row). Let's hope the function will work for any user. By the way, I got rid of the Combo "All" option in the script, as it is already complicated enough. Thanks for not asking new implementations as I won't be here often from now on. Good luck to you all and stay healthy Edit #1 - update June 10th 2021 : disable 2 search buttons (Prev / Next) if number of matched rows = number of initial array rows, when search field is not empty (a . with RegEx search for instance that matches all rows) and "Show all rows" is ticked in context menu.
    1 point
  3. Musashi

    Windows + Printscreen

    #include <ScreenCapture.au3> ;Global $x ; <== Superfluous ! The variable $x will be declared by For ... Next Global $sFileName For $x = 1 To 5 Step 1 $sFileName = @ScriptDir & "\Picture" & $x & ".jpg" ConsoleWrite($sFileName & @CRLF) ; *** just for test _ScreenCapture_Capture($sFileName) ShellExecute($sFileName) Next Thus, the script still makes little sense, since five screenshots are taken quasi simultaneously . Please describe what exactly you want to achieve.
    1 point
  4. Musashi

    Windows + Printscreen

    The following functions might be of interest : _ScreenCapture_Capture / _ScreenCapture_CaptureWnd
    1 point
  5. Off-Topic : Here a list of user groups and rights : https://www.autoitscript.com/forum/topic/37739-forum-information-and-faqs/ Excerpt (modified) : Possibly of interest for you : If you have 300+ posts, you can change your title .
    1 point
  6. Maybe ask @Homoud or @LtNeno? Also, I know @TheXman’s code when I see it.
    1 point
  7. Zedna

    Create Progress bar in CUI

    #AutoIt3Wrapper_Change2CUI=y #include <string.au3> For $i = 1 to 79 $part1 = _StringRepeat(Chr(219), $i) $part2 = _StringRepeat(Chr(177), 79 - $i) ConsoleWrite(@CR & $part1 & $part2) Sleep(50) Next ; uncomment this if you want to preserve finished progressbar ;~ ConsoleWrite(@CRLF & "DONE!") ; comment this if you want to preserve finished progressbar ConsoleWrite(@CR & _StringRepeat(' ', 79)) ConsoleWrite(@CR & "DONE!")
    1 point
  8. You mean like the $ES_PASSWORD style for Edit/Input controls?
    1 point
  9. This is my attempt to make the pixselsearch script a little more flexible so that it can be used in any GUI with virtual ListView. Realized functions: Registration Search Sorting Selected row text Unregistration
    1 point
  10. Process + Thread + DLL Functions UDFs Fully tested on O/S's from Windows 2000 -> Windows 7, in both 32-bit and 64-bit modes. *Note: the dropdown box in the GUI has issues in Windows 2000 - workaround - type 1st letter of process. Also, RemoteThreads may not start if Terminal Services is not installed on Win2000. This is a compilation of all my Process, Thread, and DLL functions (and now Driver functions) into a number of UDF modules. Most every and anything useful can be done with these functions. The best part is the GUI interfaces (ProcessFunctionsTest, ThreadFunctionsTest) which let you experiment with what functions do without even touching a line of code. And whats that? Oh yes - it creates Threads. Even 'Wow64' threads, which requires a new way of thinking =) Bundled with the core Process, Thread, and DLL UDF's are numerous support functions, examples, and even a DLL Injection module. A comparison program 'ProcessListPropertiesTest' is also included for comparison against PsaltyDS's _ProcessListProperties UDF). The GUI's pictured above are the best way to explore the possible uses of the Process + Thread functions included, but the functionality extends beyond those default function calls. For example, there are more filters for the 'List' functions, plus other functionality that is not exposed in the GUI examples. There's also the DLL Functions which aren't even touched on (but are made use of nonetheless). *For another example use of the Process Functions UDF see the ProcessGetWinPEImportExports UDF. Below is a list of all the functions available (check the function headers for more info): ProcessFunctions UDF's Thread Functions UDF's DLL Functions UDF's DriverList.au3 UDF: ; _DriverList() ; Returns a list of Drivers that were loaded by the O/S This is now a very comprehensive suite. Most everything a programmer or user would find useful is included. If by chance you can think of *any* other (useful) functions to add to this project, however, let me know. For those that need to measure a Process's CPU Usage, please see my PDH Performance Counters UDF, another comprehensive UDF suite. Special note: For most all _Process* functions that require a 'QUERY' info handle, use the constant $PROCESS_QUERY_LIMITED_INFO, which is set based on O/S. There's only one exception to this that I can think of: _ProcessMemoryVirtualQuery() which requires full Query access no matter what O/S (0x400). Thread* functions can make use of 2 constants which are set based on O/S - $THREAD_QUERY_LIMITED_INFO and $THREAD_SET_LIMITED_INFO. Experiment with the GUI's on Vista+ O/S's to see what's the minimum req's. Download the Source and/or GUI Exe's from my site Optional addition: Special NomadMemory UDF designed to work with ProcessFunctions: NomadMemoryPF.au3 Ascend4nt's AutoIT Code License agreement: While I provide this source code freely, if you do use the code in your projects, all I ask is that: If you provide source, keep the header as I have put it, OR, if you expand it, then at least acknowledge me as the original author, and any other authors I creditIf the program is released, acknowledge me in your credits (it doesn't have to state which functions came from me, though again if the source is provided - see #1)The source on it's own (as opposed to part of a project) can not be posted unless a link to the page(s) where the code were retrieved from is provided and a message stating that the latest updates will be available on the page(s) linked to.Pieces of the code can however be discussed on the threads where Ascend4nt has posted the code without worrying about further linking.UPDATES:
    1 point
  11. ptrex

    DotNET Compiler Wrapper

    DotNET Compiler Wrapper If you want to run DotNet code as a script, and don't want to install full stack Visual Studio. You can find the DotNet wrapper for VB.NET. But easily can be modified to run C# etc. #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include "BinaryImage.au3" #include <Constants.au3> Global Const $Width = 600 Global Const $Height = 400 Global $sPath, $sCheck Global $color1 = 0x0000000 Global $color2 = 0x0005FFF Global $graphics, $backbuffer, $bitmap, $pen, $i Global $hLabel1, $hLabel2, $hLabel3, $hPic1, $hPic2, $hPic3 Global $LOGO1 = _LOGOBin1() Global $LOGO2 = _LOGOBin2() Global $LOGO3 = _LOGOBin3() Dim $hFile Dim $Font = "Arial" ;GUIRegisterMsg(0xF, "MY_PAINT"); Register PAINT-Event GUIRegisterMsg($WM_ERASEBKGND, "WM_ERASEBKGND"); Register PAINT-Event _GDIPlus_Startup() $hGui = GUICreate("DotNET Scripting", $Width, $Height, -1,-1) ;GUISetState(@SW_LOCK,$hGui) $hLabel1 = GUICtrlCreateLabel("Visual Studio - Light", 10, 20, 450, 20, $SS_NOTIFY) GUICtrlSetFont(-1, 8.5, 650, "", $font) GUICtrlSetBkColor(-1, 0xFFFFFF) $hPic1 = GUICtrlCreatePic("", 30,60,32,32) _SetImageBinaryToCtrl($hPic1,$LOGO1) $hLabel1 = GUICtrlCreateLabel(" Windows Application", 20, 100, 70, 40, $SS_NOTIFY) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlSetState(-1, $GUI_FOCUS) $hPic2 = GUICtrlCreatePic("", 130,60,32,32) _SetImageBinaryToCtrl($hPic2,$LOGO2) $hLabel2 = GUICtrlCreateLabel("Class Library", 120, 100, 70, 40, $SS_NOTIFY) GUICtrlSetBkColor(-1, 0xFFFFFF) $hPic3 = GUICtrlCreatePic("", 230,60,32,32) _SetImageBinaryToCtrl($hPic3,$LOGO3) $hLabel3 = GUICtrlCreateLabel(" Console Application", 220, 100, 70, 40, $SS_NOTIFY) GUICtrlSetBkColor(-1, 0xFFFFFF) _CreateGradient($hGui) GUISetState(@SW_SHOW) ; Check availability If $sCheck = "" Then $sCheck = CheckDotNetVersion() ConsoleWrite($sCheck & @CRLF) EndIf While 1 Switch GUIGetMsg() Case $hPic1, $hLabel1 $sScript = FileOpenDialog("Open DotNET Script", @ScriptDir & "", "PS Scripts (*.vb)") If @error Then MsgBox(4096,"","No File(s) chosen") Else Read_DotNET_Script($sScript) Execute_Script("Win", $sPath, $sScript) EndIf Case $hPic2, $hLabel2 $sScript = FileOpenDialog("Open DotNET Script", @ScriptDir & "", "PS Scripts (*.vb)") If @error Then MsgBox(4096,"","No File(s) chosen") Else Read_DotNET_Script($sScript) Execute_Script("Lib", $sPath, $sScript) EndIf Case $hPic3, $hLabel3 $sScript = FileOpenDialog("Open DotNET Script", @ScriptDir & "", "PS Scripts (*.vb)") If @error Then MsgBox(4096,"","No File(s) chosen") Else Read_DotNET_Script($sScript) Execute_Script("Cnsl", $sPath, $sScript) EndIf Case $GUI_EVENT_CLOSE Close() Exit EndSwitch WEnd ; Read the Code Script to be executed Func Read_DotNET_Script($hPSFile) $file = FileOpen($hPSFile, 0) ; Open read only If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Return EndIf Local $sCmd While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop $sCmd &= $line & @CRLF Wend ConsoleWrite("Line read: " & @CRLF & $sCmd & @CRLF) FileClose($file) EndFunc ;=> Read_DotNET_Script ; Run the Script Func Execute_Script($sType, $sDotNETCmd, $svbScript) Switch $sType #Region Windows Application Case "Win" $hFile = StringMid($svbScript,1, StringLen($svbScript)-2) & "exe" MsgBox(0,"",$hFile) If FileExists($hFile) Then FileDelete($hFile) EndIf $hOut = Run($sDotNETCmd & " /nowarn /nologo /quiet /debug- /t:winexe " & FileGetShortName($svbScript), "", @SW_HIDE, $STDOUT_CHILD) ;#cs While 1 $line = StdoutRead($hOut) If @error = 2 Then ExitLoop If $line <> "" Then MsgBox(16, "Error", $line) EndIf Wend ;#ce Sleep(500) RunWait($hFile, "" , @SW_SHOW) #Region Class Library Case "Lib" $hFile = StringMid($svbScript,1, StringLen($svbScript)-2) & "dll" If FileExists($hFile) Then FileDelete($hFile) EndIf $hOut = Run($sDotNETCmd & " /nowarn /nologo /quiet /debug- /t:library " & FileGetShortName($svbScript), "", @SW_HIDE) Sleep(500) MsgBox(0,"Library .dll Created successfully ! ",$hFile) #Region Console Application Case "Cnsl" $hFile = StringMid($svbScript,1, StringLen($svbScript)-2) & "exe" If FileExists($hFile) Then FileDelete($hFile) EndIf $hOut = Run($sDotNETCmd & " /nowarn /nologo /quiet /debug- /t:exe " & FileGetShortName($svbScript), "", @SW_HIDE, $STDOUT_CHILD) ;#cs While 1 $line = StdoutRead($hOut) If @error = 2 Then ExitLoop If $line <> "" Then MsgBox(16, "Error", $line) EndIf Wend ;#ce Sleep(500) RunWait(@ComSpec & " /K cd " & @ScriptDir & " & " & FileGetShortName($hFile), "", @SW_SHOW) EndSwitch Return $hFile EndFunc ;=> Execute_Script ; Check the DotNET version available Func CheckDotNetVersion() Local $sFramework If @OSArch = "X64" Then $sFramework = "Framework64" Else $sFramework = "Framework" EndIf If FileExists(@WindowsDir & "Microsoft.NET"& $sFramework &"v3.5vbc.exe") Then $sPath = @WindowsDir & "Microsoft.NET"& $sFramework &"v3.5vbc.exe" ElseIf FileExists(@WindowsDir & "Microsoft.NET"& $sFramework &"v3.0vbc.exe") Then $sPath = @WindowsDir & "Microsoft.NET"& $sFramework &"v3.0vbc.exe" Elseif FileExists(@WindowsDir & "Microsoft.NET"& $sFramework &"v2.0.50727vbc.exe") Then $sPath = @WindowsDir & "Microsoft.NET"& $sFramework &"v2.0.50727vbc.exe" Elseif FileExists(@WindowsDir & "Microsoft.NET"& $sFramework &"v2.0.50727vbc.exe") Then $sPath = @WindowsDir & "Microsoft.NET"& $sFramework &"v2.0.50727vbc.exe" Elseif FileExists(@WindowsDir & "Microsoft.NET"& $sFramework &"v1.1.4322vbc.exe") Then $sPath = @WindowsDir & "Microsoft.NET"& $sFramework &"v1.1.4322vbc.exe" ElseIf FileExists(@WindowsDir & "Microsoft.NET"& $sFramework &"v1.0.3705vbc.exe") Then $sPath = @WindowsDir & "Microsoft.NET"& $sFramework &"v1.0.3705vbc.exe" Else MsgBox(0,"Error", "The DotNet version needed, is not available") Exit EndIf Return $sPath EndFunc ;=> CheckDotNetVersion Func _CreateGradient($hwnd) $graphics = _GDIPlus_GraphicsCreateFromHWND($hwnd) $bitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $graphics) $backbuffer = _GDIPlus_ImageGetGraphicsContext($bitmap) $pen = _GDIPlus_PenCreate(0xFF000000, 1) ;you can move this lines below until Do...Until loop to Do...Until loop and make some realtime effects $r = 0x00 $g = 0x00 $b = 0xFF $c = "0xFF" & Hex($r, 2) & Hex($g, 2) & Hex($b, 2) $i = 255 / $width _GDIPlus_GraphicsClear($backbuffer) For $x = 0 To $width ;_GDIPlus_GraphicsDrawLine($backbuffer, $x, 0, $x, $width, $pen) ; Full Screen _GDIPlus_GraphicsDrawLine($backbuffer, $x, 0, $x, 40, $pen) _GDIPlus_PenSetColor($pen, 0xFFFFFFFF) ; White Next For $x = 0 To $width ;_GDIPlus_GraphicsDrawLine($backbuffer, $x, 0, $x, $width, $pen) ; Full Screen _GDIPlus_GraphicsDrawLine($backbuffer, $x, 40, $x, 42, $pen) ; Start at 30 ends at 40 _GDIPlus_PenSetColor($pen, $c) ; Gradient Line $r += $i $g += $i $c = "0xEF" & Hex($r, 2) & Hex($g, 2) & Hex($b, 2) Next For $x = 0 To $width ;_GDIPlus_GraphicsDrawLine($backbuffer, $x, 0, $x, $width, $pen) ; Full Screen _GDIPlus_GraphicsDrawLine($backbuffer, $x, 42, $x, $height, $pen) _GDIPlus_PenSetColor($pen, 0xFFFFFFFF) ; White Next _GDIPlus_GraphicsDrawImageRect($graphics, $bitmap, 0, 0, $width, $height) ; Full Screen EndFunc ;=> _CreateGradient Func Close() _GDIPlus_PenDispose($pen) _GDIPlus_GraphicsDispose($backbuffer) _GDIPlus_BitmapDispose($bitmap) _GDIPlus_GraphicsDispose($graphics) _GDIPlus_Shutdown() EndFunc ;Func to redraw on PAINT MSG - Thanks to UEZ Func MY_PAINT($hWnd, $msg, $wParam, $lParam) ; The sequencial order of these two commands is important. _GDIPlus_GraphicsDrawImage($graphics, $bitmap, 0, 0) _WinAPI_RedrawWindow($hwnd, "", "", BitOR($RDW_INVALIDATE, $RDW_UPDATENOW, $RDW_FRAME, $RDW_ALLCHILDREN)) Return $GUI_RUNDEFMSG EndFunc ;==>MY_PAINT ;Func to redraw on PAINT MSG - Thanks to UEZ Func WM_ERASEBKGND($hWnd, $msg, $wParam, $lParam) _GDIPlus_GraphicsDrawImage($graphics, $bitmap, 0, 0) Return 1 EndFunc ;==>MY_PAINT Func _LOGOBin1() Local $FileName = "0x0000010001002040000001000400E8020000160000002800000020000000400000000100040000000000000000000000000000000000000000000000" $FileName &= "00000000000000000000008000000080800080000000800080008080000080808000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF" $FileName &= "0000FFFFFF0011111111111111111111111111111111111100000000000001111111111111111111788888888888011111111111111111117FFFFFFF" $FileName &= "FFF8011111111111111110007FFFFFFFFFF8011111111111111117FB7FFFFFFFFFF8011111111111111117BF7F44444444F8000000000000001117FB" $FileName &= "7FFFFFFFFFF8088888888888801117BF7F44444444F808F8F8F8F8F8801117FB7FFFFFFFFFF80F8F8F8F8F8F801117BF7F44444444F808F8F8F8F8F8" $FileName &= "801117FB7FFFFFFFFFF80F8F8F8F8F8F801117BF7F44444444F808F8FFFFFFF8801117FB7FFFFFFFFFF80F8FFCCCC8FF801117BF7FFFFFFFFFF808F8" $FileName &= "FCFFFCF8801117FB7777777777770FFFFCFFFCFF801117BFBFBFBFBF78F8FFCFFCCCCFF8801117FBFBFBFBFB7F8FFFCFFCFFFCFF8011177777777777" $FileName &= "78F8FCFCFCFFFCF880111117FFFFFFFFFFFFFCFCFCCCC8FF80111117FFFFFFFFFFFFFCFCFFFFFFF880111117FFFFFFFFFFFFCFFFCF8F8F8F80111117" $FileName &= "FFFFFFFFFFFFCFFFCFF8F8F880111117FFFFFFFFFFFFFFFFFFFF8F8F80111117FFFFFFFFFFFFFFFFF8F8F8F880111117FFFFFFFFFFFFFFFFFFFF8F8F" $FileName &= "80111114444444C4C44C44C4CCC4CCCCC011111444444C444C44C4CCC4CCCCCCC01111144444444C444C4C4CCCCCCCCCC0111114444444C44C44C4C4" $FileName &= "C4C4CCCCC0111111111111111111111111111111111111111111111111111111111111111111FFFFFFFFF0007FFFF0007FFFF0007FFF80007FFF8000" $FileName &= "7FFF80000003800000038000000380000003800000038000000380000003800000038000000380000003800000038000000380000003E0000003E000" $FileName &= "0003E0000003E0000003E0000003E0000003E0000003E0000003E0000003E0000003E0000003FFFFFFFFFFFFFFFF" Return $FileName EndFunc Func _LOGOBin2() Local $FileName = "0x0000010001002040000001002000A8100000160000002800000020000000400000000100200000000000000000000000000000000000000000000000" $FileName &= "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" $FileName &= "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" $FileName &= "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" $FileName &= "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" $FileName &= "00000000000000000000000000000000000000000000CF6B6CFFC96869FFB25B5CFF7F3F3FFF6E92A2FF6A8B9CFF597687FF435869FF283543FF749C" $FileName &= "8AFF709686FF5E8174FF47645BFF2B403BFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000" $FileName &= "000000000000000000000000000000000000000000000000000000000000CF6B6CFCE88E8FFFE6898AFFB65B5BFF7196A6FF58C5E1FF4DBEDDFF4DBE" $FileName &= "DDFF5BBADBFF779F8DFF68D097FF5ECC91FF5ECC91FF6ACB9BFF3E6C5FFF000000000000000000000000000000000000000000000000000000000000" $FileName &= "0000000000000000000000000000000000000000000000000000000000000000000000000000D27172FFA66C6CFFA06364FF8C4B4BFF749BACFF62A3" $FileName &= "BDFF5798B4FF4D8DABFF4B809CFF7AA592FF6DB292FF62A989FF58A081FF549279FF3BBC7DFF3E6C5FFF000000000000000000000000000000000000" $FileName &= "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000D67879FFF6AAABFFF09D9EFFCB68" $FileName &= "68FF77A1B1FF63D3F3FF5CD0F3FF55CDF2FF5BBADBFF7EAA95FF74E2A8FF6EE1A5FF67DFA1FF6ACB9BFF3BBC7DFF3E6C5FFF705642FF6F5440FF6E53" $FileName &= "3FFF6D523DFF6B513DFF6A4F3BFF694E39FF684D38FF674C38FF664B36FF654A35FF644934FF634933FF634833FF0000000000000000DA8283FFC37F" $FileName &= "7FFFBC7475FFA45959FF7CA6B7FF69A6BDFF5F9CB4FF5590ACFF4B809CFF83B09BFF73B394FF69AA8CFF5FA185FF549279FF3BBC7DFF406E61FFC4AD" $FileName &= "A2FFC3ACA0FFC1AA9DFFC0A89CFFBFA699FFBDA497FFBBA295FFB9A193FFB89E90FFB69C8EFFB49B8CFFB2998AFFB19787FF634834FF000000000000" $FileName &= "0000DF8A8BFFFDB9BBFFF9B0B1FFCE6E6DFF7FACBDFF7EDEF5FF78DCF4FF71D9F4FF5BBADBFF86B59FFF8CE7B4FF87E5B0FF80E4AEFF6ACB9BFF3BBC" $FileName &= "7DFF437265FFF6DFD4FFF5DED2FFF5DCD0FFF4DACEFFF4D9CCFFF3D7CAFFF3D5C8FFF2D4C6FFF1D3C4FFF2D1C2FFF1D0C0FFF0CEBEFFB3998BFF6549" $FileName &= "35FF0000000000000000E39394FFFFBDBEFFFDB7B9FFCF7170FF83B2C3FF8BE3F5FF85E1F4FF7EDEF4FF5BBADBFF8ABBA3FF97E8B9FF92E7B6FF8CE6" $FileName &= "B3FF6ACB9BFF3BBC7DFF477668FFF5E0D7FFF6DFD5FFF5DED2FFF4DCD0FFF4DACEFFF3D9CCFFF3D7C9FFF2D5C7FFF2D4C5FFF2D3C3FFF2D1C2FFF1D0" $FileName &= "C0FFB59C8DFF664B36FF0000000000000000E79B9CFFFFBDBEFFFFBDBEFFD17473FF88B7C9FF96E7F6FF91E6F6FF8AE3F5FF5BBADBFF8FC1A9FFA1EA" $FileName &= "BFFF9DEABCFF96E8B8FF6ACB9BFF3BBC7DFF4B7B6BFFF7E2D8FFF6E1D6FFF6DFD4FFF5DED2FFF5DCD0FFF4DACEFFF3D9CBFFF3D6CAFFF2D5C8FFF2D3" $FileName &= "C5FFF2D3C4FFF1D1C2FFB89E90FF674D38FF0000000000000000ECA4A5FFFFBDBEFFFFBDBEFFD27676FF8BBCCEFF9FEBF6FF9BEAF6FF96E7F6FF5BBA" $FileName &= "DBFF93C6ADFFA9EBC2FFA6EBC0FFA1EABFFF6ACB9BFF3BBC7DFF4F8070FFF7E3DAFFF6E2D8FFF6E0D6FFF9E8E1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" $FileName &= "FFFFFFFFFFFFFFFFFFFFF7E3DBFFF2D3C4FFBAA193FF684E3AFF0000000000000000F0ACADFFCD8585FFC57A7BFFAC5D5DFF8DC0D2FF78ADBEFF6FA2" $FileName &= "B5FF6697ACFF4B809CFF95CAB0FF80B59AFF77AC93FF6EA38BFF549279FF3BBC7DFF548473FFF7E5DCFFF6E3DAFFF6E2D7FFFFFDFDFFDA925CFFCB66" $FileName &= "00FFCB6600FFCB6600FFCB6600FFDA925CFFFCF6F1FFF5DED3FFBCA497FF6A4F3BFF0000000000000000F4B3B4FFFFBDBEFFFFBDBEFFD37979FF8FC3" $FileName &= "D5FFABF0F7FFABF0F7FFA8EFF7FF5BBADBFF97CCB2FFB4EEC8FFB4EEC8FFB1EDC6FF6ACB9BFF3BBC7DFF598A78FFF8E7DEFFF7E5DCFFF7E3DAFFFFFF" $FileName &= "FFFFDA925CFFCB6600FFE6B692FFE6B692FFD17733FFCB6600FFE9BFA0FFFAEDE7FFBEA79AFF6B523DFF0000000000000000F5B6B7FFF5B6B7FFEDA7" $FileName &= "A9FFCF7171FF8FC3D5FF85B4C7FF7AA4B4FF7095A6FF6A8B9CFF97CCB2FF8DBFA8FF81AD98FF769F8DFF709686FF3BBC7DFF5E907DFFF8E7E0FFF7E6" $FileName &= "DDFFF7E4DBFFFFFFFFFFDA925CFFCB6600FFFFFFFFFFFFFFFFFFE9BFA0FFCB6600FFE9BFA0FFF9EEE8FFC0A99DFF6D543FFF00000000000000000000" $FileName &= "0000D6A29DFF927C6CFFE5E0DCFFCD999EFF91B2B9FF907B6DFFE5E0DCFFFFFFFFFF6A8B9CFF96B4A3FF8B7179FFE4DDDFFFFFFFFFFF709686FF80A8" $FileName &= "98FFFEFAF9FFFFFFFFFFFDFAF8FFFFFFFFFFDA925CFFCB6600FFCB6600FFCB6600FFCB6600FFD7894EFFFCF6F1FFF6E1D7FFC3AB9FFF6F5541FF0000" $FileName &= "0000000000000000000000000000C69992FF957D6EFFF4ECE8FFCB9196FF8CABB3FF86837DFFF4ECE8FFE2F3F5FF6A8B9CFFFBF2EEFF857E7FFFF2E9" $FileName &= "EDFFE5F3EAFFE5ECE9FFE9BFA0FFCB6600FFE9BFA0FFFFFFFFFFDA925CFFCB6600FFE6B692FFE6B692FFD17733FFCB6600FFFFFFFFFFF5DDD2FFC4AE" $FileName &= "A2FF715743FF00000000000000000000000000000000B7A293FFFEFBFAFFFEFBFBFFFDFAF9FFFDF9F7FFFDF9F6FFFCF7F5FFFDF5F3FFFCF5F1FFFBF3" $FileName &= "EFFFFBF2EDFFFBF0EBFFFCF4F1FFF9EDE4FFD7894EFFCB6600FFD7894EFFFFFFFFFFDA925CFFCB6600FFFFFFFFFFFFFFFFFFDD9B69FFCB6600FFF6E4" $FileName &= "D6FFF6E0D6FFC7B1A5FF735945FF00000000000000000000000000000000B7A293FFFEFDFCFFFEFCFBFFFDFCFAFFFDFBF9FFFDF9F8FFFDF9F6FFFDF7" $FileName &= "F4FFFCF6F3FFFCF5F1FFFBF3EFFFFBF2EEFFFEFDFCFFE6B692FFCB6600FFD7894EFFCB6600FFF6E4D6FFDA925CFFCB6600FFCB6600FFCB6600FFCB66" $FileName &= "00FFD7894EFFFFFFFFFFF5DFD4FFC9B3A8FF755B48FF00000000000000000000000000000000B7A293FFFEFEFEFFFEFDFCFFFEFCFBFFFEFBFAFFFEFA" $FileName &= "F9FFFDF9F7FFFDF8F5FFFDF7F4FFFDF5F2FFFBF4F1FFFBF3F0FFFFFFFFFFD48040FFCB6600FFF6E4D6FFCB6600FFD48040FFF6E4D6FFF3DBC9FFF3DB" $FileName &= "C9FFF3DBC9FFF3DBC9FFFFFFFFFFF8EAE3FFF5DED2FFCBB6ACFF775E4AFF00000000000000000000000000000000B7A293FFFFFFFEFFFFFEFDFFFEFD" $FileName &= "FCFFFEFCFCFFFEFBFAFFFDFAF9FFFDF9F7FFFDF8F6FFFDF6F4FFFCF5F2FFFDF8F6FFF6E4D6FFCB6600FFE0A477FFFFFFFFFFE0A477FFCB6600FFF6E4" $FileName &= "D6FFFEFAF9FFFAF1ECFFFAF0EBFFF9ECE6FFF7E5DDFFF6E1D6FFF5DED4FFCDBAAFFF79604DFF00000000000000000000000000000000B7A293FFFFFF" $FileName &= "FFFFFFFFFEFFFEFEFDFFFEFCFCFFFEFCFBFFFEFBF9FFFDFAF8FFFDF9F7FFFDF8F5FFFCF6F4FFFFFFFFFFE3AD84FFCB6600FFF0D2BBFFFFFFFFFFF0D2" $FileName &= "BBFFCB6600FFE3AD84FFFFFEFEFFF8E8E1FFF7E6DEFFF7E5DCFFF7E3DAFFF7E2D8FFF5E0D5FFCFBCB3FF7B624FFF0000000000000000000000000000" $FileName &= "0000B7A293FFFFFFFFFFFFFFFFFFFFFEFEFFFEFDFDFFFEFDFCFFFEFCFBFFFEFAF9FFFDFAF8FFFDF9F7FFFDF7F5FFFFFFFFFFCB6600FFD17733FFFFFF" $FileName &= "FFFFFCF5F1FFFFFFFFFFD17733FFCB6600FFFFFFFFFFF9E9E2FFF8E8E1FFF8E6DEFFF7E5DCFFF6E3D9FFF6E2D8FFD1C0B7FF7E6452FF000000000000" $FileName &= "00000000000000000000B7A293FFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFFFFFDFDFFFEFCFCFFFEFCFAFFFDFBFAFFFDF9F8FFFDF9F6FFFEFCFBFFF3DB" $FileName &= "C9FFF6E4D6FFFDFAF8FFFBF3EEFFFEFAF8FFF3DBC9FFF6E4D6FFFDF7F4FFF9EBE4FFF9E9E2FFF8E8E0FFF7E6DEFFF7E5DBFFF6E2DAFFD4C3BAFF8067" $FileName &= "54FF00000000000000000000000000000000B7A293FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFEFDFDFFFEFCFCFFFEFBFBFFFDFBFAFFFEFA" $FileName &= "F8FFFDF9F7FFFEF9F8FFFDF9F6FFFCF6F2FFFCF3EFFFFBF3F0FFFCF4F1FFFBF3F0FFFAEFEAFFF9ECE6FFF9EBE4FFF9E9E2FFF8E7E0FFF8E6DEFFF7E4" $FileName &= "DCFFD7C7BEFF826957FF00000000000000000000000000000000B7A293FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFFFEFDFDFFFEFD" $FileName &= "FCFFFEFBFBFFFEFAF9FFFDF9F8FFFDF9F6FFFDF8F4FFFCF6F3FFFCF5F1FFFCF3EFFFFBF2EDFFFAF0ECFFFAEFEAFFF9EEE8FFF9ECE6FFF9EBE4FFF9E9" $FileName &= "E1FFF8E7DFFFF7E6DDFFF7E4DBFF846C5AFF00000000000000000000000000000000D19172FFD19172FFD19172FFD08C6BFFD08661FFCE7E55FFCD75" $FileName &= "49FFCC6D3DFFCA6431FFCA5D27FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FFC959" $FileName &= "20FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FF00000000000000000000000000000000D19172FFFEC09FFFFEBE9DFFFDBC9BFFFDBA" $FileName &= "98FFFDB996FFFCB793FFFBB590FFFBB38DFFFBB08AFFFAAE86FFF9AB83FFF8A980FFF8A77DFFF7A47AFFF7A377FFF5A074FFF59E71FFF59C6FFFF49A" $FileName &= "6DFFF4996AFFF49768FFF39666FFF39565FFF39565FFF39565FFF39565FFC95920FF00000000000000000000000000000000D19172FFFEC09FFFFEBE" $FileName &= "9DFFFDBD9BFFFDBB98FFFDB995FFFCB693FFFBB590FFFBB28DFFFBB08AFFF9AE86FFF9AB84FFF8A980FFF8A77EFFF7A57AFFF7A377FFF6A074FFF59E" $FileName &= "71FFF59C6EFFF49A6DFFF4986AFFF49768FFF49666FFF39565FFF39565FFF39565FFF39565FFC95920FF00000000000000000000000000000000D191" $FileName &= "72FFFEC09EFFFEBF9DFFFEBC9AFFFDBB98FFFDB995FFFCB693FFFCB590FFFBB38DFFFAB18AFFF9AE87FFF9AB83FFF9AA81FFF7A77DFFF7A57AFFF6A3" $FileName &= "77FFF6A075FFF69E71FFF59D6FFFF49A6CFFF4986AFFF49768FFF49667FFF39565FFF39565FFF39565FFF39565FFC95920FF00000000000000000000" $FileName &= "000000000000D19172FFD19172FFD19172FFD08C6BFFD08661FFCE7E55FFCD7549FFCC6D3DFFCA6431FFCA5D27FFC95920FFC95920FFC95920FFC959" $FileName &= "20FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FFC95920FF0000" $FileName &= "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" $FileName &= "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" $FileName &= "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" $FileName &= "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" $FileName &= "000000000000000000000000000000000000FFFFFFFFFFFFFFFF8001FFFF8000FFFF80007FFF80000001800000018000000180000001800000018000" $FileName &= "0001800000018000000180000001C0000001E0000001E0000001E0000001E0000001E0000001E0000001E0000001E0000001E0000001E0000001E000" $FileName &= "0001E0000001E0000001E0000001E0000001FFFFFFFFFFFFFFFF" Return $FileName EndFunc Func _LOGOBin3() Local $FileName = "0x0000010001002040000001000800A8080000160000002800000020000000400000000100080000000000000000000000000000000000000000000000" $FileName &= "00000000000000008000008000000080800080000000800080008080000080808000C0DCC000F0CAA600AA3F2A00FF3F2A00005F2A00555F2A00AA5F" $FileName &= "2A00FF5F2A00007F2A00557F2A00AA7F2A00FF7F2A00009F2A00559F2A00AA9F2A00FF9F2A0000BF2A0055BF2A00AABF2A00FFBF2A0000DF2A0055DF" $FileName &= "2A00AADF2A00FFDF2A0000FF2A0055FF2A00AAFF2A00FFFF2A000000550055005500AA005500FF005500001F5500551F5500AA1F5500FF1F5500003F" $FileName &= "5500553F5500AA3F5500FF3F5500005F5500555F5500AA5F5500FF5F5500007F5500557F5500AA7F5500FF7F5500009F5500559F5500AA9F5500FF9F" $FileName &= "550000BF550055BF5500AABF5500FFBF550000DF550055DF5500AADF5500FFDF550000FF550055FF5500AAFF5500FFFF550000007F0055007F00AA00" $FileName &= "7F00FF007F00001F7F00551F7F00AA1F7F00FF1F7F00003F7F00553F7F00AA3F7F00FF3F7F00005F7F00555F7F00AA5F7F00FF5F7F00007F7F00557F" $FileName &= "7F00AA7F7F00FF7F7F00009F7F00559F7F00AA9F7F00FF9F7F0000BF7F0055BF7F00AABF7F00FFBF7F0000DF7F0055DF7F00AADF7F00FFDF7F0000FF" $FileName &= "7F0055FF7F00AAFF7F00FFFF7F000000AA005500AA00AA00AA00FF00AA00001FAA00551FAA00AA1FAA00FF1FAA00003FAA00553FAA00AA3FAA00FF3F" $FileName &= "AA00005FAA00555FAA00AA5FAA00FF5FAA00007FAA00557FAA00AA7FAA00FF7FAA00009FAA00559FAA00AA9FAA00FF9FAA0000BFAA0055BFAA00AABF" $FileName &= "AA00FFBFAA0000DFAA0055DFAA00AADFAA00FFDFAA0000FFAA0055FFAA00AAFFAA00FFFFAA000000D4005500D400AA00D400FF00D400001FD400551F" $FileName &= "D400AA1FD400FF1FD400003FD400553FD400AA3FD400FF3FD400005FD400555FD400AA5FD400FF5FD400007FD400557FD400AA7FD400FF7FD400009F" $FileName &= "D400559FD400AA9FD400FF9FD40000BFD40055BFD400AABFD400FFBFD40000DFD40055DFD400AADFD400FFDFD40000FFD40055FFD400AAFFD400FFFF" $FileName &= "D4005500FF00AA00FF00001FFF00551FFF00AA1FFF00FF1FFF00003FFF00553FFF00AA3FFF00FF3FFF00005FFF00555FFF00AA5FFF00FF5FFF00007F" $FileName &= "FF00557FFF00AA7FFF00FF7FFF00009FFF00559FFF00AA9FFF00FF9FFF0000BFFF0055BFFF00AABFFF00FFBFFF0000DFFF0055DFFF00AADFFF00FFDF" $FileName &= "FF0055FFFF00AAFFFF00FFCCCC00FFCCFF00FFFF3300FFFF6600FFFF9900FFFFCC00007F0000557F0000AA7F0000FF7F0000009F0000559F0000AA9F" $FileName &= "0000FF9F000000BF000055BF0000AABF0000FFBF000000DF000055DF0000AADF0000FFDF000055FF0000AAFF000000002A0055002A00AA002A00FF00" $FileName &= "2A00001F2A00551F2A00AA1F2A00FF1F2A00003F2A00553F2A00F0FBFF00A4A0A000808080000000FF0000FF000000FFFF00FF00000000000000FFFF" $FileName &= "0000FFFFFF00FDFDFD5E5A5E075A0707073207313231FDFDFDF6AFAFAFD4AFAFFDFDFDFDFDFDFDFDFD82F6D4D4D409D4080909090931FDFDFDAF37DC" $FileName &= "0EDCDD36F6FDFDFDFDFDFDFDFD82B3AFF6AFAFAFAFAFAFAF0932FDFDFDAF37DC63090EDDAFFDFDFDFDFD5E5E5A09AFF6AFAFAFAFAFAFAFAF0931FDFD" $FileName &= "FDAF3ADDD1D187DCAFFDFDFDFDFD82D0A986D1AF0F0E0E0E0A0AF5AF0907AFAFAFAF37DCDCDCDC37FFFDFDFDFDFD5ECFD086F6F6F6AFF6AFB3AFAFAF" $FileName &= "D4AF83DC09AF370E63090EDCAFFDFDFDFDFD82D0CF09D1B30F0E0E0A0AF50AAFAFAF36DC37AF3ADDD1FF3BDCAF320DF5FDFD86D0AD09F6FFF6B3D1B3" $FileName &= "F6AFAFF6FF63DC37DCAF37DCDCDCDC37FFF000F5FDFD86D0D008FFF60F0E0E0A0AF50AAFFF33DCAFDC12AFD4D409D4FF3100000DFDFD09CFD009FFF6" $FileName &= "F6FFFFB3FFB3AFF6AFDC5FF65FDCAF08070731F100F000F5FDFD08D0D008FFFF0F0E0E0A0AF50AFF5FDCD4FFD4DD5FF600F00000000000F5FDFD09D0" $FileName &= "D3AFFFFFFFFFFFFFF6B3D1FFDC12FF31FF12DCFFF00000F000000031FDFD08D0D008F6FFFFFFFFFFFFFFFFFFAFAFF7F082AFAFF700F100000000000D" $FileName &= "FDFDD4D3D0AFFFFFFFF6FFFFFFF6D1FFF6F72DF02D3131F5F000F0F100F0002DFDFD08D0D3AFAF0808AFAF08D4D40808095EF1F5F0F5F0F0F1F00000" $FileName &= "F000000EFDFDAFD3D0D3D0D0D3D0ADD0CFAD5AF52C2DF5F4F1F0F0F1F0F0F1F0F000F031FDFDAFD0D3D0D3D0D0D3D0D0D0D05A2DF5F52CF52CF5F5F0" $FileName &= "F1F0F0F100F0000EFDFDAFAFAFAFAFAFD4D4D408AB085E2D2D2DF52DF5F429F5F0F5F0F0F1F0F031FDFDFDFD5E3131313155313131312D31312D31F5" $FileName &= "2CF5F5F4F1F0F1F1F0F0F10DFDFDFDFD8231553131313131313131312D2D2D2DF52DF42DF5F4F5F0F0F1F031FDFDFDFD5E313107FFFF31FF3131FF31" $FileName &= "3131312D31F52DF52CF5F0F5F1F0F032FDFDFDFD823131FF075531553131FF31312D31312D2D31F52DF52DF4F5F5F031FDFDFDFD823131FF31313131" $FileName &= "318282313131312D31312D2D0D2DF42DF5F0F532FDFDFDFD5E3155FF073131FF31FF313131313131312D2D312DF52DF52CF5F431FDFDFDFD82313107" $FileName &= "FFFF313131FF3107313131313131312D2D312DF52D2DF532FDFDFDFD5E31313131310731073131313131313131313131312D312DF52DF531FDFDFDFD" $FileName &= "5B5E5B363636320E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0A0E0E0E0E0FFDFDFDFD5E8763878787636387635F5F5F5F5F5F3B5F5F3B5B3B5F3B3B375F0E" $FileName &= "FDFDFDFD37878787636383635F5F635F635F5F5F5F5F3B5F3B5F3B5B3B5F3B0EFDFDFDFD5E6387098787638763635F5F5F5F5F5F3B5F3B5F3B373B3B" $FileName &= "373B370FFDFDFDFD5E5B5E373637360E0F0E0E0E0E0F0E0E0E0E0F0E0E0E0E0F0E0E0E0EFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD" $FileName &= "FDFDFDFDFDFDFDFDFDFDE000E03FE000E01FE000E01F0000E01F0000001F0000001F0000000300000003000000030000000300000003000000030000" $FileName &= "00030000000300000003000000030000000300000003C0000003C0000003C0000003C0000003C0000003C0000003C0000003C0000003C0000003C000" $FileName &= "0003C0000003C0000003C0000003FFFFFFFF" Return $FileName EndFunc 1.To create a Windows Application, you can use the fist icon. See the "Hello World.vb" example script. 2.To create a Class Library(dll file), you can use the second icon. Open the "Hello World.vb" Script and it will produce a DotNet.dll. Wich you can reuse in other scripts. 3.To create a console application, you can use the third icon. See the "GetTickCount.vb" example script. _DOTnet Scripting.zip Edit : Changed the script not to delete the compiled exe files. Enjoy ! Rgds ptrex
    1 point
×
×
  • Create New...