So i got a new keyboard wit hG-keys. (hotkeys) And i'm not familiar with lua... So could anybody give me a very simple command that sets my pc to sleep? please?
if gkey == 7 and mkey == 1 then
if event == "G_PRESSED" then
end
end
gkeys so gkey is the key that is pressed, and mkey is the set it uses. i can have up to 54 differint scripts/macro's. I want to know what i have to put after the last 'then' so my pc goes to sleep.
thx ahead edit 1: got this:
if gkey == 1 and mkey == 3 then
if event == "G_PRESSED" then
execute("rundll32.exe powrprof.dll,SetSuspendState 0,1,0");
end
end
error is: [string "LuaVM"]:40: attempt to call global 'execute'(a nil value)
and with os.execute i get this error:
[string "LuaVM"]:40: attempt to index global 'os'(a nil value)
final answer: not possible with gseries keyboard. use a shortcut