Jump to content

Outlook script


cm35
 Share

Recommended Posts

I have been pulling what little hair I have left out. I am trying to write a script to fill in the password to MS Outlook 2002. I recently bought a new machine that came loaded with Vista. Well low and behold Vista and Outlook '02 don't get along. So I am asking for anyone's help with this. As I said, I have been trying on my own to no avail. Any and all help will be greatly appreciated. Thank you, cm35

Link to comment
Share on other sites

Post your code, and we will see what we can do. Odds are you are simply not getting the window name right, or the control name.

Here is the code that both my brother and I came up with after doing some searching on the net and our own work.

;Start OutLook

Run("C:\Program Files\Microsoft Office\Office10\OUTLOOK.EXE")

; check library path of your OutLook

;Wait for Password window

WinWaitActive("Enter Network Password")

;Insert Password Change "xxxxx" by your password

Send("293569713")

;Activate and send Enter key

WinActivate("Enter Network Password")

send("{tab 2}")

send("{enter}")

;Finished

I get Outlook to open and begin but when the password window is filled in it is the user name not the password that Autoit is filling in. Where did we go wrong???

Link to comment
Share on other sites

Let me ammend that last statement, it was late and I was tired. After running this script Autoit fills out the username box not the password box that it was supposed to fill out. Does anyone have any clue as to where I went wrong, and how can I correct it?

Here is the code that both my brother and I came up with after doing some searching on the net and our own work.

;Start OutLook

Run("C:\Program Files\Microsoft Office\Office10\OUTLOOK.EXE")

; check library path of your OutLook

;Wait for Password window

WinWaitActive("Enter Network Password")

;Insert Password Change "xxxxx" by your password

Send("293569713")

;Activate and send Enter key

WinActivate("Enter Network Password")

send("{tab 2}")

send("{enter}")

;Finished

I get Outlook to open and begin but when the password window is filled in it is the user name not the password that Autoit is filling in. Where did we go wrong???

Link to comment
Share on other sites

Let me ammend that last statement, it was late and I was tired. After running this script Autoit fills out the username box not the password box that it was supposed to fill out. Does anyone have any clue as to where I went wrong, and how can I correct it?

i would get the x & y coords of the password box

do a mouse move and left mouse click on that coord.

then send the pw

Link to comment
Share on other sites

I have vista ... the compatability issues suck, but instead of Outlook 02, why not upgrade to 07'?

I am trying to get by without having to put out for a new edition of Outlook if possible. I have to agree with you that the compatibility issues suck!
Link to comment
Share on other sites

i would get the x & y coords of the password box

do a mouse move and left mouse click on that coord.

then send the pw

I wil try what you suggested to see if I get better results. I assume that the coordinates have to do with the send("{tab 2}") line of code.
Link to comment
Share on other sites

You could use ctrlsend to send directly to the control. Also, what does the AutoIT window info tool report on the controls you are trying to send to? You should be able to ID the controls. Also you could use the macro recorder to get what you are doing, and have it make the script for you.

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