Sign in to follow this  
Followers 0
OiMunk

Script scans keyInput: HotKeySet not working

7 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Lookup _ispressed in the help file

Edit - Why 3 posts on the same subject ?

Edited by BigDod


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0