I just wanted to know if there were ways to simulate inputs (from keyboard) or maybe a way to insert any character a bit like with alt code but using luascript.
Edit: I found that there was a way with santa_ryan's control suit . But maybe you guys know other ways ?
It is currently April 27th, 2024, 1:00 am
Way to simulate inputs?
-
- Posts: 60
- Joined: November 5th, 2016, 12:15 pm
-
- Rainmeter Sage
- Posts: 16174
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Way to simulate inputs?
I'm not sure what "santa_ryan's control suit" represents, but the following function can do what you asked:
This code returns into the Rand variable of your skin, a randomly chosen char.
Code: Select all
function makeString(l)
if l < 1 then return nil end -- Check for l < 1
local s = "" -- Start string
for i = 1, l do
s = s .. string.char(math.random(32, 126)) -- Generate random number from 32 to 126, turn it into character and add to string
end
return s -- Return string
end
function Update()
SKIN:Bang('!SetVariable', 'Rand', makeString(1))
end
-
- Posts: 826
- Joined: November 20th, 2012, 11:58 pm
Re: Way to simulate inputs?
Can you indicate the skin you found, so as to allow others to have already a solution?LGP123 wrote:I just wanted to know if there were ways to simulate inputs (from keyboard) or maybe a way to insert any character a bit like with alt code but using luascript.
Edit: I found that there was a way with santa_ryan's control suit . But maybe you guys know other ways ?
-
- Posts: 60
- Joined: November 5th, 2016, 12:15 pm