www.website-watcher.com Forum Index www.website-watcher.com
HomeProductsNewsContact
 
 FAQFAQ   SearchSearch   RegisterRegister   ProfileProfile   Log inLog in 

Another attempt to capture from Outlook
Goto page 1, 2  Next
 
Post new topic   Reply to topic    www.website-watcher.com Forum Index -> Local Website Archive
View previous topic :: View next topic  
Author Message
mkcomputing



Joined: 21 Nov 2007
Posts: 246

PostPosted: Sun Aug 03, 2008 11:14 am    Post subject: Another attempt to capture from Outlook Reply with quote

I have spent a year or so trying to get messages from Outlook into LWA. It simply does not work for me.

I have the standard "template" that seems to work for other people. It is in the "app" folder.

; ---------------------------------------------------------------------------
; Program template for WebSite-Watcher and Local Website Archive
; Will be overwritten with a new version of the software
; http://www.aignes.com
; ---------------------------------------------------------------------------

[General]
Name=Outlook
IsBrowser=0
AppExeName=outlook.exe
AppWindowClass=rctrl_renwnd32
AppWindowCaptionSubStr=substr(- Microsoft Outlook)
GetNameUrlMethod=general(name,)

Language=english,({Alt}f){$}s{$}<FILENAME>{Enter}




I have found from previous experience that LWA works only with message in the Inbox. (It also seems that I have to save the message from the Inbox rather than opening it, which is a bit odd.) That means that I have to move any messages to my inbox before I can save them.

That is a nuisance, but if it works I would be happy enough. But it doesn't work.

If I have a message that I want to save, all hell breaks loose. The cursor flies all over the place, strange Outlook dialogues appear. The only thing that does not happen is that the message gets saved.
_________________
MK
Windows 7 Home Premium | LWA Pro 12.2 | WSW 13.0
Athlon 64 X2 Dual Core 5400+ | 4.0 GB Memory | NVIDIA GeForce 8600 GT


Last edited by mkcomputing on Mon Aug 04, 2008 9:39 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Martin Aignesberger
Site Admin
Site Admin


Joined: 11 May 2005
Posts: 5845

PostPosted: Mon Aug 04, 2008 9:27 am    Post subject: Reply with quote

I'm sorry, but I'm not able to help you here. We don't officially support Outlook nor have we created this template ourself.

Quote:
I have found from previous experience that LWA works only with message in the Inbox. (It also seems that I have to save the message from the Inbox rather than opening it, which is a bit odd.) That means that I have to move any messages to my inbox before I can save them.


In my tests this template worked with all folders (German Windows and Outlook version). If it does not work for you, you have to tweak your template yourself to get it working. Please understand that we cannot help you here.
_________________
Martin Aignesberger [SUPPORT]
Back to top
View user's profile Send private message
mkcomputing



Joined: 21 Nov 2007
Posts: 246

PostPosted: Mon Aug 04, 2008 5:41 pm    Post subject: Reply with quote

Martin Aignesberger wrote:
In my tests this template worked with all folders (German Windows and Outlook version). If it does not work for you, you have to tweak your template yourself to get it working. Please understand that we cannot help you here.


I know that you are not the sort of person who offers detailed guidance, when you don't feel like it, but I was hoping that someone else had seen similar issues and worked out how to solve them.

I'm not asking for someone to rewrite the software. I am just seeking advice on what I should look for to change.

I have tried all sorts of variations on that template.

My first thought is that I should try to go through the keystrokes manually to see which ones might fail. But it does not seem to be possible to save manually into LWA.

Unfortunately, the help file and instructions offer little guidance because they do not really explain how the process works.
_________________
MK
Windows 7 Home Premium | LWA Pro 12.2 | WSW 13.0
Athlon 64 X2 Dual Core 5400+ | 4.0 GB Memory | NVIDIA GeForce 8600 GT
Back to top
View user's profile Send private message Visit poster's website
johnk



Joined: 13 Feb 2008
Posts: 15

PostPosted: Mon Aug 04, 2008 6:21 pm    Post subject: Reply with quote

For what it's worth, this is my Outlook set-up, and it works.

Code:

Name=Outlook
IsBrowser=0
AppExeName=OUTLOOK.EXE
AppWindowClass=rctrl_renwnd32
AppWindowCaptionSubStr=substr(- Microsoft Outlook)
GetNameUrlMethod=general(name,)


And my keystrokes (English version of Outlook):
Code:

{Alt}f{$}a{$}{$}{$}{$}<FILENAME>{$}{$}{$}{$}{Enter}


The other point to mention is that, in addition to highlighting the message to be saved (obviously), in my experience the message list must have focus as well, otherwise it won't work. If the message list does not have focus, I get the same symptoms you describe (The cursor flies all over the place, strange Outlook dialogues appear. The only thing that does not happen is that the message gets saved).

When I say my code works, it works most of the time, not all the time.
One problem I have with almost all apps using the "send keystrokes" method is that the filename is often entered "too quickly".

It's difficult to explain, but no matter how much delay I insert before or after the <FILENAME>, the path name is often "mis-spelt" when it's typed out in the dialog box, with random characters missing from the path name. e.g. something like:
C:\Prgrm Fils\Lcal Website Archive\archive\min\data\42008071420325396820_wsa\42008071420325396810.htm
might appear in the dialog box instead of:
C:\Program Files\Local Website Archive\archive\main\data\42008071420325396820_wsa\42008071420325396810.htm

Obviously this invokes an error message (the program cannot find the path).

So I have to cancel the save, and then just do it again. Sometimes it takes three of four attempts. It's often easier to correct the path name manually. I don't know why this happens. Maybe check to see if this is happening to you (by removing the {enter} and checking the contents of the dialog box.)

And Martin, I have to say that occasionally your tone is very unfortunate. The original poster was asking a valid question and making a genuine plea for help. I've tried to offer that help, and other users will hopefully do so too.

You have created a powerful feature by offering the "send keystrokes" method. Yet the LWA help file offers very poor guidance on how to use it, everyone has to work it out for themselves. Then when someone asks a question, you say "please understand that we cannot help you here"!!

That's not the way to encourage a positive, helpful atmosphere in the forum.
Back to top
View user's profile Send private message
mkcomputing



Joined: 21 Nov 2007
Posts: 246

PostPosted: Mon Aug 04, 2008 8:53 pm    Post subject: Reply with quote

Thank you for that. It gives me something to go on.

The good news is that it is not just me being silly.

I always get worried when I am the only one to see a problem.
_________________
MK
Windows 7 Home Premium | LWA Pro 12.2 | WSW 13.0
Athlon 64 X2 Dual Core 5400+ | 4.0 GB Memory | NVIDIA GeForce 8600 GT
Back to top
View user's profile Send private message Visit poster's website
mkcomputing



Joined: 21 Nov 2007
Posts: 246

PostPosted: Tue Aug 05, 2008 9:53 am    Post subject: Reply with quote

johnk

That seems to work.

It doesn't pick up the message's title for the saved file, but what the heck? I can always work on that.

Looking at the differences between the two sets of keystrokes,

{Alt}f{$}a{$}{$}{$}{$}<FILENAME>{$}{$}{$}{$}{Enter}

({Alt}f){$}s{$}{Enter}{$}<FILENAME>{Enter}

Your version (top) does a "Save As" rather than "Save" in Outlook. Makes sense.

You also add some delay and have removed the first {Enter}.

I picked up the first version I tried from messages that appeared here. As some of them were about different language versions, I wonder if Outlook is very different in foreign parts.

It does show that you may have to be careful in how you customise Outlook. Go too mad and you could remove access to the standard key strokes.

Once again, many thanks. It has taken me several attempts to get this far!
_________________
MK
Windows 7 Home Premium | LWA Pro 12.2 | WSW 13.0
Athlon 64 X2 Dual Core 5400+ | 4.0 GB Memory | NVIDIA GeForce 8600 GT
Back to top
View user's profile Send private message Visit poster's website
johnk



Joined: 13 Feb 2008
Posts: 15

PostPosted: Wed Aug 06, 2008 7:52 pm    Post subject: Reply with quote

Glad to be of help.

Have you suffered from the problem with automatic filename insertion that I outlined above (where the filename is entered incorrectly and you have to re-save)? I find it very irritating. I'm sure it's just a function of the speed at which the filename is pasted by LWA, but I can't work out a workaround.

And I can't find any reference to this issue in this forum, so it may just be my system.
Back to top
View user's profile Send private message
mkcomputing



Joined: 21 Nov 2007
Posts: 246

PostPosted: Thu Aug 07, 2008 8:49 am    Post subject: Reply with quote

It doesn't seem to pick up a filename at all here. Knowing this, I copy it before I save and then paste in at the appropriate stage.

I am used to doing this because many sites deliver up "printer friendly" pages that do not have a proper title. Perhaps I should try to automate this with Macro Express.

By the way, I meant to say thanks also for the tip about highlighting the message. You are right, this is essential.

Now that, thanks to your intervention, I have got this working, I may try to do something about the inability to capture from anything other than the Inbox. One option might be to create a separate Outlook folder for messages to be saved and then to work with the title of that.
_________________
MK
Windows 7 Home Premium | LWA Pro 12.2 | WSW 13.0
Athlon 64 X2 Dual Core 5400+ | 4.0 GB Memory | NVIDIA GeForce 8600 GT
Back to top
View user's profile Send private message Visit poster's website
mkcomputing



Joined: 21 Nov 2007
Posts: 246

PostPosted: Thu Aug 07, 2008 8:54 am    Post subject: Reply with quote

mkcomputing wrote:
Now that, thanks to your intervention, I have got this working, I may try to do something about the inability to capture from anything other than the Inbox. One option might be to create a separate Outlook folder for messages to be saved and then to work with the title of that.


I just had a thought. Maybe your "highlight the message" tip would solve this one too.

It does!

Heaven only knows why someone did not correct me on that one when I first asked about it, probably a year ago.
_________________
MK
Windows 7 Home Premium | LWA Pro 12.2 | WSW 13.0
Athlon 64 X2 Dual Core 5400+ | 4.0 GB Memory | NVIDIA GeForce 8600 GT
Back to top
View user's profile Send private message Visit poster's website
mkcomputing



Joined: 21 Nov 2007
Posts: 246

PostPosted: Sat Aug 09, 2008 10:36 am    Post subject: Reply with quote

When I use LWA from Outlook, it picks up the name of the program rather than the title of the message as the "Subject" for the "Filename".
_________________
MK
Windows 7 Home Premium | LWA Pro 12.2 | WSW 13.0
Athlon 64 X2 Dual Core 5400+ | 4.0 GB Memory | NVIDIA GeForce 8600 GT
Back to top
View user's profile Send private message Visit poster's website
johnk



Joined: 13 Feb 2008
Posts: 15

PostPosted: Sat Aug 09, 2008 9:44 pm    Post subject: Reply with quote

mkcomputing wrote:
When I use LWA from Outlook, it picks up the name of the program rather than the title of the message as the "Subject" for the "Filename".


Yep, same thing here, and I don't think there's a way around it. It happens when you use LWA with other email programs too (e.g. Thunderbird).

LWA is picking up what would be the page title in a web browser, but email programs don't behave in the same way.

I don't think it would be fair or reasonable to expect Martin to create .ini files for every app under the sun, but maybe in a future version LWA might offer a way to manipulate or script the item name.

So one option worth exploring, for example, would be a new entry in the ini file, such as:
Code:

IsEmailProgram= (0 or 1)

If the line said IsEmailProgram=1, then the item name would be the first piece of text in the file that began:
Subject:
(this would be a single line in a text file, or a single html entry ending with the next </> tag).

This would work from both Outlook and Thunderbird, and I imagine most other email programs as well.
Back to top
View user's profile Send private message
Martin Aignesberger
Site Admin
Site Admin


Joined: 11 May 2005
Posts: 5845

PostPosted: Mon Aug 11, 2008 7:29 am    Post subject: Reply with quote

Quote:
IsEmailProgram= (0 or 1)

If the line said IsEmailProgram=1, then the item name would be the first piece of text in the file that began:
Subject:
(this would be a single line in a text file, or a single html entry ending with the next </> tag).


I think something like that is a good idea. If a title tag is available, then I can use this one, otherwise some text of the archived document.

The only thing that gets difficult is to detect if a user enters a description before archiving a document.

Probably something like that would work:

Code:
GetNameUrlMethod=
ExtractTitleFromDoc=1


What means that LWA doesn't autofill the Name field and post-fills the Name field if nothing was entered.
_________________
Martin Aignesberger [SUPPORT]
Back to top
View user's profile Send private message
johnk



Joined: 13 Feb 2008
Posts: 15

PostPosted: Mon Aug 11, 2008 9:16 am    Post subject: Reply with quote

Glad you would consider this, Martin.

Martin Aignesberger wrote:
Probably something like that would work:

Code:
GetNameUrlMethod=
ExtractTitleFromDoc=1


What means that LWA doesn't autofill the Name field and post-fills the Name field if nothing was entered.


Yes, that would be good. Nice and flexible.

It won't be as simple as looking for the TITLE tag, unfortunately. You would generally need to look for the first instance of "subject:" in the body, I imagine. An example of the relevant source code of a saved email from Thunderbird:
Code:

<body>
<table class="header-part1" border="0" cellpadding="0"
 cellspacing="0" width="100%">
  <tbody>
    <tr>
      <td><b>Subject: </b>Topic Reply Notification -
Another attempt to capture from Outlook</td>
    </tr>
    <tr>
      <td>


Plain text emails saved into LWA from Outlook remain plain text. Beginning of the same email saved into LWA from Outlook:
Code:

From: support@aignes.com
Sent: 11 August 2008 08:29
To: Undisclosed-recipients:
Subject: Topic Reply Notification - Another attempt to capture from
Outlook


There must be a restriction on line length when Outlook exports the email. Note that it puts the last word of the subject on a new line.
Back to top
View user's profile Send private message
Martin Aignesberger
Site Admin
Site Admin


Joined: 11 May 2005
Posts: 5845

PostPosted: Tue Aug 12, 2008 7:41 am    Post subject: Reply with quote

Thanks for pointing that out. Seems to be harder to implement than I thought Sad

Probably I have to introduce a scripting solution here to get it working...
_________________
Martin Aignesberger [SUPPORT]
Back to top
View user's profile Send private message
Martin Aignesberger
Site Admin
Site Admin


Joined: 11 May 2005
Posts: 5845

PostPosted: Mon Sep 01, 2008 10:30 am    Post subject: Reply with quote

I have now implemented the following for version 2.2.0:

Code:
ExtractNameFromDoc=<0|1>
ExtractNameFromDocRegex=<REGEX>
ExtractNameFromDocDeleteRegex1=<REGEX>
ExtractNameFromDocDeleteRegex2=<REGEX>


It seems to work OK in my tests, an example would be:

Code:
ExtractNameFromDoc=1
ExtractNameFromDocRegex=<title>.*</title>
ExtractNameFromDocDeleteRegex1=
ExtractNameFromDocDeleteRegex2=


The result is an optimized string without HTML, CRLFs and double blanks.

Another example for the e-mail client I use myself the following works:

Code:
ExtractNameFromDoc=1
ExtractNameFromDocRegex=subject:.*?(\r|\n)
ExtractNameFromDocDeleteRegex1=Subject:
ExtractNameFromDocDeleteRegex2=

_________________
Martin Aignesberger [SUPPORT]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.website-watcher.com Forum Index -> Local Website Archive All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group