[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - Passing Address Details To External Program

Passing Address Details To External Program

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

Passing Address Details To External Program

Postby Jeff_Gaines » Sun Mar 01, 2009 8:42 pm

I would like to create a script that will pass the name and address of the currently selected record in the address book to Word to start a letter to that person.
Is something like this possible?
I am happy to do it via an intermediate app so that all that would be needed would be the name and address, the intermediate app will turn it into a format that Word can deal with.
Many thanks :-)
Jeff_Gaines
Poco Tourist
 
Posts: 16
Joined: Sun Nov 18, 2007 7:22 am

Postby Tomas » Mon Mar 02, 2009 12:43 am

Pocoscript only operates on email messages. It can work with address book, but indirectly (eg. you can add address from selected message, or locate certain field in address book for certain email message, ...).

I only got this crazy idea:
- right click on an address entry, select New Message, and click Draft.
- once message ends in Draft, event will be fired that will run a script which will pass the name and address anywhere you wish. Perhaps to a text file from which the intermediate app can read.

The event to setup would be OnAdd event, and only for specific folder: Drafts (I hope it will work, not 100% sure as Drafts folder is a bit specific, I guess it should.)

If you use Drafts folder for real drafts, it could become a bit annoying, in that case perhaps you could distinguish these dummy messages from real drafts by some extra "sign", eg. by some specific subject text added.

One useful command for the construction of that script would be:
GetAddressField $a $email $field [$bookname] [$groupname]

Locates the $email address in a specific book or group if stated, or any book or group if not. It then retrieves the address book field "$field" and places it in $a. So using $field "last" would retrieve the last name of the owner of $email address.
Tomas
Tomas
Pillar of the Community
 
Posts: 1418
Joined: Sun Jul 25, 2004 1:34 am

Postby Tomas » Mon Mar 02, 2009 12:49 am

Another possibility would be using a GUI scripting tool like AutoIt (there are more, there might be better ones for this, this is the only one I could think of from the top of my head).

I believe AutoIt could be programmed so that it will open the selected entry and read from certain fields, simulate tab clicks to switch through the tabs, etc.
It might even work more directly with Word than Pocoscript can, not sure.
Tomas
Tomas
Pillar of the Community
 
Posts: 1418
Joined: Sun Jul 25, 2004 1:34 am

Postby Jeff_Gaines » Mon Mar 02, 2009 8:37 pm

Many thanks Tomas :-)
I will tackle this from another angle I think, I am writing a C# app that will use the address.ini file from Barca, I can fire up Word from that!
Jeff_Gaines
Poco Tourist
 
Posts: 16
Joined: Sun Nov 18, 2007 7:22 am


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 0 guests

cron