Sign in to follow this  
Followers 0
Nu11Fish

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

12 posts in this topic

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.

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

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

Read thru the Help file, especially the part about the Send function, and you will find a simple solution.

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

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


I feel nothing.It feels great.

Share this post


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

Share this post


Link to post
Share on other sites

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?!

√-1 2^3 ∑ π, and it was delicious!

Share this post


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


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

Share this post


Link to post
Share on other sites

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


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

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.

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