Что нового

Возможна ли работа PMX.dll в autoit

lirikmel

Продвинутый
Сообщения
226
Репутация
84
Most of the functions that AutoIt uses are hooked by GG(keybd_event, SendInput, PostMessage, GetPixel, etc), so its pretty much useless. You are going have to code your own program to get around GG. The easiest method, with intermediate knowledge of coding in C++, is using hook-hopping to get around the hooks and create your own bot. If you don't want to code your own hookhop, you can always search PMX.dll, used for hook-hopping in MS in your app. I believe it bypasses all the neccessary functions, which you can use in your program.

Если возможно , приведите плз пример посылки какой-нибудь клавиши
 

asdf8

Скриптер
Сообщения
564
Репутация
152
Код:
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>

$Form1 = GUICreate("Form1", 288, 142, -1, -1)
$Button1 = GUICtrlCreateButton("Click to start", 36, 24, 217, 29)
$Button2 = GUICtrlCreateButton("Exit", 36, 80, 217, 29)
GUISetState(@SW_SHOW)

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			$handle = ControlGetHandle($Form1, '', $Button2)
			$x = 100
			$y = 10
			
			DllCall('PMX.dll', 'none', 'PostMessageX', 'hwnd', $handle, 'UINT', $WM_LBUTTONDOWN, 'WPARAM', 0, 'LPARAM', _WinAPI_MakeLong($x, $y))
			ConsoleWrite('->' & @error & @CRLF)
			Sleep(50)
			DllCall('PMX.dll', 'none', 'PostMessageX', 'hwnd', $handle, 'UINT', $WM_LBUTTONUP, 'WPARAM', 0, 'LPARAM', _WinAPI_MakeLong($x, $y))
			ConsoleWrite('->' & @error & @CRLF)
		Case $Button2
			Sleep(500)
			Exit
	EndSwitch
WEnd
 
Автор
L

lirikmel

Продвинутый
Сообщения
226
Репутация
84
Спасибо все работает . Тему считаю закрытой
 
Верх