Trap window close
Hi, Have looked at sigint to trap the window close event but am a little lost. We run some scripts in cmd prompt windows on win2k and I would like to ignore it if someone accidentally clicks the 'x' to close the window. Is that possible? Does someone have a bit of code? Many thanks Peter. __ This message may contain privileged information. If you have received this message by mistake, please keep it confidential and return it to the sender. Although we have taken steps to minimise the risk of transmitting software viruses, the EBRD accepts no liability for any loss or damage caused by computer viruses and would advise you to carry out your own virus checks. The contents of this e-mail do not necessarily represent the views of the EBRD. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Server memory stats
Hi, Anyone know of a good perl module to get the current stats from a server while it is running - things like memory usage, %CPU etc. TIA Peter. __ This message may contain privileged information. If you have received this message by mistake, please keep it confidential and return it to the sender. Although we have taken steps to minimise the risk of transmitting software viruses, the EBRD accepts no liability for any loss or damage caused by computer viruses and would advise you to carry out your own virus checks. The contents of this e-mail do not necessarily represent the views of the EBRD. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Quotes problem
[EMAIL PROTECTED] wrote: I keep running into this problem and don't know the proper way to solve it: I have an external program that I want to run within another perl version: my $timingexe = v:\\utilities\\logging\\logtime.plx ; my $opts = \$start\ .\$endtime\ .\$batchname\ .\$env\ .\$subbatch\ .\$title\ .\$ExeName\ .\$Params\ .\$version\ .\$returncode\ .$tries; print \n\n$opts\n\n; system($timingexe.$opts); This is what the contents of $opts is: 20050407 17:00:56 20050407 17:00:56 Numerix Dev N:\Development\Trades\ 112136_112136.xls 0.00 Range Accrual Pricing N:\Development\MarketData\MarketData.xls 3.1.1965.0 0 1 Which is fine. However, from the called application, this is what it gets: Args 20050407 17:00:56 20050407 17:00:56 Numerix Dev N:\Development\Trades 112136_112136.xls 0.00 Range Accrual Pricing N:\Development\MarketData\MarketData.xls 3.1.1965.0 0 1 Quotes are missing and therefore the args don't get passed properly. Is there a better way to do this? I am stuck with the calling method as I have a lot of legacy scripts and it needs to cover them all. Any hints? FROM BILL: Why is it that people can't post complete snippets ? use strict; use warnings; foreach (@ARGV) { print $_\n; } print \n; my $timingexe = v:\\utilities\\logging\\logtime.plx ; $timingexe = 'perl test.pl';# calling myself for testing my $start = '20050407 17:00:56'; my $endtime = '20050407 17:00:56'; my $batchname = 'Numerix'; my $env = 'Dev'; my $subbatch = 'N:\Development\Trades'; # bad habit to end with a \ my $title = '112136_112136.xls'; my $ExeName = '0.00 Range Accrual Pricing'; my $Params = 'N:\Development\MarketData\MarketData.xls'; my $version = '3.1.1965.0'; my $returncode = '0'; my $tries = 1; my $opts = qq{$start $endtime $batchname $env $subbatch $title} . qq{ $ExeName $Params $version $returncode $tries}; print $opts\n; print \n; system $timingexe $opts if not @ARGV; # recurse just once __END__ 20050407 17:00:56 20050407 17:00:56 Numerix Dev N:\Development\Trades 112136_112136.xls 0.00 Range Accrual Pricing N:\Development\MarketData\Mar ketData.xls 3.1.1965.0 0 1 20050407 17:00:56 20050407 17:00:56 Numerix Dev N:\Development\Trades 112136_112136.xls 0.00 Range Accrual Pricing N:\Development\MarketData\MarketData.xls 3.1.1965.0 0 1 Thanks to all for your help - the trailing \ on the tradedir was the real problem. Apologies for not sending full code snippet and for my email programs lack of skill putting the correct in the reply. __ This message may contain privileged information. If you have received this message by mistake, please keep it confidential and return it to the sender. Although we have taken steps to minimise the risk of transmitting software viruses, the EBRD accepts no liability for any loss or damage caused by computer viruses and would advise you to carry out your own virus checks. The contents of this e-mail do not necessarily represent the views of the EBRD. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Quotes problem
I keep running into this problem and don't know the proper way to solve it: I have an external program that I want to run within another perl version: my $timingexe = v:\\utilities\\logging\\logtime.plx ; my $opts = \$start\ .\$endtime\ .\$batchname\ .\$env\ .\$subbatch\ .\$title\ .\$ExeName\ .\$Params\ .\$version\ .\$returncode\ .$tries; print \n\n$opts\n\n; system($timingexe.$opts); This is what the contents of $opts is: 20050407 17:00:56 20050407 17:00:56 Numerix Dev N:\Development\Trades\ 112136_112136.xls 0.00 Range Accrual Pricing N:\Development\MarketData\MarketData.xls 3.1.1965.0 0 1 Which is fine. However, from the called application, this is what it gets: Args 20050407 17:00:56 20050407 17:00:56 Numerix Dev N:\Development\Trades 112136_112136.xls 0.00 Range Accrual Pricing N:\Development\MarketData\MarketData.xls 3.1.1965.0 0 1 Quotes are missing and therefore the args don't get passed properly. Is there a better way to do this? I am stuck with the calling method as I have a lot of legacy scripts and it needs to cover them all. Any hints? TIA Peter __ This message may contain privileged information. If you have received this message by mistake, please keep it confidential and return it to the sender. Although we have taken steps to minimise the risk of transmitting software viruses, the EBRD accepts no liability for any loss or damage caused by computer viruses and would advise you to carry out your own virus checks. The contents of this e-mail do not necessarily represent the views of the EBRD. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
PGP for perl
Hi all, Any good hints for PGP solutions? I need to ftp a file but need to encrypt it first using PGP. Thanks Peter. __ This message may contain privileged information. If you have received this message by mistake, please keep it confidential and return it to the sender. Although we have taken steps to minimise the risk of transmitting software viruses, the EBRD accepts no liability for any loss or damage caused by computer viruses and would advise you to carry out your own virus checks. The contents of this e-mail do not necessarily represent the views of the EBRD. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Offline grabbing
Apologies if a little off topic: I want to get the html source of a popup that is generated from a web page by the javascript: javascript:dt_pop('Selector?template=_injuries', 'remote', 610, 550, 10, 10, 'no', 'yes', 'no', 'no'); I have used curl in the past to get pages into a file but in this case, I don't think it is sufficient. Is there any way of executing the command and capturing the html generated? TIA Peter. __ This message may contain privileged information. If you have received this message by mistake, please keep it confidential and return it to the sender. Although we have taken steps to minimise the risk of transmitting software viruses, the EBRD accepts no liability for any loss or damage caused by computer viruses and would advise you to carry out your own virus checks. The contents of this e-mail do not necessarily represent the views of the EBRD. __ ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Offline grabbing
Unfortunately it opens a window with no menus. However, you gave a good idea and I clicked cached snapshot of page (a google function I think) and got the address. Cheers Peter -Original Message- From: Lundgren, Scott [mailto:[EMAIL PROTECTED] Sent: 21 January 2005 14:28 To: [EMAIL PROTECTED]; perl-win32-users@listserv.ActiveState.com Subject: RE: Offline grabbing Peter, From the JavaScript function you posted it seems the URL that gets passed to the function that creates the pop up window never changes. If this is the case you should be able to manually using your browser of choice look at the 'View Page Info' of the pop up window which should give you the full URL to the content of that window. You could then use your usual methods of using CURL to fetch that URL of the pop-up window's content to capture the HTML. - SL Apologies if a little off topic: I want to get the html source of a popup that is generated from a web page by the javascript: javascript:dt_pop('Selector?template=_injuries', 'remote', 610, 550, 10, 10, 'no', 'yes', 'no', 'no'); I have used curl in the past to get pages into a file but in this case, I don't think it is sufficient. Is there any way of executing the command and capturing the html generated? EBRD SECURITY NOTICE This email has been virus scanned __ This message may contain privileged information. If you have received this message by mistake, please keep it confidential and return it to the sender. Although we have taken steps to minimise the risk of transmitting software viruses, the EBRD accepts no liability for any loss or damage caused by computer viruses and would advise you to carry out your own virus checks. The contents of this e-mail do not necessarily represent the views of the EBRD. __ ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
external library
We have a centrally located perl directory. I want to have a module of utility objects I use frequently stored somewhere else that I can reference. Currently I use something like this: BEGIN { push (@INC,v:\\utilities\\perlutil); } use utils; which is in the directory shown. This doesn't seem very elegant to me - is there a better way to do this? I don't have control over the centrally located perl files and the scripts are run throughout the organisation based on this. Thanks in advance Peter. __ This message may contain privileged information. If you have received this message by mistake, please keep it confidential and return it to the sender. Although we have taken steps to minimise the risk of transmitting software viruses, the EBRD accepts no liability for any loss or damage caused by computer viruses and would advise you to carry out your own virus checks. The contents of this e-mail do not necessarily represent the views of the EBRD. __ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Backslashes and system:
I have a string containing a directory: my $outdir = 'ldn1dta1\\summitreports\\mark-it\\dev\\'; I then concantenate this with a command eg: my $cmd = command .$outdir.filename.txt; print $cmd; Gives command \\ldn1dta1\summitreports\mark-it\dev\filename.txt As expected. When I try to execute this using system: system ($cmd); It gives an error cos it has stripped the backslashes again: Error command \ldn1dta1summitreportsmark-itdevfilename.txt Cant find file etc... What is going on here! __ This message may contain privileged information. If you have received this message by mistake, please keep it confidential and return it to the sender. Although we have taken steps to minimise the risk of transmitting software viruses, the EBRD accepts no liability for any loss or damage caused by computer viruses and would advise you to carry out your own virus checks. The contents of this e-mail do not necessarily represent the views of the EBRD. __ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Editor - finding lines
ConTEXT also does this and colours your text for a number of languages. Best of all its freeware! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dirk Bremer (NISC) Sent: 27 May 2004 15:32 To: Perl-Win32-Users Subject: Re: Editor - finding lines Dirk Bremer - Systems Programmer II - ESS/AMS - NISC St. Peters USA Central Time Zone 636-922-9158 ext. 8652 fax 636-447-4471 [EMAIL PROTECTED] www.nisc.cc - Original Message - From: Lee Goddard [EMAIL PROTECTED] To: Capacio, Paula J [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; Perl-Win32-Users [EMAIL PROTECTED] Sent: Thursday, May 27, 2004 09:12 Subject: Re: Editor - finding lines Capacio, Paula J wrote: TextPad has a search across all open documents, or all files in a directory. The results are shown in a separate window and double clicking the result takes you to that section of code in that file. Again like UltraEdit it's not free, but in the same price range. It also has color syntax highlighting for perl and you can set up the tools to execute perl from within the editor. http://www.textpad.com Paula You can also supply a regex so that the output TP collects from a command (Perl, Java, C) is hyperlinked by filename/line number. So clicking error at X.pm, line 10 takes you there. Another useful one is CTRL+M over a bracket (brace/angel-bracket, etc) to find the matching pair ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Multi-Edit does this nicely in a separate pane that lists the results of the search. You then click on any of the results and the main pane will be positioned to the affected line. This works both for a single file/window or multiple files/windows. Multi-Edit is not a free product, somewhere around $100.00. I have used it for years and have been very happy with it. I have also heard good things about UltraEdit. Dirk Bremer - Systems Programmer II - ESS/AMS - NISC St. Peters USA Central Time Zone 636-922-9158 ext. 8652 fax 636-447-4471 [EMAIL PROTECTED] www.nisc.cc ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs EBRD SECURITY NOTICE This email has been virus scanned __ This message may contain privileged information. If you have received this message by mistake, please keep it confidential and return it to the sender. Although we have taken steps to minimise the risk of transmitting software viruses, the EBRD accepts no liability for any loss or damage caused by computer viruses and would advise you to carry out your own virus checks. The contents of this e-mail do not necessarily represent the views of the EBRD. __ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: win32
Yes, the error message refers to @inc. How do I know where my @INC points to? -Original Message- From: Sisyphus [SMTP:[EMAIL PROTECTED]] Sent: 21 September 2002 00:49 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: win32 - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 9:05 AM Subject: win32 I am very new to perl for win and so please excuse me if this is really easy. I have a module that requires use Win32::ChangeNotify; I get the error that it cannot locate this. I know the file is there on my PC but am not sure if the path or something has to change to make it find it. That error message you got will have specified your @INC directories. If 'win32/ChangeNotify.pm' is in one of those specified directories then perl will find it. So, if 'ChangeNotify.pm' is in your 'perl/site/lib/win32/' folder, then the file will be found (assuming your 'perl/site/lib' folder is one of the folders specified in @INC). Did the error message specifically say that the file ChangeNotify.pm could not be found ? Best to provide a cut and paste of the actual error message (in case you have misunderstood it). Cheers, Rob EBRD SECURITY NOTICE This Email has been Virus Scanned _ This message may contain privileged information. If you have received this message by mistake, please keep it confidential and return it to the sender. Although we have taken steps to minimise the risk of transmitting software viruses, the EBRD accepts no liability for any loss or damage caused by computer viruses and would advise you to carry out your own virus checks. The contents of this e-mail do not necessarily represent the views of the EBRD. __ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs