Jump to content

How do I send a "hold xbutton down for x time"?


Nu11Fish
 Share

Recommended Posts

I'm trying to automate something and I need to have it press RSHIFT and then Right mouseclick, I already have the window stuff setup but putting

Send("{RSHIFT}")

MouseClick( "Right", 1110, 435, 1, 1)

The shift button needs to be held down so that when right mouseclick happens then its like rshift+mouseright.

Because the GUI shows a seperate menu when you press Shift. So a hold shift till x time would work.

Link to comment
Share on other sites

Can you tell us which program you try to automate and what you try to achieve? Maybe there is an easier way to do what you want.

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

Agreed. Please understand since you are new - if this inquiry is for a game then this subject will not be discussed and the thread will be reported to a moderator. Usually they will close the thread. If you have any questions feel free to review the forum rules. Now, if this isn't for a game and does not run afoul of the forum rules, it would be a great help in you telling us what the name of the application is. Odds are someone has already done the work you ask and we can point you in the correct direction. This will save you time, and makes things much more pleasant.

Edited by scullion
Link to comment
Share on other sites

Yeah, but the question still has to be answered: What do you need it for?

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

Long clicks are used in mobile devices. AutoIt doesn't work on Mobile devices.

Long clicks are also used in games to "charge up" some abilities.

I smell something and it ain't what the Rock is cookin'

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

  • Moderators

Send("{SHIFTDOWN}")
MouseClick( "Right", 1110, 435, 1, 1)
Send("{SHIFTUP}")

Did you not see the 10 people trying to confirm the OPs post didn't violate the forum rules before putting something like that in there?!

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

The OP asked how to Shift + Right-Click, and none of his other posts seem remotely close to gaming. So what about this post arouses suspicion? The only thing that makes this thread show up in a google search about autoit and gaming is the replies.

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

  • Developers

Could I ask everybody to stop these type of rather silly discussion threads and simply hit the report button when you feel it is against our rules?

This is clearly polluting the OP's question.

Thanks,

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

Did you not see the 10 people trying to confirm the OPs post didn't violate the forum rules before putting something like that in there?!

No i didnt read them, i read them now.

I prefere helping people than being suspicius if they are using it for games. But i know, its harder to think possitive than thinking negative.

Even if he is using for a game automatation or something like that i dont feel that this code would change his life.

I post to help not to rise the number of my posts.

And as he said:

Could I ask everybody to stop these type of rather silly discussion threads and simply hit the report button when you feel it is against our rules?

This is clearly polluting the OP's question.

Thanks,

Jos

I feel nothing.It feels great.

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