Help with Win32::GUI

2012-09-07 Thread Barry Brevik
sorry that it is about 90 lines in length. Can anyone help? Thank you, Barry Brevik --- use strict; use warnings; use Win32; use Win32::GUI(); my $main = Win32::GUI::Window - new ( -name = 'Main', -title = 'Test v0.1', -width = 400, -height = 200 ); my

Help with LookupAccountSID (again)

2012-07-18 Thread Barry Brevik
to do this? TIA, Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: Help with LookupAccountSID (again)

2012-07-18 Thread Barry Brevik
Ay Caramba!! I thank you for the post, but my skills are too low to reverse that monstrosity! Barry Brevik -Original Message- From: Cordoni, Ray [mailto:rcord...@richmond.ca] Sent: Wednesday, July 18, 2012 11:38 AM To: Barry Brevik; perl Win32-users Subject: RE: Help

RE: Help with LookupAccountSID (again)

2012-07-18 Thread Barry Brevik
I tried to implement that call using Win32::API, but I just don't know enough about Windows to make it work. Thank you for posting, Barry Brevik -Original Message- From: Howard Tanner [mailto:tan...@optonline.net] Sent: Wednesday, July 18, 2012 11:31 AM To: Barry Brevik; Perl-Win32

RE: Help with LookupAccountSID (again)

2012-07-18 Thread Barry Brevik
Thank you again. I saw that, but it looks like it might not be available to Perl 5.14 and I am looking to upgrade. Barry Brevik -Original Message- From: Howard Tanner [mailto:tan...@optonline.net] Sent: Wednesday, July 18, 2012 12:11 PM To: Barry Brevik Cc: Perl-Win32-Users

RE: Help with LookupAccountSID (again)

2012-07-18 Thread Barry Brevik
of call into an XS module or something. Thank you for posting, Barry Brevik -Original Message- From: Steven Manross [mailto:ste...@manross.net] Sent: Wednesday, July 18, 2012 5:07 PM To: Barry Brevik; perl Win32-users Subject: RE: Help with LookupAccountSID (again) What about the following

Win32::LookupAccountSID()

2012-07-10 Thread Barry Brevik
$siddomain = ''; my $sidtype = ''; Win32::LookupAccountSID(qbert, $usersid, $accountname, $siddomain, $sidtype); print error..: , Win32::FormatMessage(Win32::GetLastError()), \n; Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users

RE: Win32::LookupAccountSID()

2012-07-10 Thread Barry Brevik
Thanks for posting!! -Original Message- From: Ken Cornetet [mailto:ken.corne...@kimball.com] Sent: Tuesday, July 10, 2012 11:39 AM To: Barry Brevik; perl Win32-users Subject: RE: Win32::LookupAccountSID() http://code.activestate.com/lists/perl-win32-users/26301/ -Original Message

Help with NetAdmin::GetServers

2012-06-25 Thread Barry Brevik
::GetError()), .\n); } ERROR message is: Unable to query for domain controllers: No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept. Thanks in advance, Barry Brevik

RE: New W2K8 I/O priority

2012-06-20 Thread Barry Brevik
::Process module for the priority classes as well as other flags, etc. Barry Brevik - From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Gianvittorio Negri

help with Win32

2012-06-04 Thread Barry Brevik
if necessary. In fact, I'm willing to jump through a fair number of hoops to collect this information. Does anyone out there know how to do this, or at least have an idea as to how to do this? Thanks in advance, Barry Brevik ___ Perl-Win32-Users

RE: Perl-Win32-Users Digest, Vol 70, Issue 1

2012-06-04 Thread Barry Brevik
Thank you for the detailed response, even if it is depressing. Barry Brevik On the other hand, if you are really asking the question from, you have to go to the event logs; there, you can get if a login was local or via the network.  The problem, of course, is that it is very transitory

Turn off monitor?

2012-04-06 Thread Barry Brevik
I've been Googling for 2 hours and do not see what I'm looking for. Does anyone know how to turn on/off the computer's monitor using Win32 modules? Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com

Daylight Savings Time?

2012-01-26 Thread Barry Brevik
something light weight (rather not use a module) and it only has to deal with the PST timezone. Has anyone found a Win32:: method that will retrieve the DST state from Windows? Also, when the date is expressed in that format, is it supposed to represent UTC time along with the offset? Barry Brevik

RE: Daylight Savings Time?

2012-01-26 Thread Barry Brevik
In list context it returns the DST state as the last value so (localtime())[-1] would give that value. OK, that is just lame of me to miss that. Thank you so much. Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users

RE: Daylight Savings Time?

2012-01-26 Thread Barry Brevik
On Thu, 26 Jan 2012, Barry Brevik wrote: In list context it returns the DST state as the last value so (localtime())[-1] would give that value. OK, that is just lame of me to miss that. Thank you so much. Not sure if this matters to you, but at least older versions of Windows (before

Problem with recursive routine

2011-12-05 Thread Barry Brevik
About a week ago, I posted a question about a recursive directory enumeration function that I was having trouble with, and Tobias Hoellrich wrote back and pointed out my ridiculous oversight. I thought that I would post the resulting code as a point of interest. It is kinda bloated with a bunch of

Problem with recursive routine

2011-11-28 Thread Barry Brevik
I'm having a problem with a recursive routine that enumerates a directory tree and all of its files. It works well, except when it goes down 1 level from the top directory, I get this message: Use of uninitialized value in addition (+) at test61.pl line 61. I've been fighting this thing for a

RE: Problem with recursive routine

2011-11-28 Thread Barry Brevik
Thanks. That is a cool observation. -Original Message- From: Tobias Hoellrich [mailto:thoel...@adobe.com] Sent: Monday, November 28, 2011 3:47 PM To: Barry Brevik; perl Win32-users Subject: RE: Problem with recursive routine You are not changing the directory while traversing. Whenever

Re:Problem with regex

2011-11-17 Thread Barry Brevik
Hi Barry, On Thu, Nov 10, 2011 at 2:34 AM, Barry Brevik bbre...@stellarmicro.com wrote: Below is some test code that will be used in a larger program. In the code below I have a regular expression who's intent is to look for   1 or more characters , 1 or more characters and replace

Re:Problem with regex

2011-11-17 Thread Barry Brevik
questions to the list, and it alarms me that the traffic is so low... I would really regret having this list go dormant, as I have learned so much, especially from reading threads I did not post. And the people are really friendly. Barry Brevik ___ Perl-Win32

Re:Problem with regex

2011-11-17 Thread Barry Brevik
with spaces between fields, which are not supposed to be there anyway. Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: Re:Problem with regex

2011-11-17 Thread Barry Brevik
Don't know if it helps, but I seem to have installed Text::CSV_XS on Activestate 5.14.1 build 1401. I'm on Perl 5.8.8 because my Perl DevKit only works on that version. Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users

Problem with regex

2011-11-09 Thread Barry Brevik
the camel book section on regexes and have tried many variations, but apparently I'm too close to it to see what must be a simple answer. BTW, if you guys think I'm posting too often, please say so. Barry Brevik use strict; use warnings; my $csvLine

RE: How to split up a string with carriage returns into an array

2011-11-04 Thread Barry Brevik
): use strict; use warnings; my $msg = 'this is line one this is line 2 this is line III'; print original string:\n$msg\n\n; print the array:\n; my @ans = split /\n\r/, $msg; print $_\n foreach (@ans); It also works with just the \n. Barry Brevik

Help with error msg

2011-11-04 Thread Barry Brevik
is in the comment. I realize that the sample code has some elements specific to my environment, but it is the best I could do, and it is pared down quite a bit. Thanks, Barry Brevik -- use strict; use warnings; use Win32::ODBC; use Win32::Console; # Un-buffer

Perl 5.14 and Win32

2011-11-01 Thread Barry Brevik
Win32 extensions? I require these extensions, so I don't know what to do. Thanks, Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: Perl 5.14 and Win32

2011-11-01 Thread Barry Brevik
? Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: Making directories

2011-10-26 Thread Barry Brevik
to overwrite the files fails. Sorry for all the parens. I hope that makes it more clear, and I should have said that in my 1st post. Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http

RE: Making directories

2011-10-25 Thread Barry Brevik
Thank you for the tips... I will try them. -Original Message- From: Kanhaiya Prasad [mailto:kpra...@aptaracorp.com] Sent: Monday, October 24, 2011 10:08 PM To: 'Sisyphus'; Barry Brevik; perl-win32-users@listserv.ActiveState.com Subject: RE: Making directories Hi Here

RE: Making directories

2011-10-25 Thread Barry Brevik
, 2011 6:00 PM To: Barry Brevik; perl-win32-users@listserv.ActiveState.com Subject: Re: Making directories - Original Message - From: Barry Brevik Does anyone have advice for me about how they create directories with Perl? I've used: system 'mkdir', $path

RE: Making directories

2011-10-25 Thread Barry Brevik
PPN with the repositories I have configured only has the older version of File::Path that only has 'mkpath'. From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Justin

Making directories

2011-10-24 Thread Barry Brevik
they create directories with Perl? Barry Brevik = use strict; use warnings; umask 0; my $thisPath = c:\\temp\\megabom\\newdir; unless (-d $thisPath) {mkdir $thisPath, 0777;} if (-r $thisPath) {print Sub folder is read for everyone.\n\n;} if (-w $thisPath

Array madness

2011-10-18 Thread Barry Brevik
a newbie problem, but I'm not a newbie; nevertheless, I guess I do not know enough about array references yet. Barry Brevik == use strict; use warnings; my @bartypes = ( [ ['39', '3'], ['128', '1'], ['128A', '1A'], ['128B', '1B

RE: Array madness

2011-10-18 Thread Barry Brevik
Ah, I see. Yes, that had eluded me. Here you are flattening the @$record into @toparray. If you wanted to keep the nested array structure, you would have to push the array reference instead: push @toparray, $record; Or if for whatever reason you must create a copy of the data

Non blocking keyboard

2011-10-13 Thread Barry Brevik
Last week I had posted a query about getting keyboard input in a non blocking way. I received several replies, so I thought I would post back the code I developed which seems to work. This is not the code I will end up using; it is more like a proof of concept program. use strict; use warnings;

RE: Non-blocking keyboard?

2011-10-10 Thread Barry Brevik
I want to thank those who responded; it was all good advice. It turns out that what I was looking for was GetEvents. I really need to pay more attention to the module docs. I think you wanted to call PeekInput() instead of Input() here. But GetEvents() may be even better if you only want

Non-blocking keyboard?

2011-10-07 Thread Barry Brevik
. print chr($input[5]); } } } As an aside, I think we need to get more traffic on this list somehow. Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman

RE: Setting file server time

2011-09-29 Thread Barry Brevik
- From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Barry Brevik Sent: Monday, September 26, 2011 8:24 PM To: Tobias Hoellrich; Howard Tanner

Setting file server time

2011-09-26 Thread Barry Brevik
Using Perl 5.8.8. I have both of the Win32 books and I've googled for this but I've come up short. Does anyone know how to set the time on a Windows server from a remote machine? Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users

RE: Setting file server time

2011-09-26 Thread Barry Brevik
:26 PM To: Tobias Hoellrich; 'Barry Brevik'; perl-win32-users@listserv.ActiveState.com Subject: RE: Setting file server time NET TIME was my first thought too, but it only allows you to set your time to that of another machine. ___ Perl-Win32

RE: Help with array

2011-09-08 Thread Barry Brevik
Splice with a length of 0... I wish I had thought of that. Thank you! Everybody's a 'newb' at stuff that haven't tried before. It might help to think of inserting elements into an array as replacing a section of length 0, when you read 'perldoc -f splice'. It might also be worth taking a

Help with array

2011-09-07 Thread Barry Brevik
, but is there a cleaner, more Perl-ish way of doing it? Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: Help with array

2011-09-07 Thread Barry Brevik
The Camel book seems to say that splice will only remove or change elements and move them *down* if necessary. You must think I'm a raging newb, but I gotta admit, I've never used splice. Thanks, I'll check it out! Barry Brevik -Original Message- From: perl-win32-users-boun

Keyboard handler

2011-09-01 Thread Barry Brevik
input. I've been writing a routine that uses Win32::Console in the manner shown below. Anyway, writing this has become way complex, and I've lost my way. I'm wondering if anyone out there has some example code that they would be willing to share? Barry Brevik

Help with Win32::Process::Create()

2011-08-23 Thread Barry Brevik
I'm working on an app that periodically needs to execute outside procedures. Ideally, I want to launch the outside procedure in fire and forget mode; that is, I do not want to wait for the outside process to terminate. I ALREADY HAVE some code that does this (see below). My question is- is there

RE: List vs. Array

2011-08-19 Thread Barry Brevik
Subject: Re: List vs. Array On 08/19/2011 04:24 PM, Barry Brevik wrote: Since list traffic seems to be overly light, I'll post this slightly off-topic query. All of my Perl books seem to use the word list and array interchangeably. Is there a difference between a list and an array

Help with file redirect

2011-07-05 Thread Barry Brevik
and change every print statement. Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Help with regex

2011-06-30 Thread Barry Brevik
string: $txt\n; Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Help with regex

2011-06-30 Thread Barry Brevik
Wow, thank you all for the many replies I received!! Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Help with temp file name

2011-05-18 Thread Barry Brevik
Hello- From time to time I need a subroutine to generate a temporary file name so I created an imperfect routine (shown below) to generate a file name based on the current time. The problem with this is that it will create only 1 'unique' name every second, and when the day rolls over, it will

Temp file name

2011-05-18 Thread Barry Brevik
Oops, I guess it doesn't duplicate the next day. My bad. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Help with Array of Arrays

2011-03-06 Thread Barry Brevik
I always get majorly confused when I have to deal with Arrays of Arrays, Arrays of Hashes etc. The Camel book has a good section on this, but it is not always enough. That's why each time I do one, I document it in a file on my disk. However, I have not done this one before. I am extracting Bill

Help with subroutine

2011-03-02 Thread Barry Brevik
I have a subroutine to which I want to pass a hash by reference. In the real program, the hash in the caller starts out empty, and the subroutine adds values to it. The hash eventually becomes quite large, so I want the subroutine to add values to the caller's hash. The following sample code

Help with Win32::Input

2010-02-05 Thread Barry Brevik
on how to fix this? -Barry Brevik === use strict; use warnings; use Win32::Gui; use Win32::Console; my $STDOUT = new Win32::Console(STD_OUTPUT_HANDLE); my $STDIN = new Win32::Console(STD_INPUT_HANDLE); $STDIN-Mode(ENABLE_PROCESSED_INPUT); my @event = (); my

Can I 'yield' to the system?

2009-12-03 Thread Barry Brevik
loops waiting for something to do, and it would be good to give control back to the OS when idle. There is Win32::GUI::DoEvents(), but I am unsure if this really does the same thing. Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users

Problem with lanman

2008-08-06 Thread Barry Brevik
never issues any error despite use strict; use warnings;, and the cmd window is never closed. So is this one of those things we live with that everyone knows about except me? Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users

Win32::Lanman make computer go argh!

2008-07-09 Thread Barry Brevik
Interpreter has encountered a problem and needs to close. We are sorry for the inconvenience. Here is a link to the actual error: http://www.manicreader.com/gallery/latest/perlerror.jpg I would appreciate any clues as to where to start looking to fix this problem. Barry Brevik

Another Win32::ODBC issue

2007-12-03 Thread Barry Brevik
that returns this prefix string. Can anyone point me in the right direction? Thank you, Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Help with Win32::ODBC

2007-11-29 Thread Barry Brevik
I am using the Win32::ODBC module, and I continually get the following error message: Can't locate auto/Win32/ODBC/GetTypeInfo.al in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at odbcinfo.pl line 58 Indeed, there is no filename.al file of any kind on my disk anywhere, which leads me

Re: Opening files

2006-09-18 Thread Barry Brevik
Shouldn't it be: open(FH,$file) or die The file $file could not be found; Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs