PDA

View Full Version : Monitor Plugin



BeRnA
May 11th, 2005, 08:24 PM
I enabled the monitor plugin to turn on/off monitor and I dont find the LUA function to use, it seems this plugin is missing lua...

PS: I use win.PostMessage to send messages to programs in LUA, how do I send keyboard keys in lua ?

Thanks in advance.

Ron
May 11th, 2005, 09:37 PM
About the monitor plugin, Not every plugin has a lua side to it.

Sendkey:

gir.SendKey([WindowHandle],[String])

The string is the same as the KeyboardEx functionality. See helpfile.

BeRnA
May 12th, 2005, 12:00 AM
[string "mygirder:\devices\base\dscaler"]:27: bad argument #3 to `SendKeys' (number expected, got no value)

Can you give-me an example on how to use it? I can't find nothig in the help file.

PS: In the Edit Action Window, if I go to View -> Variable Inspector it does apperar...

birty
May 12th, 2005, 03:35 AM
its in the "actions\keyboard actions" section of the manual

BeRnA
May 12th, 2005, 04:58 AM
Ok, but manual talk about gir.SendKey that receive 2 arguments, and in Variable Inspector there are only gir.SendKeys that receive 3 arguments...

birty
May 12th, 2005, 05:42 AM
you mean where in the variable inspector it says:


C
=[C]
[C]
?
that simply means that the function is a c funtion and the varaible inspector doesn't know anything about its parameters or return values

Promixis
May 12th, 2005, 08:38 AM
Here is the example file for the monitor plugin extensions...

BeRnA
May 12th, 2005, 09:30 AM
you mean where in the variable inspector it says:


C
=[C]
[C]
?
that simply means that the function is a c funtion and the varaible inspector doesn't know anything about its parameters or return values

No, you are not understanding...
I'm saying that the functions is not gir.SendKey but gir.SendKeys and it needs 3 arguments and not two... The manual is not correct!
And what is the third argument to?
I tried gir.SendKeys(winhandler,key,1) and it works...

BeRnA
May 12th, 2005, 09:34 AM
Here is the example file for the monitor plugin extensions...

What I was asking is a way to turn monitor in power saving mode, like I can do with the monitor plugin in the UI on the left...
I think all the plugins should trie to have a lua interface to use by users who want scripting... And it seams that plugin is missing it!

Promixis
May 12th, 2005, 10:34 AM
Agreed. Will look into it.

Ron
May 12th, 2005, 09:55 PM
Fixed SendKeys to only need 2 parameters.