Jump to content
Sign in to follow this  
Shark1071

Send Key "@" problem

Recommended Posts

Shark1071

Hi @all,

sorry for my bad english but i have a problem.

I just start a little script to send automatically E-Mails via Outlook. The source of the e-mail adresses is outlook.

I write data from a cell in a variable. I display the variable via messagebox and it's all right. I tried to send this String with send keys to Outlook but the Problem is that the "@"char is missing.

Can anybody help me?

Thanks

Best regards

Shark1071

Share this post


Link to post
Share on other sites
JLogan3o13

Hi, Shark 1071, welcome to the forum. Check out the OutlookEX UDF from Water. This should greatly ease what you're trying to do.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
sleepydvdr

Instead of sending keys to a control, try using _INetMail to create the email message. I have used that many times in the past without any problems.


#include <ByteMe.au3>

Share this post


Link to post
Share on other sites
Shark1071

HI,

thank you @all.

my script is a quick and dirty solution because i have no time to script. I take a better solution in future, but now i must use this easy way.

My Problem is ther fu**** @char.

I tried to send the @char particular via --- Send("{@}") But the @char wasn't send to outlook :-(

My System:

- Win7 64-bit

- Excel2010

- Outlook2010

- SciTE-Lite

Version 2.28

Can you help me with my quick and dirty solution?

Best regards

Shark1071

EDIT:

Send('@',1) --> doesn't solve the problem. :-(

The @char wasn't send.

Edited by Shark1071

Share this post


Link to post
Share on other sites
JLogan3o13

Hi, Shark1071. Please post what you have written thus far. This will help us help you :)

Edit:

This is a lousy way to do it, but the @ sign is sent. Please show us your code so we can see where it is breaking.

WinActivate("Inbox")
Send("^n")
Send("Someguy@msn.com")
Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Shark1071

@Jlogan3o13: Did you mean the script?

That's the script:

$xlsdir= "c:Testtest.xlsx"

$zaehlen=0

$i=0

;Excel öffnen

$app = ObjCreate("Excel.application")

$app.Visible = true

$open = $app.Workbooks.Open _

($xlsdir)

$answer= inputbox("Mailanzahl", "Bitte Anzahl an Mails eingeben","","",-1,-1,0,0)

For $i = 1 to $answer

$zaehlen = $zaehlen + 1

$RENR=$app.Cells($zaehlen,1).Value

$Bestellnummer=$app.Cells($zaehlen,2).Value

$Mail=$app.Cells($zaehlen,3).Value

$Kundenname=$app.Cells($zaehlen,4).Value

WinActivate("Posteingang")

sleep(500)

Send("!3")

sleep(500)

msgbox(4096, "mailadresse", $Mail)

Send($Mail)

Send("{@}")

sleep(500)

Send("{TAB 2}")

Send($Bestellnummer)

Send("!i")

Send("a")

Send("f")

sleep(800)

Send("U:Test2Rechnung "&$RENR)

sleep(800)

Send("{enter}")

sleep(500)

Send("!s")

sleep(500)

Next

Share this post


Link to post
Share on other sites
JLogan3o13

Try just Send("@") without the curly braces {} around it.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Shark1071

it's no problem to send it within Excel in any forms. But i have a problem to send it to outlook. It seems to be a system Problem :-(

All other chars are no problem :-(

Edited by Shark1071

Share this post


Link to post
Share on other sites
JLogan3o13

Hi, Shark1071. It seems you are reading the list of names from the Excel file and trying to put them into the TO: line in AutoIT, is this accurate? Can you post a screenshot of the excel contents?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Shark1071

Hi JLogan3o13,

here the screenshot of my Excel Content:

Posted Image

"C" is the problem.

Send($Mail) to Mailadress Outlook it will be displayed: xxxxvscz2qn1j31marketplace.amazon.de :-(

Send("{ASC 064}") --> works. All other solutions didn't work :-(

Edited by Shark1071

Share this post


Link to post
Share on other sites
JLogan3o13

Hi, Shark1071. I have copied over your original script, the relevant portion is shown below. Aside from translating a few things to English, I didn't change much. This portion enters the email addresses with the @ symbol for me just fine.

$xlsdir= @DesktopDir & "test.xls"
$count=0
$i=0
;Excel öffnen (Open Excel)
$app = ObjCreate("Excel.application")
$app.Visible = true
$open = $app.Workbooks.Open($xlsdir)
$answer= inputbox("Mail No.", "Please enter the number of messages","","",-1,-1,0,0)


For $i = 1 to $answer
$count = $count + 1
$RENR=$app.Cells($count,1).Value
$order=$app.Cells($count,2).Value
$Mail=$app.Cells($count,3).Value
$name=$app.Cells($count,4).Value

WinActivate("Inbox")
sleep(500)
Send("^n") ;<---is this to open a new email??? For English version is it CTRL+N
sleep(500)
msgbox(4096, "mailadresse", $Mail)
Send($Mail)
sleep(500)
Send("{TAB 2}")
Send($order)
Next

I would still say that if you took a little time to learn the OutlookEX UDF, you would save yourself a ton of headache :)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Shark1071

Hi JLogan3o13,

thank you very much.

This script doesn't work with my Outlook. The @char was deleted by sending the mailadress. I found a third party supplier who take my job with sending E-Mail.

Apart from that I read some things about OutlookEX UDF. For interest I will learn OutlookEX UDF in the future. Thanks again for your help.

BR

Shark1071

Share this post


Link to post
Share on other sites
water

If you have any problems with the OutlookEX UDF, just post in the thread and I will be happy to assist.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

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  

×