RE: How to take focus?
Thanks Bill for solving my problem. -Eugene -Original Message- From: $Bill Luebkert [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 7:16 PM To: Su, Yu (Eugene) Cc: Perl-Win32-Users@listserv.ActiveState.com Subject: Re: How to take focus? Su, Yu (Eugene) wrote: Hi all, I start following code on a command Windows, the message box pops up but on background. How do I force the message box on foreground? use strict; use warnings; use Tk; my $msg = Your message here; msgbox ($msg); exit; sub msgbox { my $msg = shift; my $mw = MainWindow-new; $mw-title(Warning!); $mw-Label(-text = $msg, -width = 50, -height = 10, -font = Arial 24 normal) - pack; $mw-Button(-text = OK, -font = Arial 18 normal, -command = sub {$mw-destroy})-pack; $mw-focusForce; MainLoop; } -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /-- o // // Castle of Medieval Myth Magic http://www.todbe.com/ -/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Problem with DBI and Test::More
Problem solved. The issue was to do with threading support in Test::Builder. Unfortunately, ActiveState perl 5.8 does not support the most recent Test::Builder. When i pasted in the most recent Test::Builder code, the issue described below vanished. Where are requests lodged for modules to be updated? uru -Dave David Dick wrote: G'day all, i've been porting an application from linux to see if it would run under windows. i encountered the an error with ActiveState perl 5.8 when using Test::More and DBI. I managed to replicate the problem with DBD::mysql and DBD::SQLite so i don't think it's a DBD issue. The error occurs when the test script exits and reads as so. Attempt to free unreferenced scalar: SV 0x1b23e34, Perl interpreter: 0x15d402c at C:/Perl/lib/Test/Builder.pm line 1329. the error can be generated a number of ways with this code snippet, including changing the number of tests to be the (in this case) correct value of 1 (or 2), commenting out the 'FetchHashKeyName' parameter and commenting out the fetchrow_hashref loop. Can anyone else replicate the issue? Uru -David Dick ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
regex and map()
Im trying to sort out why the last line in the routine tokenizer() fails to strip off the trailing double quote for all but the last token. AFAICT, none of the tokens have any newlines - so I'm at a loss as to why it does not do what is expected - (this function is originally from the DICT server Jiten which I'm trying to use under Win32 - this problem seems to stop the server from finding the proper results since it misinterprets the request from the client. I've also reworked the initial tokenizer regex and it now seems to do what is needed for the strings I have seen up till now.) TIA Arnold === # Test program to test the tokenizer for jiten use strict; use warnings; sub tokenize; my $t; my @tokens = (); @tokens = tokenize 'define * admin admin admin'; foreach $t (@tokens) { print $t\n; } # # Other sub tokenize { my $line = shift; my @tokens; # this _should_ decompose a line into it's individual 'tokens', but # fails for a line such as 'DEFINE * admin # it lumps the last two tokens into one # original line # while($line=~s/(\.+\|\S+)\s*/push @tokens,$1;'';/e) { ; } # my attempts at fixes - seems to work so far while($line=~s/ ( # handle plain words - no quotes (\S+\s+) # one or more 'word' char followed # by one or more non-word char | # or handle quoted strings, (\\S+\) # quote + one or more of any 'word' # char followed by a trailing quote # this will NOT handle any quoted # strings containing spaces or tabs ) \s*# followed by 0 or more # whitespace chars = [ \t\n\r\f] /push @tokens,$1;''; /ex)# evaluate = execute the push { ; } # do nothing loop # this is supposed to strip off the leading and trailing from each # token but fails for all tokens with quotes except the last one; # it strips the leading quote but leaves the trailing quote for all # but the last one return map{s/^\//;s/\$//;$_;} @tokens; } ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Win32::OLE question
I have a line of code that gives an error. This line of code: my $dll = new Win32::OLE(Artwork.db.api); Gives this error: Win32::OLE(0.1403) error 0x800401f3: Invalid class string at (eval 34) line 1 To me this indicates that the dll is not registered correctly with windows. That is not however the case. I can use the dll from the language it was written in as well as a different language that supports OLE and also using SQL servers' sp_OACreate. I can also see everything fine using Jan's OLE-Browser. Not sure what else could cause this...I have tried re-registering the dll many times. I have manually cleaned every reference to it out of the registry and re registered it. To no avail, ideas? ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: regex and map()
[EMAIL PROTECTED] wrote: Im trying to sort out why the last line in the routine tokenizer() fails to strip off the trailing double quote for all but the last token. AFAICT, none of the tokens have any newlines - so I'm at a loss as to why it does not do what is expected - (this function is originally from the DICT server Jiten which I'm trying to use under Win32 - this problem seems to stop the server from finding the proper results since it misinterprets the request from the client. I've also reworked the initial tokenizer regex and it now seems to do what is needed for the strings I have seen up till now.) TIA Arnold === # Test program to test the tokenizer for jiten use strict; use warnings; sub tokenize; my $t; my @tokens = (); @tokens = tokenize 'define * admin admin admin'; foreach $t (@tokens) { print $t\n; } # # Other sub tokenize { my $line = shift; my @tokens; # this _should_ decompose a line into it's individual 'tokens', but # fails for a line such as 'DEFINE * admin # it lumps the last two tokens into one # original line # while($line=~s/(\.+\|\S+)\s*/push @tokens,$1;'';/e) { ; } # my attempts at fixes - seems to work so far while($line=~s/ ( # handle plain words - no quotes (\S+\s+) # one or more 'word' char followed I think you are foretgetting that \S+ hits along with the letters, etc. I switched the first and second around and got the following output: [C:/Common] aapl004w *1*: define * admin admin admin -- My print of what is coming in define;*;admin;admin;admin -- What is the @tokens w/in the sub define Your printed output after the sub call. * admin admin admin Wags ;) # by one or more non-word char | # or handle quoted strings, (\\S+\) # quote + one or more of any 'word' # char followed by a trailing quote # this will NOT handle any quoted # strings containing spaces or tabs ) \s*# followed by 0 or more # whitespace chars = [ \t\n\r\f] /push @tokens,$1;''; /ex)# evaluate = execute the push { ; } # do nothing loop # this is supposed to strip off the leading and trailing from each # token but fails for all tokens with quotes except the last one; # it strips the leading quote but leaves the trailing quote for all # but the last one return map{s/^\//;s/\$//;$_;} @tokens; } ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs *** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. *** ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
perl remedy for CHM exploit
hello, I use WinXP/Win2k and I'm an avid user of CHM HtmlHelp files. I'm constantly downloading new ebooks made in this format (CHM). In order to protect against the new CHM exploit, I've made a Perl/InlineC method to grab the CHM central directory. The C library is from Matt Russotto and does not use ITSS COM, but parses the binary. Get it here ... http://67.49.101.245/chm/ regards, tlviewer __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com Discover Yahoo! Use Yahoo! to plan a weekend, have fun online and more. Check it out! http://discover.yahoo.com/ ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Problem with DBI and Test::More
- Original Message - From: David Dick [EMAIL PROTECTED] To: perl-win32-users@listserv.ActiveState.com Sent: Tuesday, May 10, 2005 7:38 AM Subject: Re: Problem with DBI and Test::More Where are requests lodged for modules to be updated? This particular module will be updated as a matter of course. (AS periodically update their ppm packages, but I don't know much about the actual scheduling of these updates.) Is that good enough ? If there's some urgency then we can probably find someone to contact about it though I would think that if you need a ppm package with the latest version, then the quickest solution would be to build it yourself. For instructions on how to build a ppm package browse to your: Perl/html/faq/ActivePerl-faq2.html#how_to_make_ppm_distribution Cheers, Rob ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Win32::OLE question
Have you tried searching the hard drive for another version of that dll? Dll's located in a local / same folder as the application normally do not need to be registered I believe. They also get invoked before dlls in system32 or other folder. Mike At 05:29 PM 5/9/2005, Chris Cappelletti wrote: I have a line of code that gives an error. This line of code: my $dll = new Win32::OLE(Artwork.db.api); Gives this error: Win32::OLE(0.1403) error 0x800401f3: Invalid class string at (eval 34) line 1 To me this indicates that the dll is not registered correctly with windows. That is not however the case. I can use the dll from the language it was written in as well as a different language that supports OLE and also using SQL servers' sp_OACreate. I can also see everything fine using Jan's OLE-Browser. Not sure what else could cause this...I have tried re-registering the dll many times. I have manually cleaned every reference to it out of the registry and re registered it. To no avail, ideas? ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs