Jump to content

Script scans keyInput: HotKeySet not working


OiMunk
 Share

Recommended Posts

I need the script to know when the user has pressed ENTER, but I need the ENTER to also get through to the active app.

When I try the script I think the function is calling itself. I can't use ControlSend in this particular situation. Ideas?

HotKeySet("{ENTER}", "TEST")

Sleep(10000)

Func TEST()

Send("{ENTER}")

OtherFunctions()

EndFunc

Link to comment
Share on other sites

Lookup _ispressed in the help file

Edit - Why 3 posts on the same subject ?

Edited by BigDod


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

  • Developers

You could also just deactivate the hotkey before send.

HotKeySet("{ENTER}", "TEST")
Sleep(10000) 

Func TEST()
   HotKeySet("{ENTER}")
   Send("{ENTER}") 
   OtherFunctions()
   HotKeySet("{ENTER}", "TEST")
EndFunc
Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Thanks, that was exactly what I needed.

This was my 1st post on the topic, so I have no idea why you are saying 3 posts.

It was showing up 3 times when I posted. It might have been a problem with my browser, but yours was the only duplicate.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

  • Developers

It was showing up 3 times when I posted. It might have been a problem with my browser, but yours was the only duplicate.

you're right ... nothing wrong with your browser nor your eyes, I zapped them.

:)

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Okay, good to know, certainly not intentional. Next time I'll watch for duplicates.

Jos: I actually tried that before posting, but it didn't work (the "ENTER" was never sent). Maybe something to do with the deactivating call occurring withing the function that's being de-activated? (really not sure).

Edited by OiMunk
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...