Jump to content

Recommended Posts

Posted

The job i like to automate.

Search a directori for files.

Set them in a array.

Mail them 1 fot 1

(maybe make them smaller size)

I would like to put the name (nummber's 5 digits) in a excel file.

Read them to a array

and search for them in a dir.

This i can do, no props.

I will post the code for this later on.

First i need to know if this jobis possible with autoit before i try.

1-can i read out a dir

2-put them in a array (if 1 goes then this would be a prop)

3-command outlook to mail them

Thanks in advance.

Posted

Almost there...

But have a problem with to attatch a file to the mail.

Im trying with this code.

The window of a naw email is open and i'm trying with jeystrokes to attach.

But it almost impossible. :-(

Func IMPORT_A_TO_AR($FILE)
;~ $Address = InputBox('Address', 'Enter the E-Mail address to send message to')
$Subject = "==> : " & $FILE ;InputBox('Subject', 'Enter a subject for the E-Mail')
$Body = "==> : " & $FILE ;InputBox('Body', 'Enter the body (message) of the E-Mail')
$ATT= $dir&$FILE
_INetMail($address, $subject, $body)
sleep(500)
Send("!i")
sleep(1000)
Send("b")
;Send("{ENTER}")
    sleep(1000)
Send($ATT)
    sleep(1000)
Send("!o")
;Send("{TAB}")
;    sleep(1000)
;Send("{TAB}")
;    sleep(1000)
;Send("{ENTER}")
;    sleep(1000)
;MsgBox(0,'E-Mail has been opened','The E-Mail has been opened and process identifier for the E-Mail client is ' & _INetMail($address, $subject, $body))
endfunc
Posted

Use _InetSmtpMail() if possible. This allows you to bypass the manual send, but you do have to have all of your email account's SMTP information available to make it work.

_InetSmtpMail() is in your help file as well.

  Reveal hidden contents

 

Posted

You could also take a look at the Outlook.au3 UDF.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

  Reveal hidden contents

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

  • 2 weeks later...
Posted (edited)

I tried Outlook.au3 and OutlookEX.au3.

it only works with autoit 3.9.2

and not outlook 2003 (wich i use)

  Quote

2012-07-01 - Version 0.8 - Downloads:

GENERAL

=======

* Needs AutoIt beta version 3.3.9.2 or later because of the new COM error handling.

Will still run with earlier versions but will crash if a COM error occurres and _OL_ErrorNotify has not been called before

* _OL_Open no longer initializes a COM error handler. Has to be done by _OL_ErrorNotify

Im using portable autoit..not 3.9.2

for _InetSmtpMail() its the echange server @ my work...

I dont know where to get the info needed :huh:

Edited by motormad
Posted

If you are not the administrator of the exchange server, I would recommend getting with an administrator FIRST before doing a project that involves its use. You may be breaking corporate IT rules that can lead to your termination.

If YOU are the administrator... drop what you're doing and go learn about how exchange server works.

  Reveal hidden contents

 

Posted (edited)

LoL no mate.

Im not THE administrator.

I just need to work somthing out to simplify some stuff.

I like to learn about scripting because it made my life easier

So if you can help me out :-)

Its because of firm policys that we can not sync 2 directorys. (firm-A to Firm-B )

If i can mail some files automaticly it would be good for both.

I dont see anny harm in that.

Edited by motormad

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
×
×
  • Create New...