Jump to content
Sign in to follow this  
ezzetabi

_EmailSend() Func. Ready to use.

Recommended Posts

Will - 1 (<dash><space><one>) be interpreted as -1 (<dash><one> or <negative one>)?

<{POST_SNAPBACK}>

yes...try :

$h = -1
if $h = - 1 Then MsgBox(4096,'equal' , 'equal')

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Thanks JdeB, Dumb question I know. I don't have the interpreter on this system so I didnt have a chance to test it myself... thanks!

*** Matt @ MPCS

Share this post


Link to post
Share on other sites

@ezzetabi

Thanks! I've just come up with the need to send short emails from an autoit script and the SMTP server requires authentication. Your function should do exactly what I need!

john925

Share this post


Link to post
Share on other sites

I had to manually create a copy of blat.exe and rename it to ~blattmp.exe in order for this to work (and move the copy to c:\tmp)

is that because the OnAutoItStart is not called unless it is compiled or some other reason?

Share this post


Link to post
Share on other sites

I had to manually create a copy of blat.exe and rename it to ~blattmp.exe in order for this to work (and move the copy to c:\tmp)

is that because the OnAutoItStart is not called unless it is compiled or some other reason?

<{POST_SNAPBACK}>

Are you using 3.0.103 ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

apparently the version (according to the help file) is 102

I don't see a 103 on the download page?

please give a link and tell me also should I first run an uninstall or will 103 install over existing

Share this post


Link to post
Share on other sites

apparently the version (according to the help file) is 102

I don't see a 103 on the download page?

please give a link and tell me also should I first run an uninstall or will 103 install over existing

<{POST_SNAPBACK}>

in the Developer forum... look for:v3.0.103 Unstable - Reloaded

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

ok, uninstalled 102 and installed 103 from the link in dev forum

reran and still got a -6 and it will not work until I manually copy blat.exe to my c:/tmp/~blattmp.exe

Share this post


Link to post
Share on other sites

ok, uninstalled 102 and installed 103 from the link in dev forum

reran and still got a -6 and it will not work until I manually copy blat.exe to my c:/tmp/~blattmp.exe

<{POST_SNAPBACK}>

When you run the au3 file, blat.exe will have to exist in the scriptdirectory, because a fileinstall is really a filecopy when running the script with autoit3.exe.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

: blat.exe will have to exist in the scriptdirectory

oh, I understood it the wrong way then as I had the sendmail script in the blat folder,,,

Share this post


Link to post
Share on other sites

: blat.exe will have to exist in the scriptdirectory

oh, I understood it the wrong way then as I had the sendmail script in the blat folder,,,

<{POST_SNAPBACK}>

can you explain the difference ??? :">

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

well, no, I can't

in other words, blat.exe is in c:\blat\

and I saved the _sendmail.au3 there and ran it from that folder

it errors with -6 and works only if I copy blat.exe to c:\tmp\~blattmp.exe

Share this post


Link to post
Share on other sites

well, no, I can't

in other words, blat.exe is in c:\blat\

and I saved the _sendmail.au3 there and ran it from that folder

it errors with -6 and works only if I copy blat.exe to c:\tmp\~blattmp.exe

<{POST_SNAPBACK}>

Are you using this function as an #include ?

I would change the script to look like this to ensure the fileinstall works...

If Not FileExists(@TempDir & '\~blattmp.exe') Then FileInstall('blat.exe', @TempDir & '\~blattmp.exe', 1)
If Not FileExists(@TempDir & '\~blattmp.exe') Then Return -6
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

this is what made it work for me..

once I changed ..FileInstall('blat.exe',... to the complete path, 'c:\blat\blat.exe'

Share this post


Link to post
Share on other sites

Is there something strange here. Why should not work FileInstall('blat.exe',[...] ?

<{POST_SNAPBACK}>

The Func OnAutoItStart() only works with3.0.103.

Also its probable better to have the fileinstall in the Func _EmailSend() itselve because when your function is used with an#include, its always possible that the original script that contains the #include already has an OnAutoItStart().

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

The point of using OnAutoItStart was avoiding that blat.exe were installed everytime you calls the _Emailsend but instead only once.

But I agree about your #include point. Next time I'll put a note in the comments. Something like: if you want to use this func inside a #include removes the OnAutoItStart and OnAutoItExit funcs and remove the #cs #ce tags.

Share this post


Link to post
Share on other sites

The point of using OnAutoItStart was avoiding that blat.exe were installed everytime you calls the _Emailsend but instead only once.

But I agree about your #include point. Next time I'll put a note in the comments. Something like: if you want to use this func inside a #include removes the OnAutoItStart and OnAutoItExit funcs and remove the #cs #ce tags.

<{POST_SNAPBACK}>

Understand ... thats why i put the If FileExistS() before the fileinstall().

Why not do it the way i descibed in my previous post to avoid the issue all together? :)


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...