Re: Terrible at my logic

2002-10-25 Thread Sisyphus

- Original Message -
From: Krishna, Hari [EMAIL PROTECTED]


 Heres my input:

  486   286 9  250 00788 30787 2


This is different to the input you originally posted. (It is only 32
characters long.)

Just thought I'd pont that out in case it has a bearing on the solution to
this problem :-)

Cheers,
Rob

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Terrible at my logic

2002-10-25 Thread Sisyphus

- Original Message -
From: FARRINGTON, RYAN [EMAIL PROTECTED]
To: 'Sisyphus' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Saturday, October 26, 2002 1:21 AM
Subject: RE: Terrible at my logic


 Sisyphus,
 you input string is incorrect.
 my $string = 486286 9   250 00788 30 787 2; #should be
 my $string = 486286 9   250 00788 30787 2; #according to the
original
 email.


Oh  yeah ... and I can't count, either :-)

So why the expectation that output will be different to input? (I missed
that, too, first time round.) Shouldn't they be the same ?

Cheers,
Rob

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Terrible at my logic

2002-10-25 Thread Krishna, Hari
The length has no significance as far as I am concerned. But each set of
numbers belong to A line only.
So the length of each input line may vary.

Let me post how the input file looks like.

250 80707 13 294 8 
332 0 286 5  428 0 
332 0 286 5  428 0 
414 9 428 0  797   
333 0 781 2  458 9 
414 01286 9  784 7 
280 9 428 0  281 0 
428 0 487 0  458 0 
486   797   
239 5 789 00 269 9 
239 5 789 00 269 9 
281 0 
250 82707 15 401 9 
486   286 9  250 00788 30787 2 
486   286 9  250 00788 30787 2 
707 0 788 20 340   
707 0 788 20 340   
788 20496   
788 20496   
812 20
719 45781 2 
707 14788 21 414 9 355 8 344 1 
707 14788 21 414 9 355 8 344 1 
805 4 724 2  781 2 719 41
788 30781 2  427 31820 8 
428 0 401 9  781 2 
239 0 787 2  998 3 427 31511 9 
894 1 788 29 599 0 716 99
894 1 788 29 599 0 716 99


Here's how my output should look like:

250 80 707 13  294 8
332 0  286 5   428 0
332 0  286 5   428 0
414 9  428 0   797
333 0  781 2   458 9
414 01 286 9   784 7
280 9  428 0   281 0
428 0  487 0   458 0
486797
239 5  789 00  269 9
239 5  789 00  269 9
281 0
250 82 707 15  401 9
486286 9   250 00788 30 787 2
486286 9   250 00788 30 787 2
707 0  788 20  340
707 0  788 20  340
788 20 496
788 20 496
812 20
719 45 781 2
707 14 788 21  414 9 355 8  344 1
707 14 788 21  414 9 355 8  344 1
805 4  724 2   781 2 719 41
788 30 781 2   427 31820 8
428 0  401 9   781 2
239 0  787 2   998 3 427 31 511 9
894 1  788 29  599 0 716 99
894 1  788 29  599 0 716 99

But MY LOGIC GIVES ME THE FOLLOWING OUTPUT (Iam cutting an pasting from the
wordpad exactly as is..):

250 80 707 13  294 8  
332 0  286 5   428 0  
332 0  286 5   428 0  
414 9  428 0   797
333 0  781 2   458 9  
414 01 286 9   784 7  
280 9  428 0   281 0  
428 0  487 0   458 0  
486797
 239 5  789 00  269 9  
239 5  789 00  269 9  
281 0  
  250 82 707 15  401 9  
486286 9   250 0 0788 3 0787 2  
  486286 9   250 0 0788 3 0787 2  
  707 0  788 20  340
707 0  788 20  340
788 20 496
 788 20 496
 812 20 
  719 45 781 2  
 707 14 788 21  414 9  355 8  344 1  
  707 14 788 21  414 9  355 8  344 1  
  805 4  724 2   781 2  719 4 1
   788 30 781 2   427 3 1820 8  
   428 0  401 9   781 2  
239 0  787 2   998 3  427 3 1511 9  
  894 1  788 29  599 0  716 9 9
   894 1  788 29  599 0  716 9 9


Hope this might help you guys to help me out with the problem.

Thanks a lot.

Regards,
Hari.




-Original Message-
From: Sisyphus [mailto:kalinabears;hdc.com.au]
Sent: Friday, October 25, 2002 10:23 AM
To: [EMAIL PROTECTED]
Subject: Re: Terrible at my logic



- Original Message -
From: Krishna, Hari [EMAIL PROTECTED]


 Heres my input:

  486   286 9  250 00788 30787 2


This is different to the input you originally posted. (It is only 32
characters long.)

Just thought I'd pont that out in case it has a bearing on the solution to
this problem :-)

Cheers,
Rob

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Terrible at my logic

2002-10-25 Thread Francoys Crepeau
BTW, for the sake of clarity when such a problem is presented, how about 
having a preamble saying that blank spaces will be shown here as some 
visible character not used in the problem?

This would be useful for those of us with so-so eyesight, or who unfortunately 
have to put up with proportional fonts being forced upon them.

Just a suggestion.

Françoys
 
On Friday 2002 October 25 11:32, Sisyphus wrote:
 - Original Message -
 From: FARRINGTON, RYAN [EMAIL PROTECTED]
 To: 'Sisyphus' [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Saturday, October 26, 2002 1:21 AM
 Subject: RE: Terrible at my logic

  Sisyphus,
  you input string is incorrect.
  my $string = 486286 9   250 00788 30 787 2; #should be
  my $string = 486286 9   250 00788 30787 2; #according to the

 original

  email.

 Oh  yeah ... and I can't count, either :-)

 So why the expectation that output will be different to input? (I missed
 that, too, first time round.) Shouldn't they be the same ?

 Cheers,
 Rob

 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

-- 


Francoys Crepeau
Ottawa, Ontario, Canada
mailto:crepeaufr;rogers.com


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Terrible at my logic - some more inputs

2002-10-25 Thread Sisyphus

- Original Message - 
From: Krishna, Hari [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 26, 2002 12:37 AM
Subject: Terrible at my logic - some more inputs


 forgot to include the print statement
  
 print OUTPT $ln54_1 $ln54_2 $ln54_3 $ln54_4 $ln54_5 $ln54_6 $ln54_7
 $ln54_8;
  
 Here's somemore inputs:
  
 707 14788 21 414 9 355 8 344 1
 805 4 724 2  781 2 719 41
 788 30781 2  427 31820 8
  
 Here's what my output looks like:
  
 707 14 788 21  414 9  355 8  344 1
 805 4  724 2   781 2  719 4 1
 788 30 781 2   427 3 1820 8
  
 Here's what I am expecting my program to do:
  
 707 14 788 21  414 9 355 8  344 1
 805 4  724 2   781 2 719 41
 788 30 781 2   427 31820 8
  
 Whats up with this??
  
 Thanks a lot for your help.
  
 Regards,
 Hari.

no warnings;
my @string = (707 14788 21 414 9 355 8 344 1,
  805 4 724 2  781 2 719 41,
  788 30781 2  427 31820 8);
for(@string) {
   for(my $i = 0; $i = 42; $i += 6) {
   print substr($_, $i, 6),  ;
   }
print \n;
}

prints:
707 14 788 21  414 9  355 8  344 1
805 4  724 2   781 2  719 4 1
788 30 781 2   427 3 1820 8

I think this is what you also get. Why do you expect something else ?

Cheers,
Rob

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Terrible at my logic

2002-10-25 Thread Joseph P. Discenza
Krishna, Hari wrote, on Friday, October 25, 2002 11:37 AM
: Let me post how the input file looks like.
: 
: 250 80707 13 294 8 
: 332 0 286 5  428 0 
: 486   286 9  250 00788 30787 2 
: 707 14788 21 414 9 355 8 344 1 
: 
: Here's how my output should look like:
: 
: 250 80 707 13  294 8
: 332 0  286 5   428 0
: 486286 9   250 00788 30 787 2
: 707 14 788 21  414 9 355 8  344 1

It's pretty clear, then, that your third word isn't supposed to
be just six characters. Look at the first line: the break between
250 80 and 707 13 makes it clear that the first word should be
six characters; fine. All of your inputs have a space in the 13th
position, so I can't tell for sure whether the second word should
be six or seven characters (does the space belong with the second
or third word?).

But look at the third line of input (abbreviated from your longer
input) and compare it to the output. There are *no* extra spaces
in the expected output until the gap between 30 and 787. So
obviously you expect (assuming the second word is six characters,
and the space in the 13th position belongs to the third word) the
input  250 00788 30 to all be one word, so the third word should
be thirteen characters!

The final word absorbs any remaining characters; no input shown has
more than five more, and your output expects it to be a single,
fourth, word.

Joe

==
  Joseph P. Discenza, Sr. Programmer/Analyst
   mailto:jdiscenza;carletoninc.com
 
  Carleton Inc.   http://www.carletoninc.com
  574.243.6040 ext. 300fax: 574.243.6060
 
Providing Financial Solutions and Compliance for over 30 Years
* Please note that our Area Code has changed to 574! * 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Terrible at my logic

2002-10-25 Thread FARRINGTON, RYAN
Title: RE: Terrible at my logic





Hari,
Joseph is hitting it on the head... *warning sloppy code ahead* the following code worked like a champ for me on all the provided inputs...


@str = (250 80707 13 294 8,
332 0 286 5 428 0,
332 0 286 5 428 0, 
414 9 428 0 797 ,
333 0 781 2 458 9 ,
414 01286 9 784 7 ,
280 9 428 0 281 0 ,
428 0 487 0 458 0 ,
486 797 ,
239 5 789 00 269 9 ,
239 5 789 00 269 9 ,
281 0 ,
250 82707 15 401 9 ,
486 286 9 250 00788 30787 2 ,
486 286 9 250 00788 30787 2 ,
707 0 788 20 340 ,
707 0 788 20 340 ,
788 20496 ,
788 20496 ,
812 20,
719 45781 2 ,
707 14788 21 414 9 355 8 344 1 ,
707 14788 21 414 9 355 8 344 1 ,
805 4 724 2 781 2 719 41,
788 30781 2 427 31820 8 ,
428 0 401 9 781 2 ,
239 0 787 2 998 3 427 31511 9 ,
894 1 788 29 599 0 716 99,
894 1 788 29 599 0 716 99);




foreach $str (@str){
 my $num = '6';
 for(my $i = 0; $i = 42; $i += 6) {
  if($i eq '18'){
   $num = '7';
  } else {
   $num = '6';
  }  
  print substr($str, $i, $num);
  unless($i eq '12'){
   print  ;
  }
  if ($i eq '18'){
   $i++;
  }
  
 }
 print \n;
}


-Original Message-
From: Krishna, Hari [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 25, 2002 10:37 AM
To: 'Sisyphus'; [EMAIL PROTECTED]
Subject: RE: Terrible at my logic



The length has no significance as far as I am concerned. But each set of
numbers belong to A line only.
So the length of each input line may vary.


Let me post how the input file looks like.


250 80707 13 294 8 
332 0 286 5 428 0 
332 0 286 5 428 0 
414 9 428 0 797 
333 0 781 2 458 9 
414 01286 9 784 7 
280 9 428 0 281 0 
428 0 487 0 458 0 
486 797 
239 5 789 00 269 9 
239 5 789 00 269 9 
281 0 
250 82707 15 401 9 
486 286 9 250 00788 30787 2 
486 286 9 250 00788 30787 2 
707 0 788 20 340 
707 0 788 20 340 
788 20496 
788 20496 
812 20
719 45781 2 
707 14788 21 414 9 355 8 344 1 
707 14788 21 414 9 355 8 344 1 
805 4 724 2 781 2 719 41
788 30781 2 427 31820 8 
428 0 401 9 781 2 
239 0 787 2 998 3 427 31511 9 
894 1 788 29 599 0 716 99
894 1 788 29 599 0 716 99



Here's how my output should look like:


250 80 707 13 294 8
332 0 286 5 428 0
332 0 286 5 428 0
414 9 428 0 797
333 0 781 2 458 9
414 01 286 9 784 7
280 9 428 0 281 0
428 0 487 0 458 0
486 797
239 5 789 00 269 9
239 5 789 00 269 9
281 0
250 82 707 15 401 9
486 286 9 250 00788 30 787 2
486 286 9 250 00788 30 787 2
707 0 788 20 340
707 0 788 20 340
788 20 496
788 20 496
812 20
719 45 781 2
707 14 788 21 414 9 355 8 344 1
707 14 788 21 414 9 355 8 344 1
805 4 724 2 781 2 719 41
788 30 781 2 427 31820 8
428 0 401 9 781 2
239 0 787 2 998 3 427 31 511 9
894 1 788 29 599 0 716 99
894 1 788 29 599 0 716 99


But MY LOGIC GIVES ME THE FOLLOWING OUTPUT (Iam cutting an pasting from the
wordpad exactly as is..):


250 80 707 13 294 8 
 332 0 286 5 428 0 
 332 0 286 5 428 0 
 414 9 428 0 797 
 333 0 781 2 458 9 
 414 01 286 9 784 7 
 280 9 428 0 281 0 
 428 0 487 0 458 0 
 486 797 
 239 5 789 00 269 9 
 239 5 789 00 269 9 
 281 0 
 250 82 707 15 401 9 
 486 286 9 250 0 0788 3 0787 2 
 486 286 9 250 0 0788 3 0787 2 
 707 0 788 20 340 
 707 0 788 20 340 
 788 20 496 
 788 20 496 
 812 20 
 719 45 781 2 
 707 14 788 21 414 9 355 8 344 1 
 707 14 788 21 414 9 355 8 344 1 
 805 4 724 2 781 2 719 4 1
 788 30 781 2 427 3 1820 8 
 428 0 401 9 781 2 
 239 0 787 2 998 3 427 3 1511 9 
 894 1 788 29 599 0 716 9 9
 894 1 788 29 599 0 716 9 9



Hope this might help you guys to help me out with the problem.


Thanks a lot.


Regards,
Hari.





-Original Message-
From: Sisyphus [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 25, 2002 10:23 AM
To: [EMAIL PROTECTED]
Subject: Re: Terrible at my logic




- Original Message -
From: Krishna, Hari [EMAIL PROTECTED]



 Heres my input:

 486 286 9 250 00788 30787 2



This is different to the input you originally posted. (It is only 32
characters long.)


Just thought I'd pont that out in case it has a bearing on the solution to
this problem :-)


Cheers,
Rob


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





Problem with Date::Manip

2002-10-25 Thread Stanley . G . Martin
I'm trying to determine the number of days, hours, minutes, seconds
since the last reboot of a server.  With WMI I can get the date and time
of when that occurred. When I use Date::Manip to calculate the
difference between the current date/time and the last reboot, it comes
up incorrect.  

Example:

use Date::Manip;

$date1 = 10/17/02 2:59 PM;
$date1a = ParseDate($date1);
$date2 = ParseDate(today);
$date3 = DateCalc($date1a, $date2, \$err);

print date1 = $date1a\n;
print date2 = $date2\n;
print date3 = $date3\n;

The output looks like this:

date1 = 2002101714:59:00
date2 = 2002102510:47:56
date3 = +0:0:1:0:19:48:56

There's defintely 7+ days between these two dates, it shows 0 days, 19
hours, 48 minutes, 56 seconds.

Is this a bug? Is my use of DateCalc incorrect? Or is there a
better/different way?

Stanley G. Martin
Sprint - ISS Enterprise App/Decision Support Services 
[EMAIL PROTECTED]


attachment: WINMAIL.DAT

Re: Terrible at my logic - some more inputs

2002-10-25 Thread csaba . raduly

On 25/10/2002 15:37:16 Krisna, Hari wrote:

forgot  to include the print statement

print  OUTPT $ln54_1 $ln54_2 $ln54_3 $ln54_4 $ln54_5 $ln54_6 $ln54_7
$ln54_8;


change this to:

print  OUTPT
$ln54_1!$ln54_2!$ln54_3!$ln54_4!$ln54_5!$ln54_6!$ln54_7!$ln54_8!;

You separate the columns with spaces and your input also contains spaces,
this makes it difficult to distinguish between the two (is that space from
the input or is it a separator ?). Use the exclamation marks as
eye-catchers; you'll be able to see what's going on.



--
Csaba Ráduly, Software Engineer   Sophos Anti-Virus
email: [EMAIL PROTECTED]http://www.sophos.com
US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Problem with Date::Manip

2002-10-25 Thread Thomas R Wyant_III

[EMAIL PROTECTED] wrote:

 The output looks like this:

 date1 = 2002101714:59:00
 date2 = 2002102510:47:56
 date3 = +0:0:1:0:19:48:56

 There's defintely 7+ days between these two dates, it shows 0 days,
 19 hours, 48 minutes, 56 seconds.

Actually, it shows 1 week, 0 days, 19 hours, 48 minutes, 46 seconds. If you
read the Date::Manip docs, the example says:

$delta=DateCalc($date1,$date2,\$err);
  = 0:0:WK:DD:HH:MM:SS   the weeks, days, hours, minutes,
  and seconds between the two

Why is this the wrong answer?

Tom Wyant



This communication is for use by the intended recipient and contains 
information that may be privileged, confidential or copyrighted under
applicable law.  If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited.  Please notify the sender
by return e-mail and delete this e-mail from your system.  Unless
explicitly and conspicuously designated as E-Contract Intended,
this e-mail does not constitute a contract offer, a contract amendment,
or an acceptance of a contract offer.  This e-mail does not constitute
a consent to the use of sender's contact information for direct marketing
purposes or for transfers of data to third parties.

 Francais Deutsch Italiano  Espanol  Portugues  Japanese  Chinese  Korean

http://www.DuPont.com/corp/email_disclaimer.html


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Desktop shortcut

2002-10-25 Thread Krummel, James C - PGGC-6

Mark,

Here is a way to make a shortcut to a file or URL using OLE.

James

use Win32::OLE;

$WSH = Win32::OLE-new('Wscript.Shell');

$SC = $WSH-CreateShortcut($WSH-SpecialFolders('AllUsersDesktop').\\Sample.lnk);
$SC-{WindowStyle} = 4;  # 3=Maximized 4=Normal 7=Minimized 
$SC-{TargetPath} = %windir%\\notepad.exe;
$SC-{Hotkey} = ALT+CTRL+N;
$SC-Save;

-Original Message-
From: Ricci, Mark [mailto:mricci;wordwave.com] 
Sent: Friday, October 25, 2002 8:05 AM
To: '[EMAIL PROTECTED]'
Subject: Desktop shortcut

Hello, 

Is there a perl module that will automate creating a desktop shortcut? 

Thanks, 
Mark 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Desktop shortcut

2002-10-25 Thread Ricci, Mark
Thanks, James.

Will your script work on both Win98 and 2k systems?

I ended up using this script due to issues with 98:

use Win32::Shortcut;
use File::Copy;

if ($OS) {
$User = Win32::LoginName();
$Dir2k = c:\\documents and settings\\$User\\desktop;
print $Dir2k\n;
create2k;
} else {
$Dir98 = c:\\windows\\desktop;
print $Dir98\n;
create98;
}
 

sub create2k {
print Creating the link in 2k\n;
my $LINK=new Win32::Shortcut();
$LINK-Path($lldir\\$llexe);
$LINK-Arguments();
$LINK-WorkingDirectory($lldir);
$LINK-Description('Reports');
#$LINK-ShowCMD(SW_SHOWNORMAL);
$LINK-Save($Dir2k\\Reports.lnk);
}

sub create98 {
print Creating the link in 98\n;
my $LINK=new Win32::Shortcut();
$LINK-Path($lldir\\$llexe);
$LINK-Arguments();
$LINK-WorkingDirectory($lldir);
$LINK-Description('Reports');
#$LINK-ShowCMD(SW_SHOWNORMAL);
$LINK-Save($Dir98\\Reports.lnk);
}

#



Mark



-Original Message-
From: Krummel, James C - PGGC-6 [mailto:jckrummel;bpa.gov] 
Sent: Friday, October 25, 2002 2:47 PM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: RE: Desktop shortcut



Mark,

Here is a way to make a shortcut to a file or URL using OLE.

James

use Win32::OLE;

$WSH = Win32::OLE-new('Wscript.Shell');

$SC =
$WSH-CreateShortcut($WSH-SpecialFolders('AllUsersDesktop').\\Sample.lnk)
;
$SC-{WindowStyle} = 4;  # 3=Maximized 4=Normal 7=Minimized 
$SC-{TargetPath} = %windir%\\notepad.exe;
$SC-{Hotkey} = ALT+CTRL+N;
$SC-Save;

-Original Message-
From: Ricci, Mark [mailto:mricci;wordwave.com]
Sent: Friday, October 25, 2002 8:05 AM
To: '[EMAIL PROTECTED]'
Subject: Desktop shortcut

Hello,

Is there a perl module that will automate creating a desktop shortcut?

Thanks,
Mark 


This e-mail message is for the sole use of the intended recipient(s) and may
contain confidential and/or privileged information.  Any review, use,
disclosure or distribution by persons or entities other than the intended
recipient(s) is prohibited.  If you are not the intended recipient, please
contact the sender by reply and destroy all copies of the original message.
Thank you.

WordWave, Capturing the Power of the Spoken Word
http://www.wordwave.com


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Logging in

2002-10-25 Thread Carl Jolley
On Mon, 21 Oct 2002, Issa Mbodji wrote:


 Hello:

 Does anyone understand how to authenticate a user from an Access database
 with 2 fields (username and password). The user is logging from an HTML
 form with 2 fields (username and password). I tried everything and it
 does not seem to work.

 Is there anything I need to do with the Apache server I am running?

 Any suggestion will be greatly appreciated.


I suggest you desribe in detail what you mean by does not seem to work.
What have you tried? Might you post a snippet of the code that does not
seem to work?

 [EMAIL PROTECTED] Carl Jolley
 All opinions are my own and not necessarily those of my employer 


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Excel Chart with 2 axes

2002-10-25 Thread Carl Jolley
On Mon, 21 Oct 2002, donald power wrote:

 Nope, the value is there after the '=' sign, (ie $Sheet-$Range(A2:A7)-{'Text'}; 
).
 I simply copied it from notepad and did not displayed nicely in the email format.
 Sigh wish anyone can point me to the right direction.



 --- Bruno FABLET [EMAIL PROTECTED] wrote:
 error on: $Chart-SeriesCollection(1)-{XValues} = 
 there is no value after '='
 
  --- donald power [EMAIL PROTECTED] a écrit :  Hi
 everyone,
 
  I've been trying to plot excel charts with 2 axes,
  but always result in one axes or even nothing is
  plotted.
  Could anyone please tell me where to fix in the
  short code below?
 
  thanks,
  // donald //
 
 
 
 ==
  use strict;
  use Win32::OLE;
  use Win32::OLE::Const 'Microsoft Excel';
 
  my $Excel = Win32::OLE-new(Excel.Application);
  $Excel-{Visible} = 1;
 
  my $Book = $Excel-Workbooks-Add;
  my $Sheet = $Book-Worksheets(1);
 
  my $Range = $Sheet-Range(A2:C7);
  $Range-{Value} =
  [['TIME', 'QUANTITY', 'PRICE'],
   ['10:00', 100, 15],
   ['11:00', 150, 10],
   ['12:00', 80, 10],
   ['13:00', 100, 20],
   ['14:00', 120, 15]];
 
  my $Chart = $Excel-Charts-Add;
  $Chart-{ChartType} = xlBuiltIn;
  $Chart-{TypeName} = Lines on 2 Axes;
 
  my $Sheet = $Book-Worksheets(1);
  $Chart-SeriesCollection(1)-{XValues} =
  $Sheet-$Range(A2:A7)-{'Text'};
  $Chart-SeriesCollection(1)-{AxisGroup} = 1;
  $Chart-SeriesCollection(1)-{Border}-{LineStyle}
  = xlContinuous;
  $Chart-SeriesCollection(1)-{Values}  =
  $Sheet-$Range(B2:B7)-{'Value'};
  $Chart-SeriesCollection(1)-{Name}= QUANTITY;
 
  $Chart-SeriesCollection-NewSeries;
  $Chart-SeriesCollection(2)-Select;
  $Chart-SeriesCollection(2)-{XValues} =
  $Sheet-Range(A2:A7)-{'Text'};
  $Chart-SeriesCollection(2)-{AxisGroup} = 2;
  $Chart-SeriesCollection(2)-{Border}-{LineStyle}
  = xlDash;
  $Chart-SeriesCollection(2)-{Values}  =
  $Sheet-Range(C2:C7)-{'Value'};
  $Chart-SeriesCollection(2)-{Name}= PRICE;
 
 
 ==

Did you indend to use for your assigned value:

$Sheet-Range(A2:A7)-{'Text'}

 [EMAIL PROTECTED] Carl Jolley
 All opinions are my own and not necessarily those of my employer 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Desktop shortcut

2002-10-25 Thread Krummel, James C - PGGC-6

Mark,

It should work properly on a Win9x machine, as I asked the OS for the location of the 
desktop rather then using a hardcoded path, although I do not know if it supports the 
All Users Desktop tag.  Here is a list of most of the standard folders the OS tracks 
on.  Win9x does not support them all, but Win2k does.

James

use Win32::OLE;

$WSH = Win32::OLE-new('Wscript.Shell');

print $ENV{WINDIR}.\n;
print $ENV{SYSTEMROOT}.\n;
print $WSH-SpecialFolders('AllUsersDesktop').\n;
print $WSH-SpecialFolders('AllUsersStartMenu').\n;
print $WSH-SpecialFolders('AllUsersPrograms').\n;
print $WSH-SpecialFolders('AllUsersStartup').\n;
print $WSH-SpecialFolders('Desktop').\n;
print $WSH-SpecialFolders('Favorites').\n;
print $WSH-SpecialFolders('Fonts').\n;
print $WSH-SpecialFolders('MyDocuments').\n;
print $WSH-SpecialFolders('NetHood').\n;
print $WSH-SpecialFolders('PrintHood').\n;
print $WSH-SpecialFolders('Programs').\n;
print $WSH-SpecialFolders('Recent').\n;
print $WSH-SpecialFolders('SendTo').\n;
print $WSH-SpecialFolders('StartMenu').\n;
print $WSH-SpecialFolders('Startup').\n;
print $WSH-SpecialFolders('Templates').\n;

-Original Message-
From: Ricci, Mark [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED]
Subject: RE: Desktop shortcut
Date: Fri, 25 Oct 2002 14:53:05 -0400

Thanks, James.

   Will your script work on both Win98 and 2k systems?

I ended up using this script due to issues with 98:

use Win32::Shortcut;
use File::Copy;

if ($OS) {
$User = Win32::LoginName();
$Dir2k = c:\\documents and settings\\$User\\desktop;
print $Dir2k\n;
create2k;
} else {
$Dir98 = c:\\windows\\desktop;
print $Dir98\n;
create98;
}
 

sub create2k {
print Creating the link in 2k\n;
my $LINK=new Win32::Shortcut();
$LINK-Path($lldir\\$llexe);
$LINK-Arguments();
$LINK-WorkingDirectory($lldir);
$LINK-Description('Reports');
#$LINK-ShowCMD(SW_SHOWNORMAL);
$LINK-Save($Dir2k\\Reports.lnk);
}

sub create98 {
print Creating the link in 98\n;
my $LINK=new Win32::Shortcut();
$LINK-Path($lldir\\$llexe);
$LINK-Arguments();
$LINK-WorkingDirectory($lldir);
$LINK-Description('Reports');
#$LINK-ShowCMD(SW_SHOWNORMAL);
$LINK-Save($Dir98\\Reports.lnk);
}

#



Mark



-Original Message-
From: Krummel, James C - PGGC-6 [mailto:jckrummel;bpa.gov] 
Sent: Friday, October 25, 2002 2:47 PM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: RE: Desktop shortcut



Mark,

Here is a way to make a shortcut to a file or URL using OLE.

James

use Win32::OLE;

$WSH = Win32::OLE-new('Wscript.Shell');

$SC =
$WSH-CreateShortcut($WSH-SpecialFolders('AllUsersDesktop').\\Sample.lnk)
;
$SC-{WindowStyle} = 4;  # 3=Maximized 4=Normal 7=Minimized 
$SC-{TargetPath} = %windir%\\notepad.exe;
$SC-{Hotkey} = ALT+CTRL+N;
$SC-Save;

-Original Message-
From: Ricci, Mark [mailto:mricci;wordwave.com]
Sent: Friday, October 25, 2002 8:05 AM
To: '[EMAIL PROTECTED]'
Subject: Desktop shortcut

Hello,

Is there a perl module that will automate creating a desktop shortcut?

Thanks,
Mark 



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Desktop shortcut

2002-10-25 Thread Ricci, Mark
Thanks for the info, James.  I might be able to enhance my script even
further with your pointers.


Mark

-Original Message-
From: Krummel, James C - PGGC-6 [mailto:jckrummel;bpa.gov] 
Sent: Friday, October 25, 2002 4:02 PM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: RE: Desktop shortcut



Mark,

It should work properly on a Win9x machine, as I asked the OS for the
location of the desktop rather then using a hardcoded path, although I do
not know if it supports the All Users Desktop tag.  Here is a list of most
of the standard folders the OS tracks on.  Win9x does not support them all,
but Win2k does.

James

use Win32::OLE;

$WSH = Win32::OLE-new('Wscript.Shell');

print $ENV{WINDIR}.\n;
print $ENV{SYSTEMROOT}.\n;
print $WSH-SpecialFolders('AllUsersDesktop').\n;
print $WSH-SpecialFolders('AllUsersStartMenu').\n;
print $WSH-SpecialFolders('AllUsersPrograms').\n;
print $WSH-SpecialFolders('AllUsersStartup').\n;
print $WSH-SpecialFolders('Desktop').\n;
print $WSH-SpecialFolders('Favorites').\n;
print $WSH-SpecialFolders('Fonts').\n;
print $WSH-SpecialFolders('MyDocuments').\n;
print $WSH-SpecialFolders('NetHood').\n;
print $WSH-SpecialFolders('PrintHood').\n;
print $WSH-SpecialFolders('Programs').\n;
print $WSH-SpecialFolders('Recent').\n;
print $WSH-SpecialFolders('SendTo').\n;
print $WSH-SpecialFolders('StartMenu').\n;
print $WSH-SpecialFolders('Startup').\n;
print $WSH-SpecialFolders('Templates').\n;

-Original Message-
From: Ricci, Mark [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED]
Subject: RE: Desktop shortcut
Date: Fri, 25 Oct 2002 14:53:05 -0400

Thanks, James.

   Will your script work on both Win98 and 2k systems?

I ended up using this script due to issues with 98:

use Win32::Shortcut;
use File::Copy;

if ($OS) {
$User = Win32::LoginName();
$Dir2k = c:\\documents and settings\\$User\\desktop;
print $Dir2k\n;
create2k;
} else {
$Dir98 = c:\\windows\\desktop;
print $Dir98\n;
create98;
}
 

sub create2k {
print Creating the link in 2k\n;
my $LINK=new Win32::Shortcut();
$LINK-Path($lldir\\$llexe);
$LINK-Arguments();
$LINK-WorkingDirectory($lldir); $LINK-Description('Reports');
#$LINK-ShowCMD(SW_SHOWNORMAL);
$LINK-Save($Dir2k\\Reports.lnk);
}

sub create98 {
print Creating the link in 98\n;
my $LINK=new Win32::Shortcut();
$LINK-Path($lldir\\$llexe);
$LINK-Arguments();
$LINK-WorkingDirectory($lldir); $LINK-Description('Reports');
#$LINK-ShowCMD(SW_SHOWNORMAL);
$LINK-Save($Dir98\\Reports.lnk);
}

#



Mark



-Original Message-
From: Krummel, James C - PGGC-6 [mailto:jckrummel;bpa.gov]
Sent: Friday, October 25, 2002 2:47 PM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: RE: Desktop shortcut



Mark,

Here is a way to make a shortcut to a file or URL using OLE.

James

use Win32::OLE;

$WSH = Win32::OLE-new('Wscript.Shell');

$SC =
$WSH-CreateShortcut($WSH-SpecialFolders('AllUsersDesktop').\\Sample.
lnk)
;
$SC-{WindowStyle} = 4;  # 3=Maximized 4=Normal 7=Minimized 
$SC-{TargetPath} = %windir%\\notepad.exe;
$SC-{Hotkey} = ALT+CTRL+N;
$SC-Save;

-Original Message-
From: Ricci, Mark [mailto:mricci;wordwave.com]
Sent: Friday, October 25, 2002 8:05 AM
To: '[EMAIL PROTECTED]'
Subject: Desktop shortcut

Hello,

Is there a perl module that will automate creating a desktop shortcut?

Thanks,
Mark





This e-mail message is for the sole use of the intended recipient(s) and may
contain confidential and/or privileged information.  Any review, use,
disclosure or distribution by persons or entities other than the intended
recipient(s) is prohibited.  If you are not the intended recipient, please
contact the sender by reply and destroy all copies of the original message.
Thank you.

WordWave, Capturing the Power of the Spoken Word
http://www.wordwave.com


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Desktop shortcut

2002-10-25 Thread $Bill Luebkert
Krummel, James C - PGGC-6 wrote:

Mark,

It should work properly on a Win9x machine, as I asked the OS for the location of the desktop rather then using a hardcoded path, although I do not know if it supports the All Users Desktop tag.  Here is a list of most of the standard folders the OS tracks on.  Win9x does not support them all, but Win2k does.

James

use Win32::OLE;

$WSH = Win32::OLE-new('Wscript.Shell');

print $ENV{WINDIR}.\n;
print $ENV{SYSTEMROOT}.\n;
print $WSH-SpecialFolders('AllUsersDesktop').\n;
print $WSH-SpecialFolders('AllUsersStartMenu').\n;
print $WSH-SpecialFolders('AllUsersPrograms').\n;
print $WSH-SpecialFolders('AllUsersStartup').\n;
print $WSH-SpecialFolders('Desktop').\n;
print $WSH-SpecialFolders('Favorites').\n;
print $WSH-SpecialFolders('Fonts').\n;
print $WSH-SpecialFolders('MyDocuments').\n;
print $WSH-SpecialFolders('NetHood').\n;
print $WSH-SpecialFolders('PrintHood').\n;
print $WSH-SpecialFolders('Programs').\n;
print $WSH-SpecialFolders('Recent').\n;
print $WSH-SpecialFolders('SendTo').\n;
print $WSH-SpecialFolders('StartMenu').\n;
print $WSH-SpecialFolders('Startup').\n;
print $WSH-SpecialFolders('Templates').\n;


Slightly modified script and 98 results:

use strict;
use Win32::OLE;

my $WSH = Win32::OLE-new('Wscript.Shell');
print WINDIR = , $ENV{WINDIR} . \n;
print SYSTEMROOT = , $ENV{SYSTEMROOT} . \n;
print AllUsersDesktop = , $WSH-SpecialFolders('AllUsersDesktop') . \n;
print AllUsersStartMenu = , $WSH-SpecialFolders('AllUsersStartMenu') . \n;
print AllUsersPrograms = , $WSH-SpecialFolders('AllUsersPrograms') . \n;
print AllUsersStartup = , $WSH-SpecialFolders('AllUsersStartup') . \n;
print Desktop = , $WSH-SpecialFolders('Desktop') . \n;
print Favorites = , $WSH-SpecialFolders('Favorites') . \n;
print Fonts = , $WSH-SpecialFolders('Fonts') . \n;
print MyDocuments = , $WSH-SpecialFolders('MyDocuments') . \n;
print NetHood = , $WSH-SpecialFolders('NetHood') . \n;
print PrintHood = , $WSH-SpecialFolders('PrintHood') . \n;
print Programs = , $WSH-SpecialFolders('Programs') . \n;
print Recent = , $WSH-SpecialFolders('Recent') . \n;
print SendTo = , $WSH-SpecialFolders('SendTo') . \n;
print StartMenu = , $WSH-SpecialFolders('StartMenu') . \n;
print Startup = , $WSH-SpecialFolders('Startup') . \n;
print Templates = , $WSH-SpecialFolders('Templates') . \n;


__END__

WINDIR = C:\WINDOWS
SYSTEMROOT =
AllUsersDesktop =
AllUsersStartMenu =
AllUsersPrograms =
AllUsersStartup =
Desktop = C:\WINDOWS\Desktop
Favorites = C:\WINDOWS\Favorites
Fonts = C:\WINDOWS\FONTS
MyDocuments = C:\My Documents
NetHood = C:\WINDOWS\NetHood
PrintHood = C:\WINDOWS\PrintHood
Programs = C:\WINDOWS\Start Menu\Programs
Recent = C:\WINDOWS\Recent
SendTo = C:\WINDOWS\SendTo
StartMenu = C:\WINDOWS\Start Menu
Startup = C:\WINDOWS\Start Menu\Programs\StartUp
Templates = C:\WINDOWS\ShellNew



--
  ,-/-  __  _  _ $Bill Luebkert   ICQ=162126130
 (_/   /  )// //   DBE Collectibles   Mailto:dbe;todbe.com
  / ) /--  o // //  http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/__/_/_ Castle of Medieval Myth  Magic http://www.todbe.com/

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs