Jump to content
Sign in to follow this  

Need Help Prompting for User Password in Script to Import PRF Files

Recommended Posts



I know that AutoLogin Scripts are not Permitted for Discussion here

I've to 25 mailbox prfs to import into the Outlook Client.

The mailboxes I'm logging into are meeting room ones controlled by a master account

If I log in with the account manually it works but if i try to key in the password for auto-login the password is wrong.

I do not mind keying the password 25 times but how do I put a pause in my script to do that before hitting ok so it continue to do the rest of the stuff

My script below

$Password = "Password"

Run("C:\Program Files\Microsoft Office\Office14\outlook.exe /importprf C:\Users\xxxx\Downloads\meetingroom1of25.prf")

#Key in Userid and Password to access Mailbox

WinActive("Windows Security")

WinWaitActive("Windows Security","","10")

If WinExists("Windows Security") Then






The prfs are to be imported

Share this post

Link to post
Share on other sites

I don;t understand that question, but probably because I don't know anything about Outlook.

But I do not think it is a website you are logging into, so I'm fairly sure it would not break any

forum rules.

I also think there is an Outlook UDF which might help you here, try searching example scripts for it.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post

Link to post
Share on other sites

Send($Password & "{Enter}")

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post

Link to post
Share on other sites

try to use controlsend.

I personally find that more reliable.

Use the "AutoIt Window Info" tool located in the autoit start menu to get the info of the screen.


Run("notepad.exe");open notepad

While ControlFocus("[CLASS:Notepad]", "", "Edit1")= 0 ; wait uitlit the focus is one the field

ControlSend("[CLASS:Notepad]", "", "Edit1", "This is a line of text in the notepad window"&@cr); can be done by class

ControlSend("Untitled - Notepad", "", "Edit1", "This is a line of text in the notepad window"); or by windows titel
Edited by BartW

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.