Jump to content

KeyPress?


Recommended Posts

How would I make a key press like...for example...

HotKeySet("{Esc}","Terminate")
While 1
//This would be sending a function key like Ctrl?
WEnd
Func Terminate()
   Exit
EndFunc

Thanks!

look at https://www.autoitscript.com/autoit3/docs/functions/Send.htm, it said there:

 

'^'

This tells AutoIt to send a CONTROL keystroke; therefore, Send("^!a") would send "CTRL+ALT+a".

so, post your complete code if you don't understand this.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

Could you please describe which program you try to automate? Using "Send" is not always very reliable and most of the times there are better ways to do what you want to do.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • Developers

Reading through the posts you made in the last couple days the following sticks out:

  • Your intentions seem to be dodgy to say the least.
  • You ask simple questions that should have been easily found by opening the helpfile or a little searching.
  • You claim to know the rules but yet are posting an example image with the word Captha in it.

 

So, you have my attention and would advice you to start thinking and putting in a little effort before asking the next question.

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

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