AutoHotkey, WinAPI & DllCall's
!!! Support will be discontinued here !!!
You can find the latest version here [>>> AutoHotkey, WinAPI & DllCall's <<<]

AHK, WinAPI & DllCall's
Started by
jNizM
, Dec 06 2013 01:20 PM
14 replies to this topic
#1
-
Posted 06 December 2013 - 01:20 PM

[AHK] 1.1.27.04 x64 Unicode | [WIN] 10 Pro (Version 1709)
My GitHub Profile | Donations are appreciated if I could help you
My GitHub Profile | Donations are appreciated if I could help you
update:
Add Keyboard Input Functions \ BlockInput
Add Keyboard Input Functions \ GetKBCodePage
Add Keyboard Input Functions \ GetKeyboardLayout
Add Mouse Input Functions \ GetCapture
Add Mouse Input Functions \ GetDoubleClickTime
Add Mouse Input Functions \ ReleaseCapture
Add Mouse Input Functions \ SetDoubleClickTime
Add Mouse Input Functions \ SwapMouseButton
Add Keyboard Input Functions \ BlockInput
Add Keyboard Input Functions \ GetKBCodePage
Add Keyboard Input Functions \ GetKeyboardLayout
Add Mouse Input Functions \ GetCapture
Add Mouse Input Functions \ GetDoubleClickTime
Add Mouse Input Functions \ ReleaseCapture
Add Mouse Input Functions \ SetDoubleClickTime
Add Mouse Input Functions \ SwapMouseButton
#2
-
Posted 09 December 2013 - 08:43 AM

[AHK] 1.1.27.04 x64 Unicode | [WIN] 10 Pro (Version 1709)
My GitHub Profile | Donations are appreciated if I could help you
My GitHub Profile | Donations are appreciated if I could help you
How can I use BlockInput in Windows 7?
I used the function but the mouse pointer can be moved further.
#5
-
Posted 23 December 2013 - 03:30 PM

You need to run the script with admin privileges. Also, you might want to use AHK's blockInput command, as it has more options.
Cheers.
#6
-
Posted 23 December 2013 - 04:18 PM

Is there another possibility to block mouse input without admin privileges?
#7
-
Posted 24 December 2013 - 10:26 PM

Is there another possibility to block mouse input without admin privileges?
SetBatchLines, -1 #SingleInstance force OnExit, RemoveHooks mouseHook := SetWindowsHookEx(14, RegisterCallback("MouseHook")) return RemoveHooks: UnhookWindowsHookEx(mouseHook) ExitApp return f1:: global mouseBlock := True sleep 3000 mouseBlock := False return ; mouse has different WM_Messages for each down/up event on each button ; check the wm_ messages in ahk manual or google to find the one you need if you only want ; to block a particular button ; eg wParam = WM_MOUSEMOVE := 0x200 for mouse movement MouseHook(nCode, wParam, lParam) { Critical 1000 If !nCode { ; Input is blocked and this is a user pressed / released button if (mouseBlock && !(NumGet(lParam+12) & 0x10)) ; LLKHF_INJECTED key not sent via sendinput return -1 ; this causes other hooks in the chain to ignore the input } Return CallNextHookEx(nCode, wParam, lParam) ; make sure other hooks in the chain receive this event if we didn't process it } SetWindowsHookEx(idHook, pfn) { Return DllCall("SetWindowsHookEx", "int", idHook, "Uint", pfn, "Uint", DllCall("GetModuleHandle", "Uint", 0), "Uint", 0) } UnhookWindowsHookEx(hHook) { Return DllCall("UnhookWindowsHookEx", "Uint", hHook) } CallNextHookEx(nCode, wParam, lParam, hHook = 0) { Return DllCall("CallNextHookEx", "Uint", hHook, "int", nCode, "Uint", wParam, "Uint", lParam) }
Obviously you can also have the hook always block stuff without the 'mouseBlock' variable and just install/remove the hook when you want to block stuff.
#8
-
Posted 25 December 2013 - 06:19 AM

update:
Add Multimedia Functions \ timeGetTime
Fix Time Functions \ GetTickCount
Fix Time Functions \ GetTickCount64
Add Multimedia Functions \ timeGetTime
Fix Time Functions \ GetTickCount
Fix Time Functions \ GetTickCount64
#9
-
Posted 14 February 2014 - 08:58 AM

[AHK] 1.1.27.04 x64 Unicode | [WIN] 10 Pro (Version 1709)
My GitHub Profile | Donations are appreciated if I could help you
My GitHub Profile | Donations are appreciated if I could help you
update:
Add National Language Support Functions \ GetDurationFormat
Add System Information Functions \ GetComputerName
Add System Information Functions \ GetProductInfo
Add System Information Functions \ GetSystemDirectory
Add System Information Functions \ GetSystemRegistryQuota
Add System Information Functions \ GetSystemWindowsDirectory
Add System Information Functions \ GetSystemWow64Directory
Add System Information Functions \ GetUserName
Add System Information Functions \ GetWindowsDirectory
Fix Array-Begin from 0 to 1
Add National Language Support Functions \ GetDurationFormat
Add System Information Functions \ GetComputerName
Add System Information Functions \ GetProductInfo
Add System Information Functions \ GetSystemDirectory
Add System Information Functions \ GetSystemRegistryQuota
Add System Information Functions \ GetSystemWindowsDirectory
Add System Information Functions \ GetSystemWow64Directory
Add System Information Functions \ GetUserName
Add System Information Functions \ GetWindowsDirectory
Fix Array-Begin from 0 to 1
#10
-
Posted 24 February 2014 - 12:25 PM

[AHK] 1.1.27.04 x64 Unicode | [WIN] 10 Pro (Version 1709)
My GitHub Profile | Donations are appreciated if I could help you
My GitHub Profile | Donations are appreciated if I could help you
update:
Add String Functions \ CharLower
Add String Functions \ CharLowerBuff
Add String Functions \ CharUpper
Add String Functions \ CharUpperBuff
Fix return (delete , and %)
Add String Functions \ CharLower
Add String Functions \ CharLowerBuff
Add String Functions \ CharUpper
Add String Functions \ CharUpperBuff
Fix return (delete , and %)
#11
-
Posted 03 March 2014 - 10:58 AM

[AHK] 1.1.27.04 x64 Unicode | [WIN] 10 Pro (Version 1709)
My GitHub Profile | Donations are appreciated if I could help you
My GitHub Profile | Donations are appreciated if I could help you
Is there another possibility to block mouse input without admin privileges?
how can i use it ?
#12
-
Posted 06 March 2014 - 04:01 PM

update:
Add File Management Functions \ GetFileAttributes
Add File Management Functions \ GetFileSize
Add File Management Functions \ GetFileSizeEx
Add File Management Functions \ GetTempPath
Add File Management Functions \ GetFileAttributes
Add File Management Functions \ GetFileSize
Add File Management Functions \ GetFileSizeEx
Add File Management Functions \ GetTempPath
#13
-
Posted 12 May 2014 - 06:08 AM

[AHK] 1.1.27.04 x64 Unicode | [WIN] 10 Pro (Version 1709)
My GitHub Profile | Donations are appreciated if I could help you
My GitHub Profile | Donations are appreciated if I could help you
update:
Add Error Handling Functions \ FormatMessage
Add Error Handling Functions \ GetLastError
Add PSAPI Functions \ GetModuleFileNameEx
Fix c++ codes
Add Error Handling Functions \ FormatMessage
Add Error Handling Functions \ GetLastError
Add PSAPI Functions \ GetModuleFileNameEx
Fix c++ codes
#14
-
Posted 15 May 2014 - 01:45 PM

[AHK] 1.1.27.04 x64 Unicode | [WIN] 10 Pro (Version 1709)
My GitHub Profile | Donations are appreciated if I could help you
My GitHub Profile | Donations are appreciated if I could help you
update:
Change License
Fix Bugs
Add Error handling
Add Directory Management Functions \ CreateDirectory
Add Directory Management Functions \ RemoveDirectory
Add Directory Management Functions \ SetCurrentDirectory
Add Mouse Input Functions \ ClipCursor
Add System Information Functions \ GetUserNameEx
Please report any bugs or mistakes.
New update with bugfixes, error handlings and new Functions coming soon
Change License
Fix Bugs
Add Error handling
Add Directory Management Functions \ CreateDirectory
Add Directory Management Functions \ RemoveDirectory
Add Directory Management Functions \ SetCurrentDirectory
Add Mouse Input Functions \ ClipCursor
Add System Information Functions \ GetUserNameEx
Please report any bugs or mistakes.
New update with bugfixes, error handlings and new Functions coming soon
#15
-
Posted 11 March 2015 - 11:43 AM

[AHK] 1.1.27.04 x64 Unicode | [WIN] 10 Pro (Version 1709)
My GitHub Profile | Donations are appreciated if I could help you
My GitHub Profile | Donations are appreciated if I could help you