Notifications
Clear all

[Closed] dotNetClass "system.windows.forms.control"

Hello, I have a few question concerning the dotNetClass “system.windows.forms.control”
…I have already use them without problems but I am facing a problem curently.

First, can we trigger something when pressing two key in the same time ? I have think putting a if key.modifierKeys into another if key.modifierKeys but maybe there is something more elegant for doing this ?

Also, last time I have use successfully the key.modifierKeys I needed a timer for doing other stuff… I have try doing something else without timer, I was thinking this Class works pretty much like a callback but nothing happens at all, and if I add a timer well… I get a syntax error even so there is none (Simply removing the timer remove the error…)

on KeyWeight changed KeyWeightState do
(

	if KeyWeightState == true do
        (	
	  on KeyWeightTimer tick do 
	  (
	    local key = dotNetClass "system.windows.forms.control"	
			
	     if key.modifierKeys==key.modifierKeys.Shift do
		(
			Print "Shift pressed"
		)
						
											
		if key.modifierKeys==key.modifierKeys.W do
		(
		print "W pressed"							
		)	
	   )								
     	)
		if KeyWeightState == False do
		(
						 
		)

)