SRL Archive - Jr. Member General Help and Discussion

How to use setKeyMouseTarget


Foundry

2013-12-09 08:52:36

I was looking in Simba's documentation and was unable to determine what I an supposed to pass to this to make it work. I tried the process id, but that gave me an error.

Turpinator

2013-12-09 11:36:48

https://github.com/MerlijnWajer/Simba/blob/457b4092adf572bdacd495293f908550daa798bb/Doc/sphinx/scriptref/window.rst#setkeymousetarget

Ive got no idea though.

bg5

2013-12-13 22:04:16

As argument is idx ,it's propably index in Simba's internal array of targets. When you start script your current target has index = 1 ,if you change target it will have index = 2 etc. Seems quite useless to me. It's analog to SetImageTarget, but for mouse/keyboard.

If you want to set target by pid use SetTarget().
http://docs.villavu.com/simba/scriptref/window.html?highlight=tsysproc#getprocesses

Foundry

2013-12-25 14:25:46

From: bg5
As argument is idx ,it's propably index in Simba's internal array of targets. When you start script your current target has index = 1 ,if you change target it will have index = 2 etc. Seems quite useless to me. It's analog to SetImageTarget, but for mouse/keyboard.

If you want to set target by pid use SetTarget().
http://docs.villavu.com/simba/scriptref/window.html?highlight=tsysproc#getprocesses


Thanks, this worked perfectly. +1