Re: PPM::InstalledPackageProperties() & dereferencing hashes
- Original Message - From: "Capacio, Paula J" <[EMAIL PROTECTED]> I guess I just don't understand references after all, can anybody spot what I'm doing wrong? TIA Paula Rather than do that, I'll just post some code that works for me. ( It's easier :-) A couple of curiosities about my code. First: Since '$insModProps{$key1}' is a hash reference I thought that I should be able to dereference it with: my %deref = %$insModProps{$key1}; but that produced a syntax error. Instead, I had to put: my $hash_ref = $insModProps{$key1}; my %deref = %$hash_ref; Is that right ? Or is it likely there was some other syntax error involved ? Second: I've used ppm to install only 2 or 3 modules, yet this script reveals details of many more than that - but not all modules that I've installed. Which makes me wonder "why?". ( I don't, however, wonder to the extent that I'll go hunting for the answer, myself - but if someone likes to explain why some modules are being 'caught' while others are not, then I'll be glad to receive that explanation.) ## use PPM; print "PPM Installed Module Properties\n"; my %insModProps = PPM::InstalledPackageProperties(); foreach my $key1(keys %insModProps) { print "$key1\n"; my $hash_ref = $insModProps{$key1}; my %deref = %$hash_ref; foreach my $key2(keys %deref) { print " $key2: $deref{$key2}\n"; } } ## Cheers, Rob ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: PPM::InstalledPackageProperties() & dereferencing hashes
Capacio, Paula J wrote: > The documentation states that the InstalledPackageProperties function, > returns a hash with package names as keys, and package properties as > attributes. What I got back however leads me to believe that it returns > the package names as keys but the package properties as a reference to a > hash. I tried de-referencing the hash but am still not getting what I > expected. I'm expecting to get a list of the installed modules followed > by each property and it's value, something similar to > module name > author= somebody > version= x.0x > etc > I guess I just don't understand references after all, can anybody spot > what I'm doing wrong? > TIA > Paula > **also sorry in advance if this is every other line, I see that happens > on some of my posts and I don't know why. > > ##code > use PPM; > print "PPM Installed Module Properties\n"; > %insModProps = PPM::InstalledPackageProperties(); > foreach $insMod (sort keys %insModProps) { > print "\t$insMod=$insModProps{$insMod}\n"; > $modProps = $insModProps{$insMod}; > foreach $prop (sort keys %$modProps) { > print "\t\t$prop=$modProps{$prop}\n"; > } > } > ##end of code Try: use strict; use PPM; print "PPM Installed Module Properties\n\n"; my %insModProps = PPM::InstalledPackageProperties(); foreach (sort keys %insModProps) { if (ref ($insModProps{$_}) !~ /hash/i) { print "\t$_ = $insModProps{$_}\n"; next; } print "$_:\n"; my $modProps = $insModProps{$_}; foreach (sort keys %$modProps) { my $line = $modProps->{$_}; if (defined $line) { chomp $line; if (ref ($line) =~ /ARRAY/i) { printf "\t$_:\n"; foreach (@$line) { chomp; printf "\t\t$_\n"; } } else { # clean it up a bit $line =~ s/\r?\n\r?/ /gs; $line =~ s/\n\>/>\n/s; $line =~ s/\s+/ /g; $line = sprintf "$_ = %s", $line; $line =~ s/(.{1,71}($|\s))/\t\t$1\n/g; $line =~ s/^\s+//; $line =~ s/\s+$//; printf "\t%s\n", $line; } } else { print "\t$_ = undef\n"; } } } __END__ -- ,-/- __ _ _ $Bill Luebkert ICQ=14439852 (_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl) -/-' /___/_<_http://www.todbe.com/ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
PPM::InstalledPackageProperties() & dereferencing hashes
The documentation states that the InstalledPackageProperties function, returns a hash with package names as keys, and package properties as attributes. What I got back however leads me to believe that it returns the package names as keys but the package properties as a reference to a hash. I tried de-referencing the hash but am still not getting what I expected. I'm expecting to get a list of the installed modules followed by each property and it's value, something similar to module name author= somebody version= x.0x etc I guess I just don't understand references after all, can anybody spot what I'm doing wrong? TIA Paula **also sorry in advance if this is every other line, I see that happens on some of my posts and I don't know why. ##code use PPM; print "PPM Installed Module Properties\n"; %insModProps = PPM::InstalledPackageProperties(); foreach $insMod (sort keys %insModProps) { print "\t$insMod=$insModProps{$insMod}\n"; $modProps = $insModProps{$insMod}; foreach $prop (sort keys %$modProps) { print "\t\t$prop=$modProps{$prop}\n"; } } ##end of code ##outputs PPM Installed Module Properties Archive-Tar=HASH(0x21ae294) ABSTRACT= AUTHOR= DATE= NAME= PERLCORE_VER= TITLE= VERSION= Compress-Zlib=HASH(0x21b0dc4) ABSTRACT= AUTHOR= DATE= NAME= PERLCORE_VER= TITLE= VERSION= ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: uninitialized value when checking Excel
On Tue, 18 Dec 2001, Luba Sereb wrote: > $Cells = $Sheet->Range("A$iCell"); > $Cell = $Cells->{Value}; #get the contents at > > When script find empty cell it send message: "Use of > uninitialized value in string ne at" > and program finished. > > What problem is? How to avoid this problem. Assuming you're using Spreadsheet::ParseExcel? You need to check the return values in these two lines before you try to use them elsewhere. Excel completely eliminates truly empty cells when you save the file (FYI Spreadsheet::WriteExcel does not behave this way), and Spreadsheet::ParseExcel returns undef if you try to access them. Steve ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: catching errors in OLE
I havent ever used the excel OLE control, but I assume this will work (it does in other similar situations): if(defined($sheet->Range("FRED"))) { # Cell is defined $sheet->Range("FRED")->{Value} = "foo"; } else { # Cell isnt defined, throw an error die("Cell \"FRED\" isn't defined!!"); } HTH - Matt - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 18, 2001 1:33 PM Subject: catching errors in OLE > Hi all, > > I'm trying to catch errors in a small excel driver script I've got. > Essentially, we parse a text file, take the values and stuff them into > named cells in a template spreadsheet, calculate, then save off the output > and loop to the next line in the text file. > > I have a problem when occasionally someone adds a new template xls to the > mix and forgets to name all the appropiate cells correctly. This results > in an error I seem unable (or too ignorant) to prevent... any help? > > Assume cell "FRED" is not defined. > > $sheet->Range("FRED")->{Value} = "foo" > > my script dies with the following: > > Can't use an undefined value as a HASH reference at E: > \denap\Perl\Excel\test.pl line 16. > > thanks, > -Tom > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
catching errors in OLE
Hi all, I'm trying to catch errors in a small excel driver script I've got. Essentially, we parse a text file, take the values and stuff them into named cells in a template spreadsheet, calculate, then save off the output and loop to the next line in the text file. I have a problem when occasionally someone adds a new template xls to the mix and forgets to name all the appropiate cells correctly. This results in an error I seem unable (or too ignorant) to prevent... any help? Assume cell "FRED" is not defined. $sheet->Range("FRED")->{Value} = "foo" my script dies with the following: Can't use an undefined value as a HASH reference at E: \denap\Perl\Excel\test.pl line 16. thanks, -Tom ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
uninitialized value when checking Excel
Hello, I can't solve problem, help please. I've create script for findin empty cell in Excel: for ($iCell = 2; ($Cell ne ""); $iCell++) { #Defining last busy row in A column $Cells = $Sheet->Range("A$iCell"); $Cell = $Cells->{Value}; #get the contents at (row=A$iCell, col=1) RW open (DEBUG, '>>c:\\mydocu~1\\Perl\\Temp\\debug.txt') or die "Can't open debug.txt.\n"; print (DEBUG "Value for cell A$iCell is: $Cell\n"); close (DEBUG); print ("A$iCell - $Cell\n"); } #End of for ($iCell When script find empty cell it send message: "Use of uninitialized value in string ne at" and program finished. What problem is? How to avoid this problem. = __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: encrypt a module?
Sounds like a need for the ol' obfuscated perl. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: 18 December 2001 10:32 > To: [EMAIL PROTECTED] > Subject: encrypt a module? > > > I am coding a module that will be shared across several other groups > applications but there are calls in it that only certain > groups should use. > Rather than making separate modules for each group having only the > functions they need, I'd like to just distribute one copy and > only tell > them what they need to know. But if they can go pokiing > around in there > (and they will) they might get frisky and start mucking about > with things > they shouldn't be. > > Is there a way to distribute a perl module in such a way that it is > "use"able but is not rendered in plain text? by "use"able I > mean simply > that you need only have a use Foo::Bar; to import it, not > something more > complicated. I've seen things for scripts, but does the same apply to > modules(.pm)? > > Thanks, > > Chuck > > > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: OLE and Outlook
I believe he is right. However, it would appear that MS uses a different epoch than the standard unix (of course). If you've ever entered a date into an Excel sheet and then formatted the cell to be 'General' or 'Text' it converts it to some kind of epoch-like number. > -Original Message- > From: Morse, Richard E. [mailto:[EMAIL PROTECTED]] > Sent: 18 December 2001 15:33 > To: 'Wells, Doug'; '[EMAIL PROTECTED]' > Subject: RE: OLE and Outlook > > > My guess is that you are getting epoch dates -- that is, > offset in seconds from > the computer's epoch. You can test this by getting the date, > then printing the > value of > scalar(localtime($date_val)) > which will attempt to figure out the date from the epoch. > Note that Access may > use a different epoch than the computer (I don't see why it > should, but just in > case...), in which case you may need to do some arithmitic on > the initial value > to get it to the computer's epoch... > > HTH, > Ricky > > -Original Message- > From: Wells, Doug [mailto:[EMAIL PROTECTED]] > Sent: Tuesday 18 December 2001 3:04 PM > To: '[EMAIL PROTECTED]' > Subject: OLE and Outlook > > > Hi- > I am using OLE to access information in my Contacts folder in > my Outlook PST > file. All is fine, but I need the last modification > information and I am having > trouble with it. When I access that data, it is a long > integer (possibly a > Julian date?). I am not sure how to interpret it into a > useable date. Can anyone > help? Here is my code: > > use strict; > use Win32::OLE; > use Win32::OLE::Const 'Microsoft Outlook'; > > my $Outlook = Win32::OLE->new('Outlook.Application', 'Quit'); > my $ol = Win32::OLE::Const->Load($Outlook); > > my $namespace = $Outlook->GetNamespace("MAPI"); > my $Folder = $namespace->GetDefaultFolder(olFolderContacts); > > my $contacts = $Folder->{Items}; > my $ncon = $contacts->{Count}; > print "number of contacts - $ncon\n\n"; > > my $con; > for my $ii (1 .. $ncon) { > $con = $contacts->Item($ii); > print "$ii - $con->{FullName}\n"; > print "Phone is $con->{HomeTelephoneNumber}\n"; > print "Last Modified ${$con->{LastModificationTime}}\n"; > } > > Thanks > Doug > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: encrypt a module?
> keeps saying it can't find it! Now that is funny. Just be aware that it will make your module a lot larger if you use it... it uses whitespace to denote characters, so the word "print" in your code will take up 5 lines (one for each letter) and a bunch of space for each one. It will probably increase the size 20 times. There is also another one I like, Acme::EyeDrops which converts your code to pictures (like a camel, UML diagram, etc). Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 3:42 PM To: [EMAIL PROTECTED] Subject: RE: encrypt a module? That is perfect! I only wish I could see the looks on their faces! Now if I could only get it to install off of cpan... keeps saying it can't find it! >Here's a hilarious answer: ACME::Bleach > >They will wonder where the code went! > >Good luck, > >Christopher > >-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, December 18, 2001 7:32 AM >To: [EMAIL PROTECTED] >Subject: encrypt a module? > > >I am coding a module that will be shared across several other groups >applications but there are calls in it that only certain groups should use. >Rather than making separate modules for each group having only the >functions they need, I'd like to just distribute one copy and only tell >them what they need to know. But if they can go pokiing around in there >(and they will) they might get frisky and start mucking about with things >they shouldn't be. > >Is there a way to distribute a perl module in such a way that it is >"use"able but is not rendered in plain text? by "use"able I mean simply >that you need only have a use Foo::Bar; to import it, not something more >complicated. I've seen things for scripts, but does the same apply to >modules(.pm)? > >Thanks, > >Chuck ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: encrypt a module?
That is perfect! I only wish I could see the looks on their faces! Now if I could only get it to install off of cpan... keeps saying it can't find it! >Here's a hilarious answer: ACME::Bleach > >They will wonder where the code went! > >Good luck, > >Christopher > >-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, December 18, 2001 7:32 AM >To: [EMAIL PROTECTED] >Subject: encrypt a module? > > >I am coding a module that will be shared across several other groups >applications but there are calls in it that only certain groups should use. >Rather than making separate modules for each group having only the >functions they need, I'd like to just distribute one copy and only tell >them what they need to know. But if they can go pokiing around in there >(and they will) they might get frisky and start mucking about with things >they shouldn't be. > >Is there a way to distribute a perl module in such a way that it is >"use"able but is not rendered in plain text? by "use"able I mean simply >that you need only have a use Foo::Bar; to import it, not something more >complicated. I've seen things for scripts, but does the same apply to >modules(.pm)? > >Thanks, > >Chuck ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: OLE and Outlook
My guess is that you are getting epoch dates -- that is, offset in seconds from the computer's epoch. You can test this by getting the date, then printing the value of scalar(localtime($date_val)) which will attempt to figure out the date from the epoch. Note that Access may use a different epoch than the computer (I don't see why it should, but just in case...), in which case you may need to do some arithmitic on the initial value to get it to the computer's epoch... HTH, Ricky -Original Message- From: Wells, Doug [mailto:[EMAIL PROTECTED]] Sent: Tuesday 18 December 2001 3:04 PM To: '[EMAIL PROTECTED]' Subject: OLE and Outlook Hi- I am using OLE to access information in my Contacts folder in my Outlook PST file. All is fine, but I need the last modification information and I am having trouble with it. When I access that data, it is a long integer (possibly a Julian date?). I am not sure how to interpret it into a useable date. Can anyone help? Here is my code: use strict; use Win32::OLE; use Win32::OLE::Const 'Microsoft Outlook'; my $Outlook = Win32::OLE->new('Outlook.Application', 'Quit'); my $ol = Win32::OLE::Const->Load($Outlook); my $namespace = $Outlook->GetNamespace("MAPI"); my $Folder = $namespace->GetDefaultFolder(olFolderContacts); my $contacts = $Folder->{Items}; my $ncon = $contacts->{Count}; print "number of contacts - $ncon\n\n"; my $con; for my $ii (1 .. $ncon) { $con = $contacts->Item($ii); print "$ii - $con->{FullName}\n"; print "Phone is $con->{HomeTelephoneNumber}\n"; print "Last Modified ${$con->{LastModificationTime}}\n"; } Thanks Doug ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: OLE and Outlook
I dont have Outlook on this machine, so I cant test it, but my guess is that youre probably dealing with an OLE Variant datatype. Read the Win32::OLE::Variant documentation and see if that gets you anywhere. Sometimes just adding 'use Win32::OLE::Variant' at the top of the script will make it work correctly. HTH - Matt http://aspn.activestate.com/ASPN/Products/ActivePerl/site/lib/Win32/OLE/Vari ant.html - Original Message - From: "Wells, Doug" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 18, 2001 12:03 PM Subject: OLE and Outlook > Hi- > I am using OLE to access information in my Contacts folder in my Outlook PST file. All is fine, but I need the last modification information and I am having trouble with it. When I access that data, it is a long integer (possibly a Julian date?). I am not sure how to interpret it into a useable date. Can anyone help? Here is my code: > > use strict; > use Win32::OLE; > use Win32::OLE::Const 'Microsoft Outlook'; > > my $Outlook = Win32::OLE->new('Outlook.Application', 'Quit'); > my $ol = Win32::OLE::Const->Load($Outlook); > > my $namespace = $Outlook->GetNamespace("MAPI"); > my $Folder = $namespace->GetDefaultFolder(olFolderContacts); > > my $contacts = $Folder->{Items}; > my $ncon = $contacts->{Count}; > print "number of contacts - $ncon\n\n"; > > my $con; > for my $ii (1 .. $ncon) { > $con = $contacts->Item($ii); > print "$ii - $con->{FullName}\n"; > print "Phone is $con->{HomeTelephoneNumber}\n"; > print "Last Modified ${$con->{LastModificationTime}}\n"; > } > > Thanks > Doug > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
OLE and Outlook
Hi- I am using OLE to access information in my Contacts folder in my Outlook PST file. All is fine, but I need the last modification information and I am having trouble with it. When I access that data, it is a long integer (possibly a Julian date?). I am not sure how to interpret it into a useable date. Can anyone help? Here is my code: use strict; use Win32::OLE; use Win32::OLE::Const 'Microsoft Outlook'; my $Outlook = Win32::OLE->new('Outlook.Application', 'Quit'); my $ol = Win32::OLE::Const->Load($Outlook); my $namespace = $Outlook->GetNamespace("MAPI"); my $Folder = $namespace->GetDefaultFolder(olFolderContacts); my $contacts = $Folder->{Items}; my $ncon = $contacts->{Count}; print "number of contacts - $ncon\n\n"; my $con; for my $ii (1 .. $ncon) { $con = $contacts->Item($ii); print "$ii - $con->{FullName}\n"; print "Phone is $con->{HomeTelephoneNumber}\n"; print "Last Modified ${$con->{LastModificationTime}}\n"; } Thanks Doug ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Microsoft Word
Please I need someone help me, I want to know why it doesn't work in my web server?... It only works when I run it from Perl Builder. Thanks in advance use Win32::OLE; use Win32::OLE qw(in with); use Win32::OLE::Const ('Microsoft Word') ; use IO::File ; use LWP::UserAgent ; use CGI ; $Output = new CGI ; $ua = new LWP::UserAgent ; ### print $Output->header(-type=>'text/html',-expires=>'now'); print $Output->start_html(-title=>'SAVING WORD DOCUMENTS', -base=>'true', -target=>'_parent', -style=>{'src'=>'../../../Paginas/Estilos/estilo.css'}, -BGCOLOR=>'#FFD9B3'); ### my $filename="c:\\Documentos\\htmprueba.htm"; my $req= new HTTP::Request 'GET','http://150.186.76.5/Paginas/Pruebas/htmprueba.htm' ; $res = $ua->request($req,$filename) ; if($res->is_success) { print qq! ok!; } &todoc($filename); sub todoc { # Get the filename argument... my $file_in=shift; my $file_out="c:\\Documentos\\htmprueba.doc" ; $word = Win32::OLE->new('Word.Application', 'Quit')or die "Can't create Word object\n"; $doc = $word->Documents->Open({ FileName => $file_in, ConfirmConversions => 0, ReadOnly => 1, AddToRecentFiles => 0, Format => wdOpenFormatAuto}); $rc = $doc->SaveAs({ FileName => $file_out, FileFormat => wdFormatDocument}); $rc = $doc->Close; } ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: encrypt a module?
Here's a hilarious answer: ACME::Bleach They will wonder where the code went! Good luck, Christopher -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 7:32 AM To: [EMAIL PROTECTED] Subject: encrypt a module? I am coding a module that will be shared across several other groups applications but there are calls in it that only certain groups should use. Rather than making separate modules for each group having only the functions they need, I'd like to just distribute one copy and only tell them what they need to know. But if they can go pokiing around in there (and they will) they might get frisky and start mucking about with things they shouldn't be. Is there a way to distribute a perl module in such a way that it is "use"able but is not rendered in plain text? by "use"able I mean simply that you need only have a use Foo::Bar; to import it, not something more complicated. I've seen things for scripts, but does the same apply to modules(.pm)? Thanks, Chuck ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: On click?
Are you trying to find out which 'word' the user clicks on within your scrolling text? If so...a bit more thinking is needed. If not, then it is easy enough to kick off a process. Just bind Button 1 to the label. $lb->bind('',sub{system("start iexplore")} ); Jack --- "The views expressed here are mine and do not reflect the official position of my employer or the organization through which the Internet was accessed". -Original Message- From: Martin Moss [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 12:48 AM To: Peter Eisengrein; [EMAIL PROTECTED] Subject: RE: On click? It's a Label window, with scrolling text. So I want to make different words in the same window have different parameters. Basically I want to spawn an IE window with a specific URL. (Where $vu_win is the main window) my $fr = $vu_win->Frame(-width => 90, -background=>'red', -foreground=>'white')->pack(-fill=>'x'); my $lb = $fr->Label(-textvariable => \$text, -width => 90,-background=>'red', -foreground=>'white')->pack(-fill=>'x'); $lb->repeat(100, \&update); my $lt; my $chr; MainLoop(); sub update { $lt = localtime() . " " unless $lt; $chr = substr($lt,0,1,''); $text = substr("$text$chr", -90); } Regards Marty > -Original Message- > From: Peter Eisengrein [mailto:[EMAIL PROTECTED]] > Sent: Monday 17 December 2001 14:42 > To: 'Martin Moss'; [EMAIL PROTECTED] > Subject: RE: On click? > > > Is it in a text box, label, RichEdit, other? The short answer (for > Win32::GUI) is yes, an event is triggered and the associated > _Click sub is > run. Depending upon the widget type, it may have to be handled > differently. > > > > > -Original Message- > > From: Martin Moss [mailto:[EMAIL PROTECTED]] > > Sent: 17 December 2001 06:29 > > To: [EMAIL PROTECTED] > > Subject: On click? > > > > > > Is there an oNClick or equivalent event in perl/TK, or Win32::GUI? > > > > I need to make certain Text clickable. i.e. When mouse moves > > over the text > > it's icon changes and if the text is clicked, then an event > > is kicked off. > > As the text is dynamic and it changes regularly, I need to be able to > > configure different event's for different Text. Maybe even > > different Words > > in a string of text displayed in the same window. > > > > Regards > > > > Marty > > > > > -Original Message- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED]]On > > Behalf Of Ron > > > Hartikka > > > Sent: Saturday 15 December 2001 02:03 > > > To: Dick Penny; [EMAIL PROTECTED] > > > Subject: RE: print console lines?? > > > > > > > > > Do you want to modify the existing script whose results you > > want to print? > > > > > > Or, do you want to write a new script which (maybe runs the > > > existing script > > > and) collects results from the existing script? > > > > > > > -Original Message- > > > > From: Dick Penny [mailto:[EMAIL PROTECTED]] > > > > Sent: Friday, December 14, 2001 7:01 PM > > > > To: Ron Hartikka; [EMAIL PROTECTED] > > > > Subject: RE: print console lines?? > > > > > > > > > > > > Print the results of the script which ARE in the console > > window in my > > > > situation. The particular script which has just finished > > executing. The > > > > idea is to be able to look at them prior to printing them. > > > > > > > > -Original Message- > > > > From: Ron Hartikka [mailto:[EMAIL PROTECTED]] > > > > Sent: Friday, December 14, 2001 3:36 PM > > > > To: Dick Penny; [EMAIL PROTECTED] > > > > Subject: RE: print console lines?? > > > > > > > > > > > > Print the console window, or print the results of your script? > > > > > > > > Any script or a particular script? > > > > > > > > > -Original Message- > > > > > From: [EMAIL PROTECTED] > > > > > > [mailto:[EMAIL PROTECTED]]On Behalf Of > > > > Dick Penny > > > > Sent: Friday, December 14, 2001 5:43 PM > > > > To: [EMAIL PROTECTED] > > > > Subject: print console lines?? > > > > > > > > > > > > On a Win2K machine, I want to run a script, take script normal > > > > output in console window, and then print the console window > > > > if/when I like the on screen results? Thanks, Dick > > > > ___ > > > > Perl-Win32-Users mailing list > > > > [EMAIL PROTECTED] > > > > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > > > > > > > > > > > > > > > > > > > > > > > ___ > > Perl-Win32-Users mailing list > > [EMAIL PROTECTED] > > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list
RE: encrypt a module?
You want to use a source filter. The source filter is a Perl module that filters the module before it is run, so it could be used to show/hide debugging info, or in your case decrypt it. The Perl Journal had a good article on it a while ago, check it out and then see what pre-built filters are available on CPAN (looks like Filter::CBC might do what you want). [TPJ article] http://www.samag.com/documents/s=1287/sam03030004/ [Filter::CBC readme] http://www.cpan.org/modules/by-module/Filter/Filter-CBC-0.08.readme Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 10:32 AM To: [EMAIL PROTECTED] Subject: encrypt a module? I am coding a module that will be shared across several other groups applications but there are calls in it that only certain groups should use. Rather than making separate modules for each group having only the functions they need, I'd like to just distribute one copy and only tell them what they need to know. But if they can go pokiing around in there (and they will) they might get frisky and start mucking about with things they shouldn't be. Is there a way to distribute a perl module in such a way that it is "use"able but is not rendered in plain text? by "use"able I mean simply that you need only have a use Foo::Bar; to import it, not something more complicated. I've seen things for scripts, but does the same apply to modules(.pm)? Thanks, Chuck ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
encrypt a module?
I am coding a module that will be shared across several other groups applications but there are calls in it that only certain groups should use. Rather than making separate modules for each group having only the functions they need, I'd like to just distribute one copy and only tell them what they need to know. But if they can go pokiing around in there (and they will) they might get frisky and start mucking about with things they shouldn't be. Is there a way to distribute a perl module in such a way that it is "use"able but is not rendered in plain text? by "use"able I mean simply that you need only have a use Foo::Bar; to import it, not something more complicated. I've seen things for scripts, but does the same apply to modules(.pm)? Thanks, Chuck ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Rename or copy of STDERR-File
To precede the log file with date & time, call the script by a batch file, with the following lines preceding the PERL script. - echo -- >> errors.txt # Puts a nice visible split in the log file. date /t >> errors.txt # Creates / appends to file errors.txt with date (no prompt). time /t >> errors.txt # Appends to errors.txt with time (no prompt). perl -w script.pl 2 >>errors.txt# Appends STDERR to errors.txt. - -Original Message- From: Roland Schoenbaechler [mailto:[EMAIL PROTECTED]] Sent: 18 December 2001 14:07 To: [EMAIL PROTECTED] Subject: Rename or copy of STDERR-File Hi, I'm running a script on Windows NT. When I start the script, I redirect STDERR to a file ( "perl -w script.pl 2>errors.txt"). The runs daily as a batch-job and the error-file is overwritten. However, under some conditions I want to keep the error-file. Is there a possibility to rename or copy the error-file at the end of the script? Or is it possible to include the date in the filename when I start the script? Thanks for your help Roland *** PLEASE NOTE *** This message, along with any attachments, may be confidential or legally privileged. It is intended only for the named person(s), who is/are the only authorized recipients. If this message has reached you in error, kindly destroy it without review and notify the sender immediately. Thank you for your help. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised.if you are not the intended recipient, any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. Please note that any views, opinions or advice contained in this email are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason, where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Rename or copy of STDERR-File
Hi, I'm running a script on Windows NT. When I start the script, I redirect STDERR to a file ( "perl -w script.pl 2>errors.txt"). The runs daily as a batch-job and the error-file is overwritten. However, under some conditions I want to keep the error-file. Is there a possibility to rename or copy the error-file at the end of the script? Or is it possible to include the date in the filename when I start the script? Thanks for your help Roland *** PLEASE NOTE *** This message, along with any attachments, may be confidential or legally privileged. It is intended only for the named person(s), who is/are the only authorized recipients. If this message has reached you in error, kindly destroy it without review and notify the sender immediately. Thank you for your help. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: please unsubscribe
But... but, I don't want to! I like this list. ;-) jpt -Original Message-From: Frank Perron [mailto:[EMAIL PROTECTED]]Sent: Monday, December 17, 2001 9:53 PMTo: Perl-Win32-UsersSubject: please unsubscribe please unsubscribe
RE: On click?
It's a Label window, with scrolling text. So I want to make different words in the same window have different parameters. Basically I want to spawn an IE window with a specific URL. (Where $vu_win is the main window) my $fr = $vu_win->Frame(-width => 90, -background=>'red', -foreground=>'white')->pack(-fill=>'x'); my $lb = $fr->Label(-textvariable => \$text, -width => 90,-background=>'red', -foreground=>'white')->pack(-fill=>'x'); $lb->repeat(100, \&update); my $lt; my $chr; MainLoop(); sub update { $lt = localtime() . " " unless $lt; $chr = substr($lt,0,1,''); $text = substr("$text$chr", -90); } Regards Marty > -Original Message- > From: Peter Eisengrein [mailto:[EMAIL PROTECTED]] > Sent: Monday 17 December 2001 14:42 > To: 'Martin Moss'; [EMAIL PROTECTED] > Subject: RE: On click? > > > Is it in a text box, label, RichEdit, other? The short answer (for > Win32::GUI) is yes, an event is triggered and the associated > _Click sub is > run. Depending upon the widget type, it may have to be handled > differently. > > > > > -Original Message- > > From: Martin Moss [mailto:[EMAIL PROTECTED]] > > Sent: 17 December 2001 06:29 > > To: [EMAIL PROTECTED] > > Subject: On click? > > > > > > Is there an oNClick or equivalent event in perl/TK, or Win32::GUI? > > > > I need to make certain Text clickable. i.e. When mouse moves > > over the text > > it's icon changes and if the text is clicked, then an event > > is kicked off. > > As the text is dynamic and it changes regularly, I need to be able to > > configure different event's for different Text. Maybe even > > different Words > > in a string of text displayed in the same window. > > > > Regards > > > > Marty > > > > > -Original Message- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED]]On > > Behalf Of Ron > > > Hartikka > > > Sent: Saturday 15 December 2001 02:03 > > > To: Dick Penny; [EMAIL PROTECTED] > > > Subject: RE: print console lines?? > > > > > > > > > Do you want to modify the existing script whose results you > > want to print? > > > > > > Or, do you want to write a new script which (maybe runs the > > > existing script > > > and) collects results from the existing script? > > > > > > > -Original Message- > > > > From: Dick Penny [mailto:[EMAIL PROTECTED]] > > > > Sent: Friday, December 14, 2001 7:01 PM > > > > To: Ron Hartikka; [EMAIL PROTECTED] > > > > Subject: RE: print console lines?? > > > > > > > > > > > > Print the results of the script which ARE in the console > > window in my > > > > situation. The particular script which has just finished > > executing. The > > > > idea is to be able to look at them prior to printing them. > > > > > > > > -Original Message- > > > > From: Ron Hartikka [mailto:[EMAIL PROTECTED]] > > > > Sent: Friday, December 14, 2001 3:36 PM > > > > To: Dick Penny; [EMAIL PROTECTED] > > > > Subject: RE: print console lines?? > > > > > > > > > > > > Print the console window, or print the results of your script? > > > > > > > > Any script or a particular script? > > > > > > > > > -Original Message- > > > > > From: [EMAIL PROTECTED] > > > > > > [mailto:[EMAIL PROTECTED]]On Behalf Of > > > > Dick Penny > > > > Sent: Friday, December 14, 2001 5:43 PM > > > > To: [EMAIL PROTECTED] > > > > Subject: print console lines?? > > > > > > > > > > > > On a Win2K machine, I want to run a script, take script normal > > > > output in console window, and then print the console window > > > > if/when I like the on screen results? Thanks, Dick > > > > ___ > > > > Perl-Win32-Users mailing list > > > > [EMAIL PROTECTED] > > > > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > > > > > > > > > > > > > > > > > > > > > > > ___ > > Perl-Win32-Users mailing list > > [EMAIL PROTECTED] > > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users