Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/10/2022 in all areas

  1. Jos

    Tidy.exe /gd /gds

    True... so /gds will now always show the doc file. Should be fixed in the latest Beta.
    1 point
  2. Assume this is for Windows XP or below? You would need to have #RequireAdmin since ..\All Users\Desktop is a system folder, to make it work with other versions of Windows, I'd recommend using: #RequireAdmin RunWait(@Comspec & ' /c Copy "C:\Dnload\9xAddons\Shutdown.lnk" "' & @DesktopCommonDir & '"')
    1 point
  3. Wow! Thank you enormously once again, @pixelsearch ! This site is frequented by, in my opinion, some of the most generous and valuable contributors around, and you are tops among them. Thanks
    1 point
  4. If you combine in the same script : 1) _WinAPI_SetWinEventHook() to take care of any window being moved or resized. 2) _WinAPI_SetWindowsHookEx() to take care of the keyboard input (as found in AutoIt help file examples) Then you should be able to reach your goal as described in your initial post (at least for the Control keys or the Windows keys), something like the following script, where both Controls keys are checked : #include <WinAPIConstants.au3> #include <WinAPISys.au3> #include <WindowsConstants.au3> Opt( "MustDeclareVars", 1) Global $g_hEventProc = DllCallbackRegister("_EventProc", "none", "ptr;dword;hwnd;long;long;dword;dword") Global $g_hEventHook = _WinAPI_SetWinEventHook($EVENT_MIN, $EVENT_MAX, DllCallbackGetPtr($g_hEventProc)) Global $g_hStub_KeyProc = DllCallbackRegister("_KeyProc", "long", "int;wparam;lparam") Global $g_hHook = _WinAPI_SetWindowsHookEx($WH_KEYBOARD_LL, DllCallbackGetPtr($g_hStub_KeyProc), _WinAPI_GetModuleHandle(0)) OnAutoItExitRegister(OnAutoItExit) Local $iPid = Run(@SystemDir & "\notepad.exe") While ProcessExists($iPid) Sleep(1000) WEnd ;====================================== Func _EventProc($g_hEventHook, $iEvent, $hWnd, $iObjectID, $iChildID, $iThreadId, $iEventTime) Switch $iEvent Case $EVENT_SYSTEM_MOVESIZESTART ConsoleWrite("Start : a window is being moved or resized . " & _ "Window title : " & WinGetTitle($hWnd) & @crlf) Case $EVENT_SYSTEM_MOVESIZEEND ConsoleWrite("End : the movement or resizing of a window has finished . " & _ "Window title : " & WinGetTitle($hWnd) & @crlf & @crlf) EndSwitch EndFunc ;==>_EventProc ;====================================== Func _KeyProc($nCode, $wParam, $lParam) If $nCode < 0 Then Return _WinAPI_CallNextHookEx($g_hHook, $nCode, $wParam, $lParam) EndIf Local $tKEYHOOKS = DllStructCreate($tagKBDLLHOOKSTRUCT, $lParam), $sKeyCode = "" If $wParam = $WM_KEYDOWN Then ; a nonsystem key is pressed. A nonsystem key is a key that is pressed when the ALT key is not pressed. Local $iKeycode = DllStructGetData($tKEYHOOKS, "vkCode") Switch $iKeycode Case 0xA2 $sKeyCode = "Left Control" Case 0xA3 $sKeyCode = "Right Control" ; Case ... ; ... EndSwitch Else ; this part takes care of the Alt key Local $iFlags = DllStructGetData($tKEYHOOKS, "flags") Switch $iFlags Case $LLKHF_ALTDOWN ; context code flag $sKeyCode = "Alt" EndSwitch EndIf If $sKeyCode Then ConsoleWrite($sKeyCode & " key was pressed" & @crlf) EndIf Return _WinAPI_CallNextHookEx($g_hHook, $nCode, $wParam, $lParam) EndFunc ;==>_KeyProc ;====================================== Func OnAutoItExit() _WinAPI_UnhookWinEvent($g_hEventHook) DllCallbackFree($g_hEventProc) _WinAPI_UnhookWindowsHookEx($g_hHook) DllCallbackFree($g_hStub_KeyProc) EndFunc ;==>_OnAutoItExit The best way to test the program is to run it from Scite, then resize Scite window while a Control key is pressed. It allows to read the results in Scite Console while resizing and/or pressing the Control keys. Then closing the useless NotePad window will end the script (or you can end it directly by clicking on exit in AutoIt icon from the systray). No matter the way you'll choose to end the script, the important function OnAutoItExit() will be triggered. Good luck Updates : * Sunday Oct 9, 2022 : display also the window title of the moved/resided window * Monday Oct 10, 2022 : added code for detecting a pressed Alt key
    1 point
  5. Version 0.1.0

    810 downloads

    ATTENTION! THIS IS STILL WORK IN PROGRESS! This is the modified version of MrCreatoR's "Simple Library Docs Generator". It allows to create CHM help files that look like the AutoIt help file. In additon this CHM files can then be used with Advanced.Help. This a very early alpha version - so it is miles away from being perfect. It's just something for you to play with. The documentation is in the making and will be published as soon as possible. BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort
    1 point
  6. Nine

    x64 bitwise operations

    I needed a very fast x64 unsigned shift right, and doing it through an AutoIt array was way too slow. So I decided to make a .dll to perform such a task. While I was there, why not include all the bitwise operators that I know of. And then why not make a UDF. This is a bit like my wife does, she buys some draperies and then I end up repainting the whole room because the colors do not match anymore. Anyway, hope it can be useful for you too. Let me know if you have enhancements or comments, I will be glad to incorporate them (if possible). Version 2020-04-27 Func _BitAND64 Func _BitOR64 Func _BitXOR64 Func _BitEQV64 Func _BitIMP64 Func _BitSHIFT64 Func _BitROTATE64 Func _BitNOT64 Func _x64CloseDLL Func _Hex2Dec x64_Ops.zip
    1 point
  7. Try this #include <String.au3> ConsoleWrite(Integer2Binary(0x5) & @CRLF) ConsoleWrite(Integer2Binary(0x8683) & @CRLF) Func Integer2Binary($in) If $in = 0 Then Return 0 Local $bin While $in > 0 $bin &= Mod($in, 2) $in = Floor($in / 2) WEnd Return(_StringReverse($bin)) EndFunc Br, UEZ
    1 point
  8. 49,629 downloads

    Ver 1.3.7 Feb. 12, 2007 Includes... * a fully functional executable program demonstrating all current XSkin Functions * All includes/UDF Files * 40+ Skins * 20+ Buttons * HTML Help File ... Enjoy!!! Valuater 8)
    1 point
×
×
  • Create New...