Antwort: RE: Perl-Win32-Users Digest, Vol 18, Issue 4
Hi Liza, I' sending mails either with Mail::Sendmail; and a script would look like this: use Mail::Sendmail; %mail = ( To => '[EMAIL PROTECTED]', From => '[EMAIL PROTECTED]', Subject =>'What ever your subject is', Message => $output , 'X-MAILER' => "Mail::Sendmail version $Mail::Sendmail::VERSION", ); $mail{Smtp} = '000.000.000.000'; # TCP-IP Adress of your SMTP-Server sendmail(%mail) or die $Mail::Sendmail::error; print "OK. The Log says:\n", $Mail::Sendmail::log; This works fine, so maybe you want to try. - Another fine module is Mail::SendEasy. I use especially for sending attachments A script looks like this: use Mail::SendEasy ; # SMTP-Server Setting $mail = new Mail::SendEasy( smtp => '000.000.000.000' # TCP-IP Adress of your SMTP-SERver ) ; # If you have attachements to send @list_of_file_names = ' path_to_file1.txt, path_to_file2.doc, ... '; # Send mail with attachements $status = $mail->send( from=> '[EMAIL PROTECTED]', to => '[EMAIL PROTECTED]' , subject => 'What ever your subject is' , msg => 'What ever your body-text is', anex=> [ @list_of_file_names ], ) ; # Check the status if (!$status) { my $mailerror = $mail->error ; die "Mail-error: $mailerror\n" ; } else { # everything is ok } Hope something helps. Cheers Armin Armin Nolte Database-Marketing Deutsche Behindertenhilfe - Aktion Mensch e.V. Heinemannstr. 36 53175 Bonn Tel.: 0228-2092-233 Fax: 0228-2092-222 www.aktion.mensch.de |-+-> | | "Liza Das" <[EMAIL PROTECTED]>| | | Gesendet von: | | | [EMAIL PROTECTED]| | | veState.com | | | | | | | | | 05.07.2005 21:17 | | | | |-+-> >| | | | An: | | Kopie: | | Thema:RE: Perl-Win32-Users Digest, Vol 18, Issue 4 | >| Dear Perl Experts, I'm trying to write something that would send an email if there was an error message. But the below script is not working when I do a test run. Can you please advise on what I could be doing wrong? #!/usr/bin/perl -w use Net::SMTP; use Socket; use Strict; sendmail(); sub sendmail { my $smtpserver = 'jerryqa'; my $smtpuser = 'liza'; my $fromemail = '[EMAIL PROTECTED]'; my $smtp = Net::SMTP-> new($smtpserver, Timeout => 10); $smtp-> mail($smtpuser); $smtp-> to('[EMAIL PROTECTED]'); $smtp-> data(); $smtp-> datasend("To: [EMAIL PROTECTED]"); $smtp-> datasend("From: [EMAIL PROTECTED]"); $smtp-> datasend("\n"); $smtp-> datasend("test\n"); $smtp-> dataend(); $smtp-> quit; }; Thanks, Liza -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Monday, July 04, 2005 3:05 PM To: perl-win32-users@listserv.ActiveState.com Subject: Perl-Win32-Users Digest, Vol 18, Issue 4 Send Perl-Win32-Users mailing list submissions to perl-win32-users@listserv.ActiveState.com To subscribe or unsubscribe via the World Wide Web, visit http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of Perl-Win32-Users digest..." Today's Topics: 1. RE: Notify me when upload complete. (Charles Maier) -- Message: 1 Date: Sun, 3
Find File from a File-Link
Hi, does someone know if it is possible to read a link-to-a-file ("Verknüpfung" in german) and find out where the real file is located to open it? cheers Armin Armin Nolte Database-Marketing Deutsche Behindertenhilfe - Aktion Mensch e.V. Heinemannstr. 36 53175 Bonn Tel.: 0228-2092-233 Fax: 0228-2092-222 www.aktion.mensch.de ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Find File from a File-Link
ok, now I got it. I have to add the ending '.lnk' to a link-Name (though you don't see this in Explorer) and then it will be found. I got it while performing a while ( <*> ) { print $_, "\n";} then you can see the file-names for perl (!Strange). So thanks for helping. Armn ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Antwort: to call perl from MFC
Hi, for example build a CString or a char* char* ptrcVar = "C:\path_to_perl_script\myscript.pl myArguments"; int error = system(ptrcVar); read error variable hope it helps, cheers Armin "Chang Min Jeon" <[EMAIL PROTECTED]> Gesendet von: [EMAIL PROTECTED] 08.08.2007 11:46 An perl-win32-users@listserv.ActiveState.com Kopie Thema to call perl from MFC hello, i want to call perl script from MFC. and to pass parameter MFC's buffer(eg. char*) to the perl function. thanks in advance. -- CashFlow To be rich. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
perl starts very slow using WIN32::OLE
Hi, I have a real big perl program - it runs already for a couple of years and I am always adding some features. So since a few days it needs over 2 Minutes to start!!! I did a profiling and the problem seems to be the Win32::OLE::Const:::_Typelib So here is the actual output of the profiler: # %TimeSec. #calls sec/call F name 68.28 137.9805 777 0.177581 Win32::OLE::Const::_Typelib --> so perl needs 137 seconds for 777 calls!!! --> the first line (Win32::OLE operating in debugging mode: _Unique => 1) when starting the programm comes at once and after that I have to wait for a while => seems that the first call to Win32::OLE::Const::_Typelib need so long ???. Is perl searching the lib? And this is the output of the same program months ago: # %TimeSec. #calls sec/call F name 1.120.0794 686 0.000116 Win32::OLE::Const::_Typelib I'll be thankfull for any idea! Cheers Armin Armin Nolte Database-Marketing Deutsche Behindertenhilfe - Aktion Mensch e.V. Heinemannstr. 36 53175 Bonn Tel.: 0228-2092-233 Fax: 0228-2092-222 www.aktion-mensch.de___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
WG: SOLVED: RE: perl starts very slow using WIN32::OLE
Hi , indeed it was a Problem with Libraries on an odd network. A novel Server had been exchanged a few weeks ago (and no one told me so) and I had a .dll written years ago and stored it on the network-drive (... so this seems not to be a good place for Libraries !! ). This dll has nothing to do with my actual skript but my REGISTRY still had the entries refering to that no more existing drive under the pathes HKEY_CLASSES_ROOT\TypeLib\... HKEY_LOCAL_MACHINE\TypeLib\ So when using Win32::OLE::Const in my skript, perl tried to find the drive which did not exist anymore. I detected the problem whith a simple NETSTAT.EXE in a dos-shell while perl was running slow and netstat told me SYN_GESENDET instead of HERGESTELLT for that specific drive, after asking our EDV-Team, they remembered suddenly having being removing that server(hm...) May be someone else can avoid the same anger when reading this. Cheers Armin Armin Nolte Database-Marketing Deutsche Behindertenhilfe - Aktion Mensch e.V. Heinemannstr. 36 53175 Bonn Tel.: 0228-2092-233 Fax: 0228-2092-222 www.aktion-mensch.de "Jan Dubois" <[EMAIL PROTECTED]> Gesendet von: [EMAIL PROTECTED] 06.09.2008 01:23 An <[EMAIL PROTECTED]>, Kopie Thema RE: perl starts very slow using WIN32::OLE I suspect that some of your type libraries are stored on a network share and not local. This may make reading the library rather slow. You may want to use a tool like Process Monitor (from Sysinternals, now Microsoft) to see which files are being accessed by the Perl process during this call. Cheers, -Jan From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: September 5, 2008 2:56 AM To: perl-win32-users@listserv.ActiveState.com Subject: perl starts very slow using WIN32::OLE Hi, I have a real big perl program - it runs already for a couple of years and I am always adding some features. So since a few days it needs over 2 Minutes to start!!! I did a profiling and the problem seems to be the Win32::OLE::Const:::_Typelib So here is the actual output of the profiler: # %TimeSec. #calls sec/call F name 68.28 137.9805 777 0.177581 Win32::OLE::Const::_Typelib --> so perl needs 137 seconds for 777 calls!!! --> the first line (Win32::OLE operating in debugging mode: _Unique => 1) when starting the programm comes at once and after that I have to wait for a while => seems that the first call to Win32::OLE::Const::_Typelib need so long ???. Is perl searching the lib? And this is the output of the same program months ago: # %TimeSec. #calls sec/call F name 1.120.0794 686 0.000116 Win32::OLE::Const::_Typelib I'll be thankfull for any idea! Cheers Armin Armin Nolte Database-Marketing Deutsche Behindertenhilfe - Aktion Mensch e.V. Heinemannstr. 36 53175 Bonn Tel.: 0228-2092-233 Fax: 0228-2092-222 www.aktion-mensch.de___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Microsoft PowerPoint 9.0 Object Library
Hi, I want to write use Win32::OLE::Const 'Microsoft PowerPoint'; instead of use Win32::OLE::Const Microsoft PowerPoint 9.0 Object Library'; ... on one machine the first Notation works correctly on the other machine not, I get an error Message when Loading the TypeLib. Can anyone tell me what do I have to do, so the first on works? Cheers Armin Armin Nolte Database-Marketing Deutsche Behindertenhilfe - Aktion Mensch e.V. Heinemannstr. 36 53175 Bonn Tel.: 0228-2092-233 Fax: 0228-2092-222 www.aktion-mensch.de http://www.aktion-mensch.de Vereinsname: Deutsche Behindertenhilfe - Aktion Mensch e. V. Vereinssitz: Mainz Registergericht: AG Mainz, Vereinsregister VR 902, Vorstände: Armin von Buttlar und Martin Georgi Vorsitzender des Aufsichtsrats: Markus Schächter Der Inhalt dieser E-Mail (einschließlich etwaiger beigefügter Dateien) ist vertraulich und nur für den Empfänger bestimmt. Sollten Sie nicht der bestimmungsgemäße Empfänger sein, ist Ihnen jegliche Offenlegung, Vervielfältigung, Weitergabe oder Nutzung des Inhalts untersagt. Bitte informieren Sie in diesem Fall unverzüglich den Absender und löschen Sie die E-Mail (einschließlich etwaiger beigefügter Dateien) von Ihrem System. Vielen Dank. The contents of this e-mail (including any attachments) are confidential and may be legally privileged. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system. Thank you. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Antwort: Re: Microsoft PowerPoint 9.0 Object Library
Hi, see annotations below, Cheers, Armin Armin Nolte Database-Marketing Deutsche Behindertenhilfe - Aktion Mensch e.V. Heinemannstr. 36 53175 Bonn Tel.: 0228-2092-233 Fax: 0228-2092-222 www.aktion-mensch.de Justin Allegakoen Gesendet von: perl-win32-users-boun...@listserv.activestate.com 30.09.2009 02:11 An armin.no...@aktion-mensch.de Kopie perl-win32-users@listserv.activestate.com Thema Re: Microsoft PowerPoint 9.0 Object Library 2009/9/29 : > > Hi, > > I want to write > use Win32::OLE::Const 'Microsoft PowerPoint'; > instead of > use Win32::OLE::Const Microsoft PowerPoint 9.0 Object Library'; > > ... on one machine the first Notation works correctly on the other machine > not, I get > an error Message when Loading the TypeLib. Can anyone tell me what do > I have to do, so the first on works? > > Cheers > Armin That's worked for me in the past. What error message do you get? ### ... I got the message Win32::OLE(0.1704): GetOleTypeLibObject() Not a Win32::OLE::TypeLib object at C: /Perl/site/lib/Win32/OLE/Const.pm line 49. ### Perhaps a pointless reminder but the version numbers refer to the version of MS Office you're running on the machine. There's probably a better way to determine the Office version that a machine is running but I have used the following successfully: sub _DetermineExcelVersion { for ( 7 .. 15 ) { my $office_path = $Registry->{ "HKEY_LOCAL_MACHINE|Software|Microsoft|Office|$_.0|Excel|InstallRoot|Path" }; if ( defined $office_path and -e "$office_path/EXCEL.exe" ) { return $_; } } die "Excel not found on '$ENV{COMPUTERNAME}!'"; } ### this is a nice way but it doesn't help me in my Skript. Because I want to run the same skript on different machines. So actually on both machines is the Version 9.0 of the Object Library. But on the on machine it isn't necessary to specify the Version Number. I thought there would be a pointer/overall-class-name in the registry which is refering to the actuall/highest version of the installed library. And it would be nice if I could have the same installation on the other machine, So I would not have to care about which version installed. HTH, Just in ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs http://www.aktion-mensch.de Vereinsname: Deutsche Behindertenhilfe - Aktion Mensch e. V. Vereinssitz: Mainz Registergericht: AG Mainz, Vereinsregister VR 902, Vorstände: Armin von Buttlar und Martin Georgi Vorsitzender des Aufsichtsrats: Markus Schächter Der Inhalt dieser E-Mail (einschließlich etwaiger beigefügter Dateien) ist vertraulich und nur für den Empfänger bestimmt. Sollten Sie nicht der bestimmungsgemäße Empfänger sein, ist Ihnen jegliche Offenlegung, Vervielfältigung, Weitergabe oder Nutzung des Inhalts untersagt. Bitte informieren Sie in diesem Fall unverzüglich den Absender und löschen Sie die E-Mail (einschließlich etwaiger beigefügter Dateien) von Ihrem System. Vielen Dank. The contents of this e-mail (including any attachments) are confidential and may be legally privileged. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system. Thank you. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Win32::ODBC Question (Oracle)
Hi, I'm trying to get Information about a spezific table in an Oracle with the command 'describe table_name; ' This command works within SQL-PLus and other Tools but I get the error message: "Ora-00900: invalid SQL statement" when I use it within a perl-script using a Win32::ODBC connection. Does someone know a solution , maybe to use a DBD, DBI module or a different statement to get information about the table definition? Thanks for helping Armin ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
moving Excel Sheets via OLE
Hi , im trying do some VBA-Code like .. Sub moveSheet() Dim s, t As Worksheet Set s = ThisWorkbook.Sheets(1) Set t = ThisWorkbook.Sheets(2) s.Move After:=t End Sub so in Perl I tryed a lot of ways to specify the 'After' Argument but all of them failed. Can someone help me? Here are some of my efforts in perl (I want to use strict): my $sheet = $book->Sheets->Add(); # ok my $lastsheet = $book->Sheets($book->Sheets->count); # ok # Now the errors: #$sheet->move->{After}->$book->Sheets($book->Sheets->count); #Can't use string ("1") as a HASH ref while "strict refs" in use at Class/Excel.pm line 82 # $sheet->move->{After}= $lastsheet; # Gleicher Fehler #$sheet->move->after($lastsheet); #Can't call method "after" without a package or object reference at Class/Excel.pm line 86. #$sheet->move->After($lastsheet); #Can't call method "after" without a package or object reference #$sheet->move->{After}->$lastsheet; #Can't use string ("1") as a HASH ref while "strict refs" in use #$sheet->move(after => $lastsheet );#Die Move-Eigenschaft des Worksheet-Objektes kann nicht zugeordnet werden. #$sheet->Move(After => $lastsheet ); ##Die Move-Eigenschaft des Worksheet-Objektes kann nicht festgelegt werden $sheet->Move->(After => $lastsheet ); #Can't use string ("1") as a subroutine ref while "strict refs" in use ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Win32::OLE Microsoft Excel
Hi, I can't tell you why your construct doesn't work. But did you try to give a Range_Objekt instead of several Cells-Objekts? This is always faster! So try something like this: ... (assume $sheet to be a Excel-Sheet-Object)... my $range1 = $sheet->Range($sheet->Cells(1,1) , $sheet->Cells( 4 , 1 ) ); my $rangeaddress1 = $range1->Columns->{Address}; ... $chart->SeriesCollection(1)->XValues = $rangeaddress1; Hope this helps Armin - Weitergeleitet von Armin Nolte/Lotus am 25.08.2003 10:12 - "Pete Roberts" <[EMAIL PROTECTED]>An: [EMAIL PROTECTED] Gesendet von: Kopie: [EMAIL PROTECTED]Thema:Win32::OLE Microsoft Excel veState.com 20.08.2003 19:00 I thought I had this cracked.. but no. Does anyone have any idea at all at all why assigning array values to: $Chart->SeriesCollection(id)->XValues = [EMAIL PROTECTED] $Chart->SeriesCollection(id)->Values = [EMAIL PROTECTED] sometimes works and sometimes doesn't ? A workaround is to put the data into the spreadsheet and allow the chart to get it by assigning the strings: $Chart->SeriesCollection(id)->XValues = " ='Sheetname'!RstartCstart:RendCstart" ; $Chart->SeriesCollection(id)->Values = "='Sheetname'!RstartCend:RendCend" ; Here Excel painfully gets the data cell by cell and it takes ages. Thanks, Pete. ___ 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
OLE-PowerPoint: Adding a Graph
Hi, I'm trying to add a Graph in Powerpoint via OLE. But I can't find methods to add the Datas for the Graph. Does someone know this? Macro-Editior does not do anything. So I tryed the following: Adding the Graph is working:my $chart = $folie->Shapes->AddOLEObject({ Left =>120, Top =>150, Width =>480, Height =>320, ClassName =>"MSGraph.Chart"}); ->Then $chart is kind of 'PowerPointShape' With the following I can see the Data-Table behind the Graph: $chart->{OLEFormat}->{Activate}; But how can I work with it? Armin ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Win32::OLE Excel: TypeName
Hi, does soemone know how I can get the type of an Excel-Sheet via perl. I have to know whether a Sheet is a 'Chart' or a 'Worksheet'. In Visual Basic there is The 'TypeName'-Function. But I don't get this Function to call from my perl Cheers Armin ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Do's someone know who offers good perl-training in Germany?
Hi, I'm searching for advanced Perl-Training/Consulting on and individual Project in Germany. My project covers mainly OLE-Automation with MS-Office and MapInfo and it is written object-oriented. As I write on it for one year now, it is grown quite big and so I'm searching for help to optimize and maybe reengeneer it. Has someone a good address for me? cheers Armin Armin Nolte Database-Marketing Deutsche Behindertenhilfe - Aktion Mensch e.V. Heinemannstr. 36 53175 Bonn Tel.: 0228-2092-233 Fax: 0228-2092-222 www.aktion.mensch.de ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
ISDN-Datatransfer automation via Perl
Hi, I have a Windows PC with Fritz! Card and I want to automate the Datatransfer. Fritz!Card has no OLE-Interface, I was told, and I found no ISDN-Module on CPAN except of one for an '3Com OpenOffice LanModem' which I don't have. Does someone now a solution? Cheers Armin Armin Nolte Database-Marketing Deutsche Behindertenhilfe - Aktion Mensch e.V. Heinemannstr. 36 53175 Bonn Tel.: 0228-2092-233 Fax: 0228-2092-222 www.aktion.mensch.de ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs