Jump to content

Recommended Posts

Posted

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

Posted (edited)

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

  • Developers
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

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.
  :)

Posted

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

  • Developers
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

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.
  :)

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

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
×
×
  • Create New...