Posted: Mon Mar 17, 2008 12:53 am
				
				Using any hooks should slow down your system by a fraction at least - but you prob. wouldn't notice.
			http://www.purebasic.com
https://www.purebasic.fr/english/

That's what I said.Sparkie wrote:WH_KEYBOARD_LL = no DLL required for global use
WH_MOUSE_LL = no DLL required for global use
all other WH_* = DLL required for global use

 
  
  
   
 Code: Select all
Global Quit
Procedure MouseKeyHook(nCode, wParam, lParam) 
   
 Select wParam
  
  Case #WM_RBUTTONDOWN 
  
   Debug "Clic droit"
  
  Case #WM_KEYDOWN
  
   EventwParam()
  
  Case #WM_KEYUP 
   
   EvenementClavier = EventwParam() 
 
   If EvenementClavier = 27
    Quit = #True
   ElseIf EvenementClavier <> 16
    Debug "Appuie touche " + Chr(EvenementClavier)
   EndIf
       
 EndSelect
 ProcedureReturn CallNextHookEx_(0, nCode, wParam, lParam) 
 
EndProcedure 
OpenWindow(0, 0, 0, 240, 140, "MouseBlock", #WS_CAPTION|#WS_SYSMENU|1) 
StickyWindow(0,1) 
hhkLLMouse = SetWindowsHookEx_(#WH_MOUSE_LL, @MouseKeyHook(), GetModuleHandle_(0), 0) 
hhkLLKey = SetWindowsHookEx_(#WH_KEYBOARD_LL, @MouseKeyHook(), GetModuleHandle_(0), 0) 
Repeat 
 Evenement = WaitWindowEvent() 
Until Quit = #True Or Evenement = #PB_Event_CloseWindow
UnhookWindowsHookEx_(hhkLLMouse)
UnhookWindowsHookEx_(hhkLLKey)
It's totally normal, because i'm a asshole in programming with a egg headFluid and Kaeru wrote:creeps and hemorrhoids ...
 
 
 
   
   
   
   
   
   
   
   
  
 
  
  
   
  
   say me, hihihi
 say me, hihihi   
  my procedure MouseKeyHook(nCode, wParam, lParam)
 my procedure MouseKeyHook(nCode, wParam, lParam)    
   
  
  
 
   the more funny
 the more funny   
   in this story hy hy hy hy
 in this story hy hy hy hy   it's that works
 it's that works   
   
  
   but it's works hahaha
 but it's works hahaha  

Kwaï chang caïne wrote:It's totally normal, because i'm a asshole in programming with a egg head
 
 Kwaï, honestly, do you really know what you are doing?Kwaï chang caïne wrote:1/ Is it the good way to do that ??
2/ Have you more simple method, to go out, without have Quit in global ??
3/ When i press the Shift KEY, i have two debug letter, have you a way to don't do this ???
 
 Code: Select all
Structure KBDLLHOOKSTRUCT
	vkCode.l
	scanCode.l
	flags.l
	time.l
	dwExtraInfo.l
EndStructure
Procedure HookProc(nCode,wParam,lParam)
	Select wParam
		Case #WM_RBUTTONDOWN
		Debug "Clic droit"
		
		Case #WM_KEYDOWN
		
		Case #WM_KEYUP
		*kbhk.KBDLLHOOKSTRUCT = lParam
				
		If *kbhk\vkCode ! #VK_LSHIFT And *kbhk\vkCode ! #VK_RSHIFT And *kbhk\vkCode ! #VK_CAPITAL
			Debug "Appuie touche " + Chr(EventwParam())
		EndIf
	EndSelect
	
	ProcedureReturn CallNextHookEx_(0,nCode,wParam,lParam)	
EndProcedure
OpenWindow(0,0,0,240,140,"Mouse+Keyboard Block",#WS_CAPTION | #WS_SYSMENU | 1)
StickyWindow(0,1)
hhkLLMouse = SetWindowsHookEx_(#WH_MOUSE_LL,@HookProc(),GetModuleHandle_(0),0)
hhkLLKey = SetWindowsHookEx_(#WH_KEYBOARD_LL,@HookProc(),GetModuleHandle_(0),0)
AddKeyboardShortcut(0,#PB_Shortcut_Escape,101)
Repeat
	EventID = WaitWindowEvent()
	
Until EventID = #PB_Event_CloseWindow Or EventMenu() = 101
UnhookWindowsHookEx_(hhkLLMouse)
UnhookWindowsHookEx_(hhkLLKey) 
  
 But no, you know i'm born an oysterKwaï, honestly, do you really know what you are doing?
 
  
  
 Why, you be affraid of what i do with this ????I have put together an example but I don't feel too well giving it to your hands!
 
 
With Firefox, I don't have this problem anymore ...Kwaï chang caïne wrote:Because sometime, i wrote a long text in a forum thread, and when i click on the submit button, "paf" the post not go out, and the text is cleared

 
  
 
this definitely an IE problem.Kwaï chang caïne wrote:When i click the back button, the windows of text is empty too.
All is lost