Jump to content

script for Outlook Express.


Recommended Posts

Is it possible to run Outlook Express and obtain and record a particular file (file name is known, I want to save the file in the some directory).

Or is there a script to receive mail?

Edited by zxc3
Link to comment
Share on other sites

Hi,

The script below shold get you started with what you want. After you manually save the file to the directory you want Outlook Express should remember it.

;Outlook Express(OE)

Global $path = @ProgramFilesDir & "\Outlook Express\msimn.exe"      ;Outlook Express Path
Global $winName1 = "[CLASS:Outlook Express Browser Class]"          ;Window Name 1
Global $mFldName = "Local Folders"                                  ;Main Folder Name
Global $sFldName = "Inbox"                                          ;Sub-Folder Name        
Global $FleName = "InboxDollars"                                    ;File name

;Run Outlook Express
Run($path, "", @SW_MAXIMIZE)

WinAct1()

;Main Folder Name
ControlSend($winName1, "", "SysTreeView321", $mFldName)

;WinWaitActive("Local Folders", "", 8)

MsgBox(0, "Do Not Close..", "Pauseing...WLL AUTO CLOSE!", 5)
;Sleep(1000)

;Sub Folder Name
ControlSend($winName1, "", "SysTreeView321", $sFldName)

MsgBox(0, "Do Not Close..", "Pauseing...WLL AUTO CLOSE!", 5)

WinAct1()

;Click in messages listbox
ControlClick($winName1, "", "ATL:SysListView322")

;File Name
ControlSend($winName1, "", "ATL:SysListView322", $FleName)

WinAct1()

;Open Save As Dialog Box with (ALT+f+a)
Send("!fa")

Func WinAct1()
    WinActivate($winName1)
    WinWaitActive($winName1, "", 5)
EndFunc     ;==>WinAct1

jfcby

Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

Link to comment
Share on other sites

Thank you for your response. But I need to attach the file saved automatically without my participation.And this program is only opened Outlook Express and that is all.

Edited by zxc3
Link to comment
Share on other sites

What version of Outlook Express are you using. This was set up with Outlook Express 6 - 2004

jfcby

Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

Link to comment
Share on other sites

What version of Outlook Express are you using. This was set up with Outlook Express 6 - 2004

jfcby

6.00.2900.5512

I need to save the attached file automatically without my participation, rather than body of the messages. Maybe there is a mail program which simply stores the attached file in the right place ?

Edited by zxc3
Link to comment
Share on other sites

I'm not sure I understand what you want to do. Is this what you need the script to do:

Option 1:

1. Open Outlook Express(OE)

2. Create a new mail message

3. Insert an attachment

4. Save message

5. Close OE

Option 2:

1. Open OE

2. Find a message of your choosing with attachment

3. Save Attachment to a hard drive folder.

4. Close OE

jfcby

Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

Link to comment
Share on other sites

Thanks another.

In general, option 2.

1.It is necessary to open OE, preferably invisible to the user.

2.Recieve a letters( maybe many).

3.Then if you have the name of the recieve message "100000", then save the attached file 00001.mxl to C:\folder1 for use by another program, if not - close OE.

4.Then move the file from the Inbox to the Deleted Items folder and close OE.

Edited by zxc3
Link to comment
Share on other sites

zxc3,

Now that I understand more of what you need ControlSend and ControlClick would be the only way to accomplish your request that I know of. They are not reliable enough to use them without someone checking to make sure the process is running smoothly and complete successful.

May someone else knows of a better way to accomplish your task.

jfcby

Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

Link to comment
Share on other sites

I did a Google search and could find a API for OE. Take a look at this OE UDF and see if it help you OE UDF.

jfcby

Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

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