RE: It works!!! PERL on a CD: Ini Association and relative Path Woes

2006-07-26 Thread Michael D. Smith
27;re appropriately licensed if you plan to distribute outside of your >organization) > > > >-Original Message- >From: Timothy Johnson >Sent: Wednesday, July 26, 2006 8:21 AM >To: 'Michael D. Smith'; perl-win32-users@listserv.ActiveState.com >Subject:

Re: PERL on a CD: Ini Association and relative Path Woes

2006-07-26 Thread Michael D. Smith
g C book and an advanced C book. Apparently it's in the middle-ing C book :) ms At 06:34 AM 7/26/2006, you wrote: >Michael D. Smith wrote: > > Okay, tested just copying the Perl folder to E drive and it worked. > > > > My CD drives are G and H but a CD could be any drive

RE: PERL on a CD

2006-07-26 Thread Michael D. Smith
Okay, tested just copying the Perl folder to E drive and it worked. I uninstalled perl and deleted the folders from my hard drive for testing purposes, burned perl folder onto the CD, deleted eg and html folders for space but it wasn't really necessary, there's plenty of room. My CD drives ar

RE: PERL on a CD

2006-07-25 Thread Michael D. Smith
Lynn, Tom >Sent: Tuesday, July 25, 2006 11:14 AM >To: 'Michael D. Smith' >Subject: RE: PERL on a CD > >Why not just make your script an standalone executable program? > ___ Perl-Win32-Users mailing list Perl-Win32-Users@listser

Re: PERL on a CD

2006-07-25 Thread Michael D. Smith
Is it possible to burn PERL and a script onto a CD and execute it from there without installing perl on the host computer? There would be nothing in the registry. The path to perl.exe would have to be included for the script to execute -- but beyond that, I'm a blank. Any thoughts appreciated.

Re: How to: load array into Hash

2006-07-16 Thread Michael D. Smith
At 09:45 PM 7/16/2006, you wrote: >Eric Edwards wrote: > > > $Bill wrote: > > When you post code, post a small complete failing snippet with any input > > and output examples: > > use strict; > > use warnings; > > use Data::Dumper; $Data::Dumper::Indent=1; $Data::Dumper::Sortkeys=1; > > my @array

Re: [SPAM] RE: How to: load array into Hash

2006-07-16 Thread Michael D. Smith
Thanks again everyone. Data::Dumper was the "key" to the whole thing. The array was loaded from a file. All the keys (and data) had newlines on the end. When I asked for a key without a newline -- it wasn't there -- and I just assumed the statement was a little to cute -- but not for PERL :) m

Re: [SPAM] RE: How to: load array into Hash

2006-07-16 Thread Michael D. Smith
At 08:03 PM 7/16/2006, Charles K. Clarkson wrote: >Michael D. Smith wrote: > >: This is what I want to do: >: >: %hash = @array; >: >: But it don't work :) > >Define "it don't work". There is nothing in the hash after execution. It's

RE: How to: load array into Hash

2006-07-16 Thread Michael D. Smith
This is what I want to do: %hash = @array; But it don't work :) Every other array element is a key and every other one is data. A loop, could be done, but this every other one thing could get complicated. Must be an easy way. ms ___ Perl-Win32-

Re: old messages? ( I think we're blocking now... )

2006-03-08 Thread Michael D. Smith
At 12:30 PM 3/8/2006, Jeff Griffiths wrote: Chris Wagner wrote: Did anyone else also just receive a boat load of old messages from the list? I've got about 25 and more coming. They go back to October. And the really funny thing about it is they're all from threads I participated in. I che

Checking for internet connection

2005-11-01 Thread Michael D. Smith
Is there a right way/best way to check for an internet connection? Now I'm using LWP simple to retrieve a webpage, if that fails, just assuming no connection. It's fast when it works. I like fast, but that assumption is not always correct and causes the script to fail inelegantly when it isn't.

Re: [Attn: McCarty, Michael F] Re: Out of Office AutoReply:

2004-07-18 Thread Michael D. Smith
At 10:30 AM 7/18/2004, you wrote: So what doesn't the list manager simply make "Out of Office" a forbidden sequence in a subject or body, and trash such emails? I already suggested that to AS and got no response. It seems it should be easy enough and I too could live with it. In fact, I would app

Perlxstut(3) where are you?

2004-07-18 Thread Michael D. Smith
When the Camel book says, "We recommend you start with the perlxstut(3) manpage," what is that, and where could I find it? I'm on a Windows 2000 OS. That looks like a UNIX manual reference, and obviously being on windozes I have no *nix manual, and "man" doesn't work from the command line, so w

Re: Perl Command Line Interpreter problem

2004-06-07 Thread Michael D. Smith
I have no idea if its related but I too have problems (not the same problem mine reboots) if I try run a loop more than somewhere between 16 million and 17 million times. I thought it was my 'puter (it's 2 years old now, probably getting creaky in the joints), or OS (Windoze 2K) but I guess it

Perl error, or not??? Strange "memory access error" that doesn't occur

2004-03-19 Thread Michael D. Smith
I'm looking for opinions on, is this a PERL error or is my 'puter getting ready for the old 'puter's home. I have two perl scripts. One dials the phone, one sets the time -- both work individually no problem. Until I got the idea to tack the one that sets the time onto the end of the one that

Re: system

2004-03-09 Thread Michael D. Smith
I too have noticed that 'system' commands that worked on win98, don't on win2000 pro. For instance, I could execute a shortcut (using start.exe), that I can find no way to do on 2k. This: system("cmd /c dir /s"); does work on 2k. But this syntax: system('cmd', '/c', 'dir', '/s'); I have fou

Activating dialup networking on win2000

2004-02-24 Thread Michael D. Smith
With a little trial and error (mostly error:), I finally got this to work. system ("C:\\winnt\\system32\\rasdial.exe", "MyDUNConnectionName", "[EMAIL PROTECTED]", "password") == 0 or die "MyDie1 syscmd failed: $?"; Now, I wonder if the "normal" dialup networking error

Activating dialup networking on win2000

2004-02-23 Thread Michael D. Smith
Anyone know the "proper" way to activate dialup networking on win2000? Using PERL of course. I can double click it no problem:) When I try what used to work on 98, it fails, and locks the system up so bad that it takes a long time to shut down for a reboot. Network and dialup connections is o

@INC (SOMEHOW???) changed to E: How to change back to C?

2004-01-19 Thread Michael D. Smith
Somehow, I have no idea how, my @INC directory has been changed to E drive. I have an E drive but perl is not on it, never has been. I use E exclusively for my win2000 backup (.BKF) files. I don't think that info has any bearing whatsoever on the problem but... since I have no idea what's goi

quotes in Command Line (sortof) execution in Win2000

2003-12-30 Thread Michael D. Smith
I'm trying to get my perl script to run from the "command line" in my battery backup. It's sort of a command line. It's a textbox within the battery backup software where you enter the program to run when the power goes off. It works much like a command line, or at least it did on 98. On my ol

Registry Path changes

2003-12-23 Thread Michael D. Smith
I'm trying to make a program self-relocating; Drag and drop and it still works. I have it working within a single drive/partition. Will it work between drives/partitions if I search the registry for each occurrence of the executable and change the drive letter -- or is it not that simple? I'm t

Re: reg exp help please

2003-12-08 Thread Michael D. Smith
> Where did you find the word student anywhere in the post ?... > Nowhere did it say that you have to use spliti either. I agree that nowhere did it "say" any of that. That was just me reading between the lines -- except that she has said in the past that she's a student (and the .edu on the emai

Fwd: Re: reg exp help please

2003-12-07 Thread Michael D. Smith
The thing is lorid is the student. If she's trying to use spliti spliti(regexp patter,str,max split) spliti(":",$my_Propellar_Data,15); That's probably the assignment, and while There Is More Than One Way To Do It, doing it "their way" is "the path" to student Nirvana. I've never seen spliti bef

Search engine results

2003-11-03 Thread Michael D. Smith
I want to use perl to get and parse search engine results (several if possible) based on a variable keyword. This can't be the first time anyone has wanted to do that. Question is, does anyone know of any open source code, modules, whatever, just so I don't have to recode the wheel? Mostly beca

Re: command prompt problems.

2003-10-30 Thread Michael D. Smith
>Try the one on my Tripod site. I don't get it. It looks exactly like the one that came with win98 except it's 3 times bigger. Almost exactly anyway, the right click menu is not as extensive but the functions can still be accessed from the buttons at the top. So, why is it better (bigger) than

Third time charmed -- I hope :) Was sending email

2003-10-23 Thread Michael D. Smith
Well that definitely didn't send in plain format :) So clearly it recognized it and performed some magic on it. Magic that in this case I did NOT want. Here's a try sent in "stylized" and without the original, which it incorporated the first time making an even bigger mess, and I added several

Re: Opps sorry. sending email in HTML format

2003-10-23 Thread Michael D. Smith
Opps sorry. That first mail was incomplete. I ran a test. Sent myself a test email in both plain and html format. This header may also be needed: Content-Type: multipart/alternative; boundary="=_1906071==.ALT" Then the extra tag already mentioned: And those are the

Fwd: sending email in HTML format

2003-10-23 Thread Michael D. Smith
I think, from looking at some of my stored emails with notepad, so I can see the html, that what you need is this: in front of the html tag, like so: That's a guess but easy enough to test. ms From: "Frank Pikelner" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: sending email in HTM

RE: Regex

2003-10-23 Thread Michael D. Smith
I had a problem once where the digit can be one or two, it was computer generated and when the digit was one character, the space was two, so this might be more reliable... $line=~/[\w{3} \w{3}\s{1,2}(\d{1,2})\s{1,2}(\d{4})\s{1,2}(\d\d):(\d\d):(\d\d)\] And if it doesn't do that, it won't hurt

Fwd: Re: Environment variables

2003-10-15 Thread Michael D. Smith
> Maybe I don't understand - or maybe I am just simply wrong - but the system() command won't finish > until 'test.exe' has finished - so the loss of the env vars won't matter, will it ? It can be made to work either way. system ('notepad.exe'); Doesn't return until notepad is closed. system

Dialup networking

2003-10-01 Thread Michael D. Smith
Is there a "good" way to dial a modem with perl? I'm using this now: system ('C:\Windows\Command\start.exe', 'C:\Windows\Desktop\Highstream.net.lnk'): And it starts Windows dialup networking, but I have no other control. Busy, no connect, takes longer than normal, all cause a failure be

Re: OLE again

2003-09-30 Thread Michael D. Smith
In these examples from recent mailings to the list my $IE = Win32::OLE->GetActiveObject( 'WebBrowser.Application' ); my $Excel = Win32::OLE->GetActiveObject('Excel.Application') Where can find a list of everything I can do with GetActiveObject in place of 'webbrowser.application' and 'excel.appli

Re: Array question

2003-09-26 Thread Michael D. Smith
> This is perl, arrays start at zero, get used to it. Right :) And to perl you could add C, and it's offspring C++, and Fortran and COBOL and JAVA(Script) and... I didn't even know there was one that didn't. I know nothing of pascal but I believe:) pascal only offers the option of starting w

Re: Array question

2003-09-26 Thread Michael D. Smith
The book says stay away from this, so I never messed with it (until now for this test) but... $[ = 1; will change the first element of the array to one. On my box it actually loads the first value read into both subscript zero and one, but accessing the array starting from one would get the wh

Re: The Unofficial Perl Win32 Users Flameware/Mega-Thread FAQ

2003-09-23 Thread Michael D. Smith
You will recall the current mega-thread started not with a question but a mention of "it" in jest. I hesitate to say "it" for obvious reason but since everyone knows what "it" means, that may not matter. We may all be doomed to lifetime filled with hundreds of emails about "it." With that in mi

Re: To signal or not to signal

2003-09-15 Thread Michael D. Smith
This file: C:/Perl/html/faq/Windows/ActivePerl-Winfaq5.html#Signal_Handling says, "Signals are unsupported by the Win32 API. The C Runtime provides crude support for signals, but there are serious caveats, such as inability to die() or exit() from a signal handler. Perl itself does not guarantee

Re: Signals -- IPC -- Sound module steps on other sounds

2003-09-07 Thread Michael D. Smith
Is there any way to use the Windows signals in PERL? As I understand it, in a Window's program, there is a subroutine that's called when there is a signal. But I don't see how that could be worked into a PERL program -- that executes linearly. More basically, I want to send a kill command from

Re: Off topic virus thought

2003-08-25 Thread Michael D. Smith
Sorry about the off topic post but viruses are a problem we all deal with and I can't think of a better bunch of people to ask a computer question. I've been asked several times, "I have the latest updated virus software. Is it still possible I have a virus?" Any programmer knows the unfortunate

Re: Thoritical limits on perl processes

2003-08-21 Thread Michael D. Smith
>Seeing as there are about 10^85 atoms in the universe More realistically the number that can be addressed by 64 bits. It must be 64, you're already over the amount that can be addressed by 32 bits (something just over 2 billion). 64 bits will address some exponent number that you won't have to

Re: Round three -- system ('time', "$time") driving me nuts

2003-08-14 Thread Michael D. Smith
that it's returning zero, means that it thinks it's working. Must? be a system problem -- so where to go from here? I might manage the two test lines in C, see if that works. It will prove nothing but it might be interesting. ms At 04:23 PM 8/10/03, you wrote: On Sun, 10 Aug 2003, Mi

system ('time', $time) driving me nuts

2003-08-14 Thread Michael D. Smith
I have this in a perl script that I thought sure was working: $time = '12:01:02'; # make the test easy system ('time', "$time") or warn "no joy"; Only now it's not working and I can find nothing. If it doesn't work, how did I ever come to think it did, and if it did work, why not now? Does thi

RE: empty versus zero

2003-08-14 Thread Michael D. Smith
if (! defined ($value)) { print "1 value not defined\n";} if ($value eq "") { print "2 Found empty string ($value)\n"; } if ($value == 0) { print "3 Found a zero too ($value)\n"; } $value = ''; if (defined ($value)) { print "4 value now is defined but null ($value)\n";} if ($value eq "") { print "

redial dial-up networking script

2003-02-02 Thread Michael D. Smith
Second try. Some how I messed up the first send (To those who know me not a surprising event:) If you've received this twice my apologies. Does anyone have a dial-up networking script that will intercept a busy signal and try again? I can start the connection from a script or a batch file but c

Windows shortcut dll

2002-09-05 Thread Michael D. Smith
Does anyone know which Window's DLL makes, manages, manipulates shortcuts? Or how I can find out? ms ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: perl module for 'clicking' links??

2002-09-04 Thread Michael D. Smith
I'm not exactly sure what you want either, but no module is needed for: system ('start', 'C:\progra~1\intern~1\IEXPLORE.exe', 'http://yahoo.com'); opening the browser to a certain URL on your desktop. Bill's way will download the HTML into a file which is certainly useful many times. I just d

Re: Agent to log in to a website and fetch pages

2002-09-02 Thread Michael D. Smith
That is two entirely separate things. Both of which I too have been trying to figure out. As usual the documentation goes on at length, and yet somehow never tells you what you want to know :) In case someone wants to give an example, specifically, this page for the HTML download: http://tim

Re: screen saver -- how to trip, trigger or kill

2002-08-26 Thread Michael D. Smith
Many of the MS Windows screen savers have an option to specify a corner of the screen that you can leave the mouse pointer in, and the screen saver will never come on. Click the "settings" button, "General" tab. I just tried it on mine. Doesn't seem to work. Wonderful, advise that doesn't wor

Re: File Operator -e

2002-08-20 Thread Michael D. Smith
It works for me on files but not directories and (of course:) -f and/or -d don't work, which would allow you to check for that possibility, and prevent it from happening. Which means it has very limited utility because there's a always a "possibility" lurking in the code. Is there any chance

RE: Sendkeys and strange program behavior

2002-08-01 Thread Michael D. Smith
ine of code they're proud of has a soft spot in their heart for. That would be all of us. Right? :) ms At 05:49 PM 8/1/02, you wrote: > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]On Behalf Of > > Michael D. Smith > &g

later version of oleaut32.dll causes Perl to page fault

2002-07-30 Thread Michael D. Smith
If anyone starts getting page faults while running Perl (mine is Build 633 but I assume that matters little as this is actually a Windows problem) check the date on C:\windows\system\oleaut32.dll. There is a new version that's bad. Have you installed anything lately:) I wish I could tell you

RE: OLE module info please

2002-07-12 Thread Michael D. Smith
This page from the Win32 Perl book http://www.mmg.vmei.acad.bg/perl/learn32/ch19_02.htm Says, I should "use OLE;" (with the AS distribution) instead of: use Win32::OLE; I've tried both and either seems to work with this line (which isn't exactly the same as the book's example): $WshShell = n

Re: Sound Module Volume Bug? (Fix?;)

2002-06-30 Thread Michael D. Smith
Except of course reading through the documentation he says it's 32 bits (left and right) and each side can go up to 65,536. Which completely eliminates my theory of why it might be difficult. Not to mention it's been so long since I used any binary I even missed how much 8 bits would hold --

Re: Perl to C module test Could this be right?

2002-06-30 Thread Michael D. Smith
I just tried out the C:\Perl\html\lib\B module with this command line perl -MO=CC,-mFoo,-oFoo.c Foo.pm On this one line perl script unless ($^O =~ /MSWin32/i) {die "Only Win32 OS";} And that thing output 326 lines into Foo.c. I figured that getting the Windows environmental variables

Re: Sound Module Volume Bug? (Fix?;)

2002-06-29 Thread Michael D. Smith
It looks to me like he's using 16 bits (8 for the left and 8 for the right), and by shifting, keeping it all within one 16 bit "word." When computers had 16k in memory, that kind of stuff was necessary, now -- IF (big if) that is what he's doing -- it seems kind of silly. Of course, doing tha

Re: Sending Server Username/Password with PERL

2002-06-22 Thread Michael D. Smith
ge they're promoting to PERL). Any point in the right direction will be greatly appreciated. ms At 15:56 6/22/02 -0400, you wrote: >On Fri, 21 Jun 2002, Michael D. Smith wrote: > > > > > I'm trying to automate the process of logging onto a company's proprietary

Re: Test ? after module installed?

2002-06-16 Thread Michael D. Smith
rint "1..2\n"; } END {print "not ok 1\n" unless $loaded;} use Win32::API; $loaded = 1; print "ok 1\n"; # End of black magic. $GetPID = new Win32::API("kernel32", "GetCurrentProcessId", "", "N"); $PID = $GetP

RE: "my" variable initiation

2002-06-14 Thread Michael D. Smith
This is a small thing but it's annoying me. I've been using a gobal variable inside a subroutine, which you're not supposed to have to do, or get a warning, which isn't fatal either but I don't like it. Basically, I want a first time switch. I can do that with a gobal variable like this: $fi

Re: Parse two files for differences.

2002-06-12 Thread Michael D. Smith
When you find it you have to break out of there. Maybe you left out some code you thought was obvious but what you are showing me needs a way out. Label1: foreach $line1 (@array1){ foreach $line2 (@array2) { if ($line1 eq $line2) {print ...; next Label1; } # actually you're no

RE: Packages Included and not

2002-06-12 Thread Michael D. Smith
I just tried: useWin32::OLE; And I got two errors, package strict wasn't found nor was package vars. A search of C drive found neither on my computer, so they weren't just not found, they aren't here. Does this happen a lot, that packages that are included in the ActiveState distribution, c

RE: Starting other programs

2002-06-10 Thread Michael D. Smith
Very interesting. I've used system before, without anything where the 'Start' is. Without commands, it waits and returns only after the called program is closed, in this case notepad: system ('C:\\Windows\\Notepad.exe ', 'C:\\Windows\\TEMP\\TextFile.txt') == 0 or die "Mysystemdie $

RE: Regular Expression Help

2002-06-10 Thread Michael D. Smith
There is the example from the Camel book for putting in commas, 1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/; which can easily be modified from three and comma, to two and a space: 1 while s/(\d)(\d\d)(?!\d)/$1 $2/; Which also leaves odd ones on the left. The previous solution put them on the right.