Topics

Question about scriptHandler.executeScript and getLastScriptRepeatCount


Javi Domínguez
 

Hello.

I am using scriptHandler.executeScript (script, gesture) to launch a script but the action I want to execute requires gesture to be pressed twice (the script uses getLastScriptRepeatCount). How can I get scriptHandler.executeScript to execute that action and not the one-press action?

Thanks

Greetings

Javi Dominguez


Sean
 

if getLastScriptRepeatCount() == 2 ...

elif getLastScriptRepeatCount()== 3 ...


addon developers use it this way. Just write this to the main function or other trigged area.

On 09/01/2021 02:16, Javi Domínguez wrote:
Hello.

I am using scriptHandler.executeScript (script, gesture) to launch a script but the action I want to execute requires gesture to be pressed twice (the script uses getLastScriptRepeatCount). How can I get scriptHandler.executeScript to execute that action and not the one-press action?

Thanks

Greetings

Javi Dominguez





Javi Domínguez
 

Hi.

Thank you but I think you have not answered what I was asking.

What you say is already in the script, what I want to do is run that script from my addon without the user having pressed the gesture. I don't know how to ask scriptHandler.executeScript to execute that part that is in the if if getLastScriptRepeatCount () == 2. I clarify that the script I want to invoke is outside of my addon

Greetings

Javi Dominguez

El 09/01/2021 a las 4:57, Sean escribió:
if getLastScriptRepeatCount() == 2 ...

elif getLastScriptRepeatCount()== 3 ...


addon developers use it this way. Just write this to the main function or other trigged area.


On 09/01/2021 02:16, Javi Domínguez wrote:
Hello.

I am using scriptHandler.executeScript (script, gesture) to launch a script but the action I want to execute requires gesture to be pressed twice (the script uses getLastScriptRepeatCount). How can I get scriptHandler.executeScript to execute that action and not the one-press action?

Thanks

Greetings

Javi Dominguez








Javi Domínguez
 

OK, I think I already have it.

I have to repeat the line scriptHandler.executeScript (script, gesture) as many times as keystrokes I want to emulate.

Greetings

Javi Dominguez

El 09/01/2021 a las 20:49, Javi Domínguez via groups.io escribió:
Hi.

Thank you but I think you have not answered what I was asking.

What you say is already in the script, what I want to do is run that script from my addon without the user having pressed the gesture. I don't know how to ask scriptHandler.executeScript to execute that part that is in the if if getLastScriptRepeatCount () == 2. I clarify that the script I want to invoke is outside of my addon

Greetings

Javi Dominguez

El 09/01/2021 a las 4:57, Sean escribió:
if getLastScriptRepeatCount() == 2 ...

elif getLastScriptRepeatCount()== 3 ...


addon developers use it this way. Just write this to the main function or other trigged area.


On 09/01/2021 02:16, Javi Domínguez wrote:
Hello.

I am using scriptHandler.executeScript (script, gesture) to launch a script but the action I want to execute requires gesture to be pressed twice (the script uses getLastScriptRepeatCount). How can I get scriptHandler.executeScript to execute that action and not the one-press action?

Thanks

Greetings

Javi Dominguez