Re: I need help using Win32::API
- Original Message - From: "Louis Fenyvesi" <[EMAIL PROTECTED]> To: "Sisyphus" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, March 07, 2003 2:48 PM Subject: Re: I need help using Win32::API > Thanks for all you help! > > I will check out the PAR module. The applications I am working on do make > use of a TK interface. I imagine that the various DLLs associated with TK > would also have to be bundled as well. You'd expect so, but my brief testing indicates that's not the case. I compiled a little script that uses Math::GMP - it works as long as perl56.dll can be found, but 'perl\site\lib\auto\math\gmp\gmp.dll' does not need to be found - nor does libgmp-3.dll. (For the perl script to run, both of those files need to be locatable.) Seems that all of the dll functions being used are getting pulled into the executable - leaving only perl56.dll to be shipped with the app. Haven't tested thoroughly - maybe I should :-) > I few years ago, a actually wrote an > application that pulled in a script and all it's associated modules into a > single executable. However, I had a bunch of problems with Autoloader and, > with deadlines looming, eventually bought PDK. > > I have also been thinking of buying VC++.Net Standard Edition. I refuse to > buy Visual Studio .NET just for the optimizing compiler. (You'd think you > could buy an optimizing C++ compiler without having to buy VB, C#, J# and > all the rest). > Does VC++.Net Standard Edition support optimisation ? I don't know. Best to avoid disappointment and make sure before you buy. MSVC++6.0 Standard Edition does *not* support optimisation. Any optimisation codes get silently ignored - it doesn't even give the slightest hint that optimisation is not being provided. The perl I built with MSVC++6.0 Standard Edition works fine - though approx. 1.5 times slower than that built by AS. > ActiveState said that VC++ Standard should produce modules that are binary > compatible with AS Perl. I was wondering if you could compile the .dll > example you used with VC++ 6 and mail it to me? Assuming it's not a really difficult task, I'll do that in the next day or so and send you a copy. >I would like to be able to > test VC++ 6 compiled dll with Win32::API to see if that works. > Come to think of it, I'm also curious to see if it makes a difference. Cheers, Rob ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Parsing test file question
Hi all, I have a test file which conatin words separated by comma and I would like to process and print the result to an ouput file. The output file should only have at most 32 characters per line.If the line read is more than 32 char, then the rest should be printed in the next line. Can anybody help me with this? This is the input file: ### INPUT FILE AA1234,AA3134,AA1345,AA091,A2,AA1206,AAA0912,AA8731 BB1344 C1,CC1299,CC2425,0965,C4,CC1400,CCC1345,CC0012,CC231 DD6623,DD1200,DDD2456,DDD1123,D2,DD1206,D1,DD0011,D3 EE5609,EE1200 END ## And I want to create an ouput file like this(print the word read but cannot have more than 32, if more print it in the next line): OUTPUT FILE # AA1234,AA3134,AA1345,AA091,A2, AA1206,AAA0912,AA8731 BB1344 C1,CC1299,CC2425,0965,C4, CC1400,CCC1345,CC0012,CC231 DD6623,DD1200,DDD2456,DDD1123, D2,DD1206,D1,DD0011,D3 EE5609,EE1200 END Thanks James __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: I need help using Win32::API
Thanks for all you help! I will check out the PAR module. The applications I am working on do make use of a TK interface. I imagine that the various DLLs associated with TK would also have to be bundled as well. I few years ago, a actually wrote an application that pulled in a script and all it's associated modules into a single executable. However, I had a bunch of problems with Autoloader and, with deadlines looming, eventually bought PDK. I have also been thinking of buying VC++.Net Standard Edition. I refuse to buy Visual Studio .NET just for the optimizing compiler. (You'd think you could buy an optimizing C++ compiler without having to buy VB, C#, J# and all the rest). ActiveState said that VC++ Standard should produce modules that are binary compatible with AS Perl. I was wondering if you could compile the .dll example you used with VC++ 6 and mail it to me? I would like to be able to test VC++ 6 compiled dll with Win32::API to see if that works. Once again, thanks for all your help on this issue! Louis - Original Message - From: "Sisyphus" <[EMAIL PROTECTED]> To: "Louis Fenyvesi" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, March 04, 2003 4:16 AM Subject: Re: I need help using Win32::API > > - Original Message - > From: "Louis Fenyvesi" <[EMAIL PROTECTED]> > To: "Louis Fenyvesi" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Sunday, March 02, 2003 1:36 PM > Subject: Re: I need help using Win32::API > > > > Well, I managed to compile perl using Cygwin and I can compile XS > extensions > > using my Cygwin compiled version. Unfortunatly, I need to distribute these > > extensions with a PerlApp wrapped script and I don't think PDK is > compatible > > with Cygwin. > > > > You could do well to take a look at the PAR module from cpan. I believe it > works with cygwin. It certainly works with mingw and msvc built perls on > Windows, though I'm currently having trouble building the latest version on > msvc-perl 5.6.1. No problems at all on AS build 802. I expect there's a > solution to the problem I'm having with 5.6.1. It comes with a 'pp' tool > that is pretty much like 'perlcc' - except it works !! > I've been having a play with it today and it seems to be quite functional. > Even used it to build executables of scripts that 'use' perl extension > modules. > Not sure what its production status is - and you'll have to bundle the > perl5x.dll with the executables for them to work on machines that don't have > perl. > Produces fairly large executables but comes at a better price than PDK :-) > > Managed to dig up a cygwin version of Win32::API, too. > Works nicely with mingw-built native windows perl, as well. > Anyone interested can find it at > http://www.cygwin.com/ml/cygwin/2002-02/msg00566.html > Both links to the tarball on that page are a little flaky, so if anyone has > trouble obtaining a copy I could email the tarball to them. For my > mingw-built perl I simply plonked a copy of the cygwin 'API.xs' in the cpan > distro of Win32-API-0.20 (replacing the 'API.xs' that comes with the cpan > distro) and then built it. > > Cheers, > Rob > > > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
forcing perl to use a different IP Address
Hi, I have NT/2K with 2 IP Addresses. Currently, my script sits on these machines communicating with external machines. However, it is important that my script SHOULD use the IP address where the external machines talked to. ie, 1. machine has IP1 and IP2, 2. external machine opened a tcp port to IP1 perl script will reply using IP1 as source ip address 3. external machine opened a tcp port to IP2 perlscript will reply using IP2 as source IP address thanks for the help Jaime ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: :Telnet Script Issue
---8<-- I was able to resolve my issues with Net::Telnet not working, thank you to everyone who replied to my post. Now I have something different. Below is a script that I wrote, it telnets to a Cisco router, goes into enable mode, and is supposed to print the output of a "show ip route" command. The issue is that the script times out at line 13, which is where it is supposed to send the command. I know that the telnet is connecting, and the script is authenticating, because if it wasn't it would time out way before line 13 (at least I hope that is correct). Can anyone tell me why it is timing out? I thought that maybe it was because there was no newline at the end of line 13, but supposedly when using cmd there is an automatic newline appended to the string. I would appreciate any help. ---8<-- 99% of time out issues occur with Net::Telnet because the prompt was not matched correctly. Do a search on AS mailing lists for Net::Telnet and you will see other peoples woes with this. What I suggest you do is turn the logging on, and see what the prompt actually is. (Its also a good idea to turn strict and warnings on):- use strict; use warnings; my $t = new Net::Telnet (Timeout => 40, Dump_Log => "C:/Temp/Err.txt"); If you cant match the prompt that it requires, send us the output and one of us will write a regexp for you. HTH Just in ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Net::Telnet Script Issue
I was able to resolve my issues with Net::Telnet not working, thank you to everyone who replied to my post. Now I have something different. Below is a script that I wrote, it telnets to a Cisco router, goes into enable mode, and is supposed to print the output of a "show ip route" command. The issue is that the script times out at line 13, which is where it is supposed to send the command. I know that the telnet is connecting, and the script is authenticating, because if it wasn't it would time out way before line 13 (at least I hope that is correct). Can anyone tell me why it is timing out? I thought that maybe it was because there was no newline at the end of line 13, but supposedly when using cmd there is an automatic newline appended to the string. I would appreciate any help. use Net::Telnet(); $t = new Net::Telnet; $t->open("x.x.x.x"); $t->waitfor('/Username:/'); $t->print("glupi"); $t->waitfor('/Password:/'); $t->print("neteng1283"); $t->waitfor('/br01-nyc1.ny>/'); $t->print("enable"); $t->waitfor('/Password:/'); $t->print("neteng1283"); $t->waitfor('/br01-nyc1.ny#/'); @lines = $t->cmd("show ip route"); print @lines; Guy H. Lupi ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Changing Display Properties?
Check out http://www.roth.net/perl/scripts/scripts.asp?ChRes.pl Peter Guzis Web Administrator, Sr. ENCAD, Inc. - A Kodak Company email: [EMAIL PROTECTED] www.encad.com -Original Message- From: Dax T. Games [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 2:12 PM To: Perl Users Subject: Changing Display Properties? Anyone know how to use Perl to change Display Resolution, Color Depth and Refresh Rate on Win32 operating systems? I don't want to re-invent the wheel if someone has already done it. Dax ___ 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
Changing Display Properties?
Anyone know how to use Perl to change Display Resolution, Color Depth and Refresh Rate on Win32 operating systems? I don't want to re-invent the wheel if someone has already done it. Dax ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: automation of SelectAll-Copy-Paste in IE
At 01:14 PM 3/6/2003 -0600, Mohammad Hassan wrote: Hi, i am sorry if this question is too trivial. i was trying to automate the selectall-copy-paste sequence in internet explorer. i open a webpage in IE and then select all the contents of the page , copy them and paste it in the notepad and save it as a text file. i could have parsed the html data using the html parser. but i wanted to try this way so that it will help me in working with other microsoft applications in future. the final result is i just wanted a plain text file without any html tags. i am trying with different methods and modules available.can anybody help me by telling how to access the SelectAll(), Copy() and Paste() functions in context with internet explorer object.thanks a lot in advance, regards, Hassan This works for me. Tobias use strict; use Win32; use Win32::Clipboard; use Win32::OLE; use Win32::OLE::Const 'Microsoft Internet Controls'; use constant URL => q{http://www.kahunaburger.com/blog/}; my ($ie,$clip,$loaded); # handle to clipboard $clip = Win32::Clipboard(); # empty it $clip->Empty(); # start IE $ie = Win32::OLE->new('InternetExplorer.Application'); # make sure IE is visible $ie->{Visible} = 1; # go to a known URL $ie->Navigate(URL); # wait until URL was completly loaded while ($ie->Busy()) { Win32::Sleep(500); } # execute "Select All" $ie->ExecWB(OLECMDID_SELECTALL,OLECMDEXECOPT_DODEFAULT); # give it some time Win32::Sleep(100) while ($ie->Busy()); # execute "Copy" $ie->ExecWB(OLECMDID_COPY,OLECMDEXECOPT_DODEFAULT); # give it some time Win32::Sleep(100) while ($ie->Busy()); # wait for clipboard change $clip->WaitForChange(); # quit IE $ie->Quit(); my $text = Win32::Clipboard::GetText(); print "Clipboard contents: $text\n"; ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
automation of SelectAll-Copy-Paste in IE
Hi, i am sorry if this question is too trivial. i was trying to automate the selectall-copy-paste sequence in internet explorer. i open a webpage in IE and then select all the contents of the page , copy them and paste it in the notepad and save it as a text file. i could have parsed the html data using the html parser. but i wanted to try this way so that it will help me in working with other microsoft applications in future. the final result is i just wanted a plain text file without any html tags. i am trying with different methods and modules available.can anybody help me by telling how to access the SelectAll(), Copy() and Paste() functions in context with internet explorer object.thanks a lot in advance, regards, Hassan ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs