Sign in to follow this  
Followers 0
Tarte

Shift Right Click

10 posts in this topic

Does anyone know the correct sytax for doing a shift right click? I am trying to do a "Run As" by using the shift right click feature.

Share this post


Link to post
Share on other sites



Send("{SHIFT down}") ;press and hold shift down

MouseClick("Right", x, y) ;Click right on the x,y cords.

Send("{SHIFT up}") ;let go of the shift button

Share this post


Link to post
Share on other sites

That was what I needed, except I needed to remove the space from "shift down"

THANKS ALOT!!!!!!

Share this post


Link to post
Share on other sites

I did a search in the AutoIT help for Run As not RUNAS and did not see that until you metioned it. However, because it is a domain password I would rather do that part manually, THANK YOU VERY MUCH for showing me the BuiltIn one though

Share this post


Link to post
Share on other sites

If you want to get someone to type in the password, just use the inputbox() function to get the domain password and then RunAsSet and Run to run the command you want. MUCH safer than mouseclicks! :whistle:

Share this post


Link to post
Share on other sites

Jon,

:-)

I was trying what you recommended. however, doing it that way does not let the script continue as the local user until I close dsa.msc. I only want to kick dsa.msc off as an admin but continue running as the local user. I get other information from other sources that I dont want running as an admin.

Thanks VERY much for all your help.

Share this post


Link to post
Share on other sites

That's fine, use RunAsSet to set admin, then use Run (not RunWAIT) to run your msc as admin, then use RunAsSet to reset to normal local user rights for the rest of your script.

Share this post


Link to post
Share on other sites

what would be the proper syntac for the inputbox suggestion you gave for the password?

RunAsSet("domainadminaccount", "domain", "variable")

I seem to have trouble entering variables if I dont input them independantly

Share this post


Link to post
Share on other sites

$password=InputBox("Please enter the admin password", "Password Entry", "*")
RunAsSet("domainadminaccount", "domain", $password)
Run("WhateverProgram.exe")


David Nuttall
Nuttall Computer Consulting

An Aquarius born during the Age of Aquarius

AutoIt allows me to re-invent the wheel so much faster.

I'm off to write a wizard, a wonderful wizard of odd...

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