Sign in to follow this  
Followers 0
ra95

Outlook web access and Save as attach problem.

3 posts in this topic

#1 ·  Posted (edited)

Hi, gui

I have a problem to Save as a attachment in a sppecific folder in outlook web access page. in Ie embedded windows.

I hav find wit debug bar this portion of Html code for attach to download:

<div style="display:none;">
    <div id="divAtt" class="aw"><span id="spnAtmt" tabindex="-1" level="2"><img class="sI" src="8.1.393.1/themes/base/dc-xcl.gif" alt=""><a id="lnkAtmt" href="attachment.ashx?attach=1&id=RgAAAABw0Ke3EqN9TqVJRhdxP%2f%2fBBwAk%2f0OKJNDzS5ScWMh8QgIIAKZYd35QAAAk%2f0OKJNDzS5ScWMh8QgIIAKZYd4CEAAAJ&attid0=EAC1TdYgtjoCQqVJtomw33u1&attcnt=1" target=_blank onclick="return onClkAtmt(2)" title="inviodettagliiO7W9f.csv">inviodettagliiO7W9f.csv&#x200E; (634 KB&#x200E;)</a></span></div> 
</div>

I have read and insert in array ($alink):

[0]|Dettaglio Traffico 
[1]|helpdesk@aaaaa.xxx [helpdesk@aaaaa.xxx]
[2]|<A id=Es1AfJNvrk+iFG3lgkF/+g== onclick="return onClkRcpt(this,1);" href="#">Dettaglio Traffico</A>
[3]|<IMG class=sI alt="" src="8.1.393.1/themes/base/dc-xcl.gif"><A id=lnkAtmt title=inviodettagliiO7W9f.csv onclick="return onClkAtmt(2)" href="attachment.ashx?attach=1&amp;id=RgAAAABw0Ke3EqN9TqVJRhdxP%2f%2fBBwAk%2f0OKJNDzS5ScWMh8QgIIAKZYd35QAAAk%2f0OKJNDzS5ScWMh8QgIIAKZYd4CEAAAJ&amp;attid0=EAC1TdYgtjoCQqVJtomw33u1&amp;attcnt=1" target=_blank>inviodettagliiO7W9f.csv? (634 KB?)</A>

My portion of autoit:

Func scaricamail()
$oInputs = _IETagNameGetCollection($oIE, "Span") 
For $oInput In $oInputs
$Testo = _IEPropertyGet($oInput, 'innerhtml')
_ArrayAdd($alink,$Testo)
Next
$T1 = _ArraySearch($alink, "title", 0, 0, 0, true)
$a2 = StringSplit(($alink[$T1]),Chr(95)&@CRLF)
$am0 = _ArraySearch($a2, "blank", 0, 0, 0, true)
$attachmail0 = StringTrimLeft($a2[$AM0],6)
$attachmail1 = StringTrimRight ($attachmail0,4)
$attachmail = StringReplace($attachmail1,"?",Chr(127)); I obtain a name of file "inviodettagliiO7W9f.csv (634 KB)"
$attachmailx = StringTrimRight ($attachmail0,15); This is a title name of file "inviodettagliiO7W9f.csv"
;I have tryed this but not work.
$Attach = ControlFocus($handle,$attachmail,"")
ControlSend($Attach, "", "", "!f")

now i dont have any idea for do a save as...

I have search in a forum but i not have find any similar solution "Ie embedded windows situazion"

Thanks in advance to all for any suggestion.

ra95

anybody can help me????

thx

Edited by ra95

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi gui I have find a partial solution

I have search and find Href link and anchor it.

if i click with _IEAction("$oli","click"),windows message appears with specification to use a CTRL+click of mouse if i have a single button mouse for save object.

Func scaricamail()
$oLIs = _IETagNameGetCollection($oIE, "A")
    for $oLI in $oLIs
        if StringInStr($oLI.id, "lnkAtmt") Then
            $href = $oLI.href 
            send ("{CTRLDOWN}") ;I think NOT WORK in IE embedded. :angry: 
            _IEAction($oLI, "click")
            send ("{CTRLUP}")
        EndIf
    next
EndFunc

What have wrong???

I want simulate a CTRL+ Mouse Click

Thx for any suggest.

Ra95

Edited by ra95

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi gui I have solved problem with use of INETGET.

$oLIs = _IETagNameGetCollection($oIE, "A")
    for $oLI in $oLIs
        if StringInStr($oLI.id, "lnkAtmt") Then
            $href = $oLI.href 
            InetGet($href, $downdir & "\testfile.csv", 1, 0)
        EndIf
    next
EndFunc

I hope appreciate my post.

Thx all

A.

Edited by ra95

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  
Followers 0