Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/11/2020 in all areas

  1. TheDcoder

    Check-If-Same

    I'd suggest at-least using rhash seeing as how FSUM has some shortcomings... and did I mention rhash is open-source?
    1 point
  2. TheSaint

    Check-If-Same

    Well I temporarily adapted my program to use XXHASH, and the first test gave the following result. Compared to my last test with FSUM. Once again, this was with same drives and file. So as can be seen, no real gain of any significance ... certainly not with 3.7 Gb source and compare files. I suspect there might be more variation on my PC, which only has 2 GB of RAM, if the file size was something like 500 MB or a bit less. I'll have to dig up a file like that from somewhere and test with it. It isn't what I built my program to test though for my personal usage, which is mostly large ISO files (DVD and Blu-ray) ... not forgetting that I won't be using checksum tests myself, unless a rare error surfaced ... in which case I would just probably use TeraCopy to do the comparison anyway. I should now download RHASH and try that, though I would be surprised if we get much variation with results using that.
    1 point
  3. Sorry to bring up a really old post, but i just thought I would share a fix if anyone is still using this. For a long time I've noticed the _OpenComm functions in my version of the UDF would not open above COM9. I finally decided to look into it and it seems to be that COM10 (and above) need a different syntax for the "CreateFile" dll call ( see https://support.microsoft.com/en-us/help/115831/howto-specify-serial-ports-larger-than-com9 ). COM1 - COM9 can be specified directly as "COM[PORT]" However COM10+ looks like they need to be formated "\\.\COM[PORT] " So in my code I have changed $hSerialPort = DllCall($commDll, "hwnd", "CreateFile", "str", "COM" & $CommPort, _ to $hSerialPort = DllCall($commDll, "hwnd", "CreateFile", "str", "\\.\COM" & $CommPort, _ Which seems to fix the ports COM10 and above (and still works with COM1-9) My current version is attached, but the fix above should work with other variations in this thread (looking i didn't see that anyone else had fixed it) cfxUDF.au3
    1 point
  4. Hi everybody There's an interesting feature in PaintShop Pro (PSP) and I succeeded in doing same with AutoIt. When you got "inner child" windows inside a GUI (the ones created with $WS_CHILD style) and you minimize them, here is what happens : 1) With PSP 2) With AutoIt Until now, it's the same behavior : child windows are minimized at the left bottom corner of the parent window. But when you resize the parent GUI (or Maximize it) then things become very different : 3) With PSP : minimized child windows are still docked in the left bottom corner, great ! (I upload a small parent image, but it would show same if higher or maximized) 4) With AutoIt : minimized child windows vanish or are not docked anymore after you resize or maximize the parent window Of course they're still here somewhere, visible or not, but you'll have to dock them by hand after you resized or maximized the parent window. So, with the following script, based on WM_SIZE message, the behavior is now the same as PSP #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPISysWin.au3> $hGUI0 = GUICreate("Minimize child then resize parent", 500, 300, 100, 100, _ BitOr($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX), $WS_EX_COMPOSITED) ; parent $hGUI1 = GUICreate("Child1 with style", 200, 200, 20, 20, _ BitOR($WS_CHILD, $WS_OVERLAPPEDWINDOW), -1, $hGUI0) ; child 1 GUISetBkColor(0xF0F4F9) GUICtrlCreateCheckbox('Filler 1', 10, 10, 50, 20) $hGUI2 = GUICreate("Child2 with style", 200, 200, 250, 20, _ BitOR($WS_CHILD, $WS_OVERLAPPEDWINDOW), -1, $hGUI0) ; child 2 GUISetBkColor(0xFFFFDD) GUICtrlCreateCheckbox('Filler 2', 10, 10, 50, 20) GUISetState(@SW_SHOW, $hGUI0) GUISetState(@SW_SHOW, $hGUI1) GUISetState(@SW_SHOW, $hGUI2) GUIRegisterMsg($WM_SIZE, "WM_SIZE") While 1 $aMsg = GUIGetMsg($GUI_EVENT_ARRAY) Switch $aMsg[1] Case $hGUI0 Switch $aMsg[0] Case $GUI_EVENT_CLOSE _Exit() EndSwitch Case $hGUI1 Switch $aMsg[0] Case $GUI_EVENT_CLOSE GUIDelete($hGUI1) EndSwitch Case $hGUI2 Switch $aMsg[0] Case $GUI_EVENT_CLOSE GUIDelete($hGUI2) EndSwitch EndSwitch WEnd ;========================================== Func WM_SIZE($hWnd, $iMsg, $wParam, $lParam) If $hWnd = $hGUI0 Then ; parent ; Parent client width = BitAND($lParam, 0xFFFF) = _WinAPI_LoWord($lParam) ; Parent client height = BitShift($lParam, 16) = _WinAPI_HiWord($lParam) Local $aEnumChild = _WinAPI_EnumChildWindows($hWnd) If IsArray($aEnumChild) Then Local Static $iWidth_Child = 0, $iHeight_Child = 0 Local $hChild, $iNb_Child_Minimized = 0 For $i = 1 To $aEnumChild[0][0] If $aEnumChild[$i][1] = "AutoIt v3 GUI" Then $hChild = $aEnumChild[$i][0] If BitAND(WinGetState($hChild), $WIN_STATE_MINIMIZED) _ And _WinAPI_GetParent($hChild) = $hWnd Then ; ignore eventual grand child If $iWidth_Child = 0 Then ; only once (as Static variable) Local $aPos_Child = WinGetPos($hChild) $iWidth_Child = $aPos_Child[2] ; minimized $iHeight_Child = $aPos_Child[3] ; minimized EndIf Winmove($hChild, "", $iWidth_Child * $iNb_Child_Minimized, _ BitShift($lParam, 16) - $iHeight_Child) $iNb_Child_Minimized +=1 EndIf EndIf Next EndIf EndIf Return $GUI_RUNDEFMSG EndFunc ;========================================== Func _Exit() GUIDelete($hGUI2) GUIDelete($hGUI1) GUIDelete($hGUI0) Exit EndFunc If you want to compare with AutoIt original behavior, just comment out this line : ; GUIRegisterMsg($WM_SIZE, "WM_SIZE") This function WM_SIZE seems portable : only the parent GUI handle is required once at 1st line of function. * Update Sept 10, 2020 : ignore an eventual grand child window (a child window created inside another child window) * Update Sept 11, 2020 : got rid of $iInc counter variable
    1 point
  5. TJF

    Windows Services UDF

    Ok. Can get it this way (cmd): sc query state= all
    1 point
  6. I wondered how to make a string grid and played around with some ideas. Since I don't actually need one it's ground to a halt Maybe some of the ideas will be useful to someone. I got most things I was thinking of at least to the stage where I think I could make them work, but there are lots of things missing or incomplete. I know that you can use the Excel UDF's or OpenOffice Calc UDFs but that wasn't the point and an AUtoIt string grid seemed like a good idea to me for a while . source = stringGrid01.zip Edit made a couple of changes based on Yashied's post #4 mgrefStringGrid
    1 point
  7. This appears to work. ; Modified from:- ; http://www.autoitscript.com/forum/index.php?showtopic=98716&view=findpost&p=709911 #include <WinAPI.au3> #include <WindowsConstants.au3> Global $hHook Local $hFunc, $pFunc, $hMod HotKeySet('{ESC}', '_Close') $hFunc = DllCallbackRegister('_MouseProc', 'lresult', 'int;int;int') $pFunc = DllCallbackGetPtr($hFunc) $hMod = _WinAPI_GetModuleHandle(0) $hHook = _WinAPI_SetWindowsHookEx($WH_MOUSE_LL, $pFunc, $hMod) While 1 Sleep(20) WEnd Func _MouseProc($iCode, $iwParam, $ilParam) If $iCode < 0 Then Return _WinAPI_CallNextHookEx($hHook, $iCode, $iwParam, $ilParam) Switch $iwParam Case $WM_LBUTTONUP MsgBox(4096, "", "Left Mouse up", 2) Case $WM_RBUTTONDOWN MsgBox(4096, "", "Right Mouse Down", 2) Case $WM_XBUTTONUP MsgBox(4096, "", "XButton up", 2) EndSwitch Return _WinAPI_CallNextHookEx($hHook, $iCode, $iwParam, $ilParam) EndFunc ;==>_MouseProc Func _Close() _WinAPI_UnhookWindowsHookEx($hHook) DllCallbackFree($hHook) Exit EndFunc ;==>_Close
    1 point
×
×
  • Create New...