Jump to content
Sign in to follow this  
Nu11Fish

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

Recommended Posts

Nu11Fish

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
water

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 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - 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
Bert

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
somdcomputerguy

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
DicatoroftheUSA

The forum has a search function. So does the help file.

I gaurentee I found the following faster than the time it took you to post.

Edited by DicatoroftheUSA

Share this post


Link to post
Share on other sites
water

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


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - 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
ileandros

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
Blue_Drache

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
JLogan3o13

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
iamtheky

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
Jos

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                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
ileandros

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  

×