Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/09/2025 in all areas

  1. Numeric1

    The GASP Game

    Thank you for pointing that out! I've just fixed the issue with successive clicks on the same square, so now you can't win by clicking the same square twice. 😊 As for the rules, you're absolutely right—adding a two-player mode or some extra challenges could make the game much more engaging. I’ll definitely consider adding those features in future updates!
    1 point
  2. You did the job, it's working now as i need Thanks my dear
    1 point
  3. #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <WindowsConstants.au3> ;Global $WM_DROPFILES = 0x233 Global $gaDropFiles[1], $str = "" ### Koda GUI section start ### $Main_Gui = GUICreate("Drag&Drop into CreateList", 600, 300, -1,-1,-1,BitOR($WS_EX_ACCEPTFILES, $WS_EX_TOPMOST)) $Child_Gui = GUICreate("Child Gui", 480, 460, 15, 35, BitOR($WS_CHILD, $WS_TABSTOP), -1, $Main_Gui) $button = GUICtrlCreateButton("", 20, 40, 120, 25) GUICtrlSetState(-1, $GUI_HIDE) GUISwitch($Main_Gui) GUISetBkColor(0x00E0FFFF) GUISetFont(9, 300) $tab = GUICtrlCreateTab(10, 10, 490, 490) GUICtrlSetState(-1, $GUI_HIDE) $idList = GUICtrlCreateList("", 10, 5, 575, 100, BitOR($LBS_EXTENDEDSEL, $WS_BORDER, $WS_VSCROLL, $LBS_STANDARD, $LBS_SORT)) $hList = GUICtrlGetHandle($idList) GUICtrlSetState(-1, BitOR($GUI_FOCUS, $GUI_DROPACCEPTED)) GUISetState(@SW_SHOW) ### Koda GUI section end ### GUIRegisterMsg ($WM_DROPFILES, "WM_DROPFILES_UNICODE_FUNC") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_DROPPED For $i = 0 To UBound($gaDropFiles) - 1 ConsoleWrite($i & ' >' & $gaDropFiles[$i] & '< ' & StringLen($gaDropFiles[$i]) & @CRLF) $iFound = 0 For $n = 0 To _GUICtrlListBox_GetCount($hList) - 1 If _GUICtrlListBox_GetText($hList, $n) = $gaDropFiles[$i] Then $iFound = 1 Next If $iFound Then ContinueLoop GUICtrlSetData($idList, $gaDropFiles[$i], 1) ; <=== my change Next EndSwitch WEnd Func WM_DROPFILES_UNICODE_FUNC($hWnd, $msgID, $wParam, $lParam) Local $nSize, $pFileName Local $nAmt = DllCall("shell32.dll", "int", "DragQueryFileW", "hwnd", $wParam, "int", 0xFFFFFFFF, "ptr", 0, "int", 255) For $i = 0 To $nAmt[0] - 1 $nSize = DllCall("shell32.dll", "int", "DragQueryFileW", "hwnd", $wParam, "int", $i, "ptr", 0, "int", 0) $nSize = $nSize[0] + 1 $pFileName = DllStructCreate("wchar[" & $nSize & "]") DllCall("shell32.dll", "int", "DragQueryFileW", "hwnd", $wParam, "int", $i, "int", DllStructGetPtr($pFileName), "int", $nSize) ReDim $gaDropFiles[$i + 1] $gaDropFiles[$i] = DllStructGetData($pFileName, 1) $pFileName = 0 Next EndFunc ;==>WM_DROPFILES_UNICODE_FUNC Try this. See if this does it.
    1 point
  4. Made a file named "New Ľ Text ↔ Document.txt" and _GUICtrlListBox_GetText() is different from $gaDropFiles[$i]. No clue of why. My bad. It is the same.
    1 point
  5. One simple way : #include <array.au3> ... Local $aList[0] ... Case $GUI_EVENT_DROPPED _ArrayConcatenate($aList, $gaDropFiles) $aList = _ArrayUnique($aList, Default, Default, Default, $ARRAYUNIQUE_NOCOUNT) GUICtrlSetData($hList, "") GUICtrlSetData($hList, _ArrayToString($aList))
    1 point
  6. No multi-threading is required in this case as the download is performed already in the background, so all that is required is to store the handles of each submitted download in an array, and then loop through this array getting the status for each active download and handle the ended sessions.
    1 point
  7. Why would anyone want a process to run ALL the time that could crash or get deleted or get stopped, or....??? If you restart the comp, you will need to restart your script. I know there is ways to start automatically a script. But if you insist of doing the wrong way, I suppose the previous proposal would work. Understand that @HOUR and @MIN return strings not integer. So he is comparing wrongly 2 different types of variables. Just so OP knows.
    1 point
  8. ioa747

    voidtools Everything IPC

    with the help of AI (I also put my hand in) Anyway, it's a start ; https://www.autoitscript.com/forum/topic/212232-voidtools-everything-ipc #AutoIt3Wrapper_Res_Fileversion=0.0.0.3 #include <Date.au3> #include <Array.au3> Local $Result = _Everything(@ScriptDir) ; * <<-- _ArrayDisplay($Result) ; #FUNCTION# -------------------------------------------------------------------------------------------------------------------- ; Name...........: _Everything ; Description....: Searches for files using the Everything SDK. ; Syntax.........: _Everything($sSearch) ; Parameters.....: $sSearch - The search query to use. ; Return values..: An array containing the results of the search, with each element being a 3-element array containing the following information: ; | 0 - The full path name of the file. ; | 1 - The date modified of the file in ISO format (yyyy-mm-dd hh:mm:ss). ; | 2 - The size of the file in bytes. ; Notes .........: This function uses the Everything SDK to search for files on the local machine. It is based on the Python example provided by Void Tools. ; https://www.voidtools.com/support/everything/sdk/python/ ; Link ..........: https://www.voidtools.com/support/everything/sdk/ipc/ ; Dependencies...: The Everything SDK must be installed and available in the same directory as this script. ;-------------------------------------------------------------------------------------------------------------------------------- Func _Everything($sSearch) ; Load the Everything DLL Local $EverythingDLL = DllOpen(@ScriptDir & "\Everything-SDK\dll\Everything32.dll") If $EverythingDLL = -1 Then MsgBox(16, "Error", "Failed to load Everything32.dll. Check the path and try again.") Exit EndIf ; Constants for the Everything Request Flags Local Const $EVERYTHING_REQUEST_FILE_NAME = 0x00000001 Local Const $EVERYTHING_REQUEST_PATH = 0x00000002 Local Const $EVERYTHING_REQUEST_FULL_PATH_AND_FILE_NAME = 0x00000004 Local Const $EVERYTHING_REQUEST_EXTENSION = 0x00000008 Local Const $EVERYTHING_REQUEST_SIZE = 0x00000010 Local Const $EVERYTHING_REQUEST_DATE_CREATED = 0x00000020 Local Const $EVERYTHING_REQUEST_DATE_MODIFIED = 0x00000040 Local $iFlags = BitOR($EVERYTHING_REQUEST_FILE_NAME, $EVERYTHING_REQUEST_PATH, $EVERYTHING_REQUEST_SIZE, $EVERYTHING_REQUEST_DATE_MODIFIED) ConsoleWrite("$iFlags=" & $iFlags & @CRLF) ; Set up search DllCall($EverythingDLL, "none", "Everything_SetSearchW", "wstr", $sSearch) ; Set request flags DllCall($EverythingDLL, "none", "Everything_SetRequestFlags", "dword", $iFlags) ; Execute the query DllCall($EverythingDLL, "int", "Everything_QueryW", "int", 1) ; Get the number of results Local $aResCnt = DllCall($EverythingDLL, "int", "Everything_GetNumResults") Local $iNumResults = $aResCnt[0] ;ConsoleWrite("Result Count: " & $iNumResults & @CRLF) Local $aResult[$iNumResults + 1][3] $aResult[0][0] = $iNumResults $aResult[0][1] = "Date Modified" $aResult[0][2] = "bytes" ; Create buffers Local $tFilename = DllStructCreate("wchar[260]") Local $tDateModified = DllStructCreate("uint LowPart; uint HighPart") Local $tFileSize = DllStructCreate("uint64") ; Show results For $i = 0 To $iNumResults - 1 ; Get result full path name DllCall($EverythingDLL, "none", "Everything_GetResultFullPathNameW", "int", $i, "ptr", DllStructGetPtr($tFilename), "int", 260) ; Get result date modified DllCall($EverythingDLL, "int", "Everything_GetResultDateModified", "int", $i, "ptr", DllStructGetPtr($tDateModified)) ; Get result size DllCall($EverythingDLL, "int", "Everything_GetResultSize", "int", $i, "ptr", DllStructGetPtr($tFileSize)) ; constructs the result $aResult[$i + 1][0] = DllStructGetData($tFilename, 1) $aResult[$i + 1][1] = _Date_Time_FileTimeToStr($tDateModified, 1) $aResult[$i + 1][2] = DllStructGetData($tFileSize, 1) Next ; Close the DLL DllClose($EverythingDLL) Return $aResult EndFunc ;==>_Everything ;-------------------------------------------------------------------------------------------------------------------------------- Func _HumanBytes($iBytes) Local $units_array[5] = ["bytes", "KB", "MB", "GB", "TB"] For $i = 0 To UBound($units_array) - 1 Step 1 If $iBytes < 1024 Then ExitLoop $iBytes /= 1024 Next Return $i = 0 ? StringFormat("%i %s", $iBytes, $units_array[$i]) : StringFormat("%.2f %s", $iBytes, $units_array[$i]) EndFunc ;==>_HumanBytes
    1 point
×
×
  • Create New...