Page 1 of 1
					
				Use load command
				Posted: Mon Nov 15, 2021 11:45 pm
				by davoodice2
				Hello friends
Can i do this?
Code: Select all
Local a= "mouseEvent.shiftKey"
If(a) then
...
End
I find some thing like load command in lua so
Code: Select all
Local a= "mouseEvent.shiftKey"
If(load(a)) then
...
End
But this didnt work
 
			 
			
					
				Re: Use load command
				Posted: Tue Nov 16, 2021 12:11 am
				by hayasidist
				mouseEvent.shiftKey is a boolean...
so if you want to check if the shift key is down it's
if mouseEvent.shiftKey  then
-- code if shift is pressed
else
-- code if not shift
end
			 
			
					
				Re: Use load command
				Posted: Tue Nov 16, 2021 12:59 am
				by davoodice2
				hayasidist wrote: ↑Tue Nov 16, 2021 12:11 am
mouseEvent.shiftKey is a boolean...
so if you want to check if the shift key is down it's
if mouseEvent.shiftKey  then
-- code if shift is pressed
else
-- code if not shift
end
 
thanks 
NO my goal isn't check shift key. I want change shift to alt for example and it applie to all script. actually i want store mouseEvent.shiftkey into variable,and i change variable instead of mouseEvent.shift
 
			 
			
					
				Re: Use load command
				Posted: Tue Nov 16, 2021 11:17 am
				by synthsin75
				Well, you could do mouseEvent.shiftKey = mouseEvent.altKey, but then you'd lose access to the shift key. 
I don't understand what you're trying to do.
			 
			
					
				Re: Use load command
				Posted: Tue Nov 16, 2021 11:29 am
				by hayasidist
				davoodice2 wrote: ↑Tue Nov 16, 2021 12:59 am
NO my goal isn't check shift key. I want change shift to alt for example and it applie to all script. actually i want store mouseEvent.shiftkey into variable,and i change variable instead of mouseEvent.shift
 
 
you mean you want all scripts - including "factory" ones to react as though (e.g.) shift was pressed when the user actually pressed alt ???
 
			 
			
					
				Re: Use load command
				Posted: Tue Nov 16, 2021 12:09 pm
				by synthsin75
				hayasidist wrote: ↑Tue Nov 16, 2021 11:29 am
you mean you want all scripts - including "factory" ones to react as though (e.g.) shift was pressed when the user actually pressed alt ???
 
If so, that would sound like a use for AutoHotkey, if on Windows.