Re: how to detect a disconnected socket?

2005-12-19 Thread Foo Ji-Haw
John Serink wrote: Ok, if you're using sockets I strongly recommend you ALWAYS using sysread and syswrite as they baypass standard IO buffereing. Be careful with sysread, it cand and will return partial reads, you MUST be prepared for that. Unless you want your program to block on sysread,

Re: how to detect a disconnected socket?

2005-12-19 Thread $Bill Luebkert
Foo Ji-Haw wrote: Cool. Thanks for the tip John. When you mean partial reads, you don't mean to say that any form of data corruption is taking place right? It's just that I will have to be responsible for putting Humpty Dumpty (aka the fragmented data) back together again? TCP is stream

socket sysread() timeout

2005-12-19 Thread Foo Ji-Haw
Hi all, Thanks to John and Bill, I've managed to get my socket disconnect detection working. I'd like to share my check code with all: my $BytesRead = $sock-sysread($buffer,1024); if (!defined($BytesRead)) { print WARNING: Connection lost!\n; exit;

Tk::Text::ReplaceSelectionsWith()

2005-12-19 Thread Артем Аветисян
Hi, all. Why is that if I make $text-selectAll; $text-ReplaceSelectionsWith(nah\nbah\nvah); I only get: bah vah as a result (ActivePerl 5.8.7.813)? Thanks, Artem A. Avetisyan. ___ Perl-Win32-Users mailing list

Re: Formatting a Date in a Cell in Excel

2005-12-19 Thread Dennis Kelly
PS - you can also use [Format][cell][Number tab] and select custom. Then specify mmm this will allow excel to treat it as a numeric quantity, and still have it be presented as you wish. Glen Plantz wrote: Hi Folks, I'm having trouble formatting the Cell Contents of an Excel sheet with

Re: Formatting a Date in a Cell in Excel

2005-12-19 Thread Dennis Kelly
You can probably accomplish what you want by doing [Format][Cell][Number tab] and selecting text. Excel likes to infer that cells are dates because then it can treat them as an ordered list, and you can do arithmetic like this day next week = today + 7. Under [Format][Cell][Number tab] the date

Calling parent's method

2005-12-19 Thread Артем Аветисян
Why is that $text_undo = $down_packer1-Scrolled( 'TextUndo', -scrollbars = 'osoe', -height = 20, -width = 80, -font = $text_font $text_size, -wrap = 'none', )-pack( -fill = 'both', -expand = 1, -side = 'top', -pady =

RE: how to detect a disconnected socket?

2005-12-19 Thread John Serink
Hi Foo: Partial reads means partial reads... If you sending whole lines at one end you;ll probably not get the whole lines all the time at the other. You have to be prepared for that. Cheers, John -Original Message- From: Foo Ji-Haw [mailto:[EMAIL PROTECTED] Sent: Monday, December

RE: :Text::FindAndReplaceAll()

2005-12-19 Thread Jack D.
Here is a reply received from Slaven Rezic on the ptk mailing list: Jack D. [EMAIL PROTECTED] writes: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ? Sent: December 16, 2005 7:34 AM To:

RE: :Text::ReplaceSelectionsWith()

2005-12-19 Thread Jack D.
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ? Sent: December 19, 2005 5:39 AM To: perl-win32-users@listserv.ActiveState.com Subject: Tk::Text::ReplaceSelectionsWith() Hi, all. Why is that if I make $text-selectAll;

Re: Calling parent's method

2005-12-19 Thread Reinhard Pagitsch
Артем Аветисян wrote: $text_undo-Tk::Text::delete('1.0', 'end'); #I need Tk::Text::delete in order not to disturb UNDO stack I think it have to be $text_undo-delete('1.0', 'end'); The pack for the scroled: -pack(qw/-expand yes -fill both/); regards, Reinhard

RE: Calling parent's method

2005-12-19 Thread Jack D.
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ? Sent: December 19, 2005 7:48 AM To: perl-win32-users@listserv.ActiveState.com Subject: Calling parent's method Why is that $text_undo = $down_packer1-Scrolled(

Re: socket sysread() timeout

2005-12-19 Thread $Bill Luebkert
Foo Ji-Haw wrote: Hi all, Thanks to John and Bill, I've managed to get my socket disconnect detection working. I'd like to share my check code with all: my $BytesRead = $sock-sysread($buffer,1024); if (!defined($BytesRead)) { print WARNING:

Sending email with authentication using Net::SMTP.

2005-12-19 Thread Joydeep Yadav
Hi,Is anyone aware of any method of sending email with authentication using Net::SMTP or any other module. At this point I am experimenting trying to send email using perl v 5.6.1.My ISP seems to require authentication when I run the script below with debug enabled.Thanks,

Re: socket sysread() timeout

2005-12-19 Thread $Bill Luebkert
$Bill Luebkert wrote: Foo Ji-Haw wrote: Hi all, Thanks to John and Bill, I've managed to get my socket disconnect detection working. I'd like to share my check code with all: my $BytesRead = $sock-sysread($buffer,1024); if (!defined($BytesRead)) { print

Re: Sending email with authentication using Net::SMTP.

2005-12-19 Thread Suresh Govindachar
On Mon, 19 Dec 2005 12:37:47 -0800 (PST) Joydeep Yadav asked Is anyone aware of any method of sending email with authentication using Net::SMTP or any other module. At this point I am experimenting trying to send email using perl v 5.6.1. Code in

RE: Sending email with authentication using Net::SMTP.

2005-12-19 Thread Chris
Is anyone aware of any method of sending email with authentication using Net::SMTP or any other module. At this point I am experimenting trying to send email using perl v 5.6.1. My ISP seems to require authentication when I run the script below with debug enabled. Joydeep Although

How to quit when Windows shut down?

2005-12-19 Thread Ted Zeng
Hi, I have a perl script that runs in an infinite loop whenever a machine starts. My problem is, when I shut down the PC, Windows could not Stop the script. It put the dialog asking if user wants to stop the process. Is there a way in the script to quit automatically when Windows shut down?

Re: Sending email with authentication using Net::SMTP.

2005-12-19 Thread David Ressler
Put this in your code after the "$smtp=Net::SMTP-new..." line: $smtp-auth($account,$password); but the SMTP server needs to deal with SASL. Use values for $account and $password that authorize you for that server. My attempt at this failed until my service provider updated antiquated

http mods, working with outlook web interface

2005-12-19 Thread Hon Shi
Has anyone used the http mods to interact with the outlook web interface? Just a link to a few examples would be nice. Was it stright forward? (have to read mail with given subject lines and detach files) Thanks __ Do You Yahoo!? Tired of spam?

Re: [aswin32] Re: How to disable a control without changing appearance

2005-12-19 Thread Lynn. Rickards
Chris Rogers wrote: Sorry, about the lack of information in my original post. I just assumed, this being a perl-win32 group that Win32::GUI was a given. I'll try to be more specific in the future. I tried $control-Enable(0) but the control still gets greyed out. I'm using activestate perl

RE: How to quit when Windows shut down?

2005-12-19 Thread John Serink
C:\shutdown /? Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c comment] [ -d up:xx:yy] No args Display this message (same as -?) -i Display GUI interface, must be the first option -l

Re: Sending email with authentication using Net::SMTP.

2005-12-19 Thread Joydeep Yadav
Introduced "$smtp-auth($account,$password);" per Dave's suggestion. Get the following debug message:Net::SMTP: Net::SMTP(2.15)Net::SMTP: Net::Cmd(2.18)Net::SMTP: Exporter(5.562)Net::SMTP: IO::Socket::INET(1.25)Net::SMTP: IO::Socket(1.26)Net::SMTP: IO::Handle(1.21) Net::SMTP=GLOB(0x1822d28)

Re: [aswin32] Re: How to disable a control without changing appearance

2005-12-19 Thread Chris Rogers
Point taken on the default assumption of what this list is about. Thanks for the tip on the background color. It appears that the changing appearance is handled directly by the OS when we send it a message to disable the control. It also appears that the two parts of the process WM_DISABLE and

how to delete a directory and its subdirectory using Perl under Windows?

2005-12-19 Thread gao perlone
how to delete a directory and its subdirectory using Perl under Windows? ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: How to disable a control without changing appearance

2005-12-19 Thread May, Robert
Chris Rogers wrote: [snip] The whole idea is to be able to use the mouse to grab any control on a given Win32::GUI window and drag it to a new location. Sort of a gui designer. Apologies for my first response, I completely mis-understood What you were trying to do. Is this better? Look at

RE: how to delete a directory and its subdirectory using Perl under Windows?

2005-12-19 Thread May, Robert
gao perlone wrote: how to delete a directory and its subdirectory using Perl under Windows? See the rmtree() function in the File::Path module. Rob. = This email message and any attachments thereto are intended only for use by the