Jump to content

Holding down SPACE with Send


Guest angelcat
 Share

Recommended Posts

Guest angelcat

Hello all, this is my first post and I have a feeling it's probably a silly question

I am trying to write a simple script to hold down the Spacebar - (the applet I

am trying to partly automate uses this to present an alternative display which reverts

to its standard one when the Spacebar is released)

I have tried the following:-

Send("{SPACE} down")

Sleep(3000)

Send("{SPACE} up}")

and fed it to a TextPad window with the following

result where I have substituted dots to represent

visible spaces for clarity

..down..up

And the applet behaves as though it were getting

exactly the same input

I have also tried several different approaches including

using a variable $S to hold " " with no success

having scoured past posts for a clue I am beginning to feel I

am up against an intractable problem :ph34r:

But would be happy to have my mistake pointed out! :(

angelcat

Link to comment
Share on other sites

Guest angelcat

Send("{SPACE down}")

<{POST_SNAPBACK}>

Thank you Jon for that prompt reply - I have tested it

(with nice chunks of Sleep between characters) and the

results are curious

In TextPad

{SPACE down} gives a space

{SPACE up} does nothing

In the target applet

{SPACE down} does nothng

{SPACE up} gives a space

Clearly the two programs organise themselves

differently in the processing of keystrokes and

it looks like the applet is detecting the keydown

condition in some manner which is not 'fooled'

by the {SPACE down}

It may be back to the drawing board for me!

angelcat

Link to comment
Share on other sites

Guest angelcat

I finally worked it out!!

If I script:-

Send("{SPACE down}");does nothing

Send("{SPACE down}");triggers the display effect!

The applet is imputing a different meaning to "Space held down"

than to "Space pressed and released" - so I guesss it's

waiting for the second SpaceDown condition to occur

It does it fine now - thanks - It's so much easier to figure these

things when you KNOW your syntax s OK :ph34r:

Thanks a bunch, Jon

angelcat

Link to comment
Share on other sites

maybe you want to try playing with Opt("sendkeydowndelay",X) to see if that helps.

I finally worked it out!!

If I script:-

Send("{SPACE down}");does nothing

Send("{SPACE down}");triggers the display effect!

The applet is imputing a different meaning to "Space held down"

than to "Space pressed and released" - so I guesss it's

waiting for the second SpaceDown condition to occur

It does it fine now - thanks - It's so much easier to figure these

things when you KNOW your syntax s OK  :ph34r:

Thanks a bunch, Jon

angelcat

<{POST_SNAPBACK}>

"I'm not even supposed to be here today!" -Dante (Hicks)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...