OLE: preventing IE windows from being grabbed by popups

2003-04-04 Thread Thomas Drugeon



Hello,

I am controlling an IE windows with OLE, but 
surfing on the web in the same time cause this windows to be grabbed on every 
popup window.
Is their a solution to prevent my IE windows from 
being kidnapped like this?

Thanks,
Thomas


Re: re-executing a program

2003-02-18 Thread Thomas Drugeon
You can also use the start DOS command:

system(START  \Re-executing...\ $0 $arguments);
exit;

you could then indicate the the current state of your program in args (or in
a file) for the new one to resume its execution.

Thomas

- Original Message -
From: Dax T. Games [EMAIL PROTECTED]
To: Perl Users [EMAIL PROTECTED]
Sent: Tuesday, February 18, 2003 4:04 PM
Subject: Re: re-executing a program


 That works on Windows and is very useful in certain situations.   Why
isn't
 it documented anywhere?  What are the drawbacks/side effects?

 I was writing a script last week that needed to launch 2 Windows
executable
 then exit.  I couldn't use system() or exec() for various reasons.

 I tried using fork() but got unpredictable results.  Unless you know
another
 way to do it.

 I resorted to using the 'start.exe' that comes with 2000 to achieve the
same
 effect as system(1,'command line').  It works but I don't like relying on
 outside means if it is possible in Perl.

 Dax
 - Original Message -
 From: Jan Dubois [EMAIL PROTECTED]
 To: Dax T. Games [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, February 17, 2003 11:44 PM
 Subject: Re: re-executing a program


  On Mon, 17 Feb 2003 22:04:43 -0500, Dax T. Games [EMAIL PROTECTED]
  wrote:
 
  Simple.
  
  Create a new script with the following contents:
  
  exec(\c:\\program files\\internet explorer\\iexplore.exe\);
  
  Compile with -gui.
  
  exec pops up a command window when launched that stays open till IE is
  closed.
 
  Ah, I see.  It is only a problem for GUI programs.  Note that wperl has
  the same problem as a perlappified --gui application, so I consider the
  behavior of PerlApp to be correct.
 
  If you don't tell anyone, I can show you a gross hack to make it work:
 
system(1, 'c:\program files\internet explorer\iexplore.exe');
exit;
 
  The 1 must be a number, not a string!  It will tell system() to invoke
the
  command asynchronously and not to wait.  It still inherits file handles,
  which may or may not be what you want.
 
  I'm too lazy right now to check if this would work on Unix too, but I
  doubt it.  This hack was added to Perl ages ago for OS/2 use, and the
  Windows port supports it too.
 
  Cheers,
  -Jan
 
  ___
  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

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



Re: Preventing IE close

2002-11-28 Thread Thomas Drugeon



You can catch the "close" event, and then reopen 
IE:
Try something like this (you can also use the 
EventLoop but I didn't managed to make it work) :

my $Quit = 0;
use Win32::OLE qw(EVENTS);

$IE = 
Win32::OLE-new("InternetExplorer.Application.1") or die "Impossible de creer 
l'OLE InternetExplorer";$IE-Navigate("http://".$adresse);$IE-{'Visible'} = 
1;Win32::OLE-WithEvents( $IE, \Event, 'DWebBrowserEvents' 
);$Quit = 0;
for(;;) {
 $adresse = 
$IE-{LocationURL};
 # Do what you want (you would 
better add a pause like select(undef,undef,undef,0.001) to prevent any CPU 
overload) 
Win32::OLE-SpinMessageLoop;}

sub Event { my ( 
$Obj,$Event,@Args ) = @_; #print "Event triggered: 
'$Event'\n";if ($Event eq 
"Quit") {
 
  $IE = 
Win32::OLE-new("InternetExplorer.Application.1") or die "Impossible de creer 
l'OLE InternetExplorer";  
 $IE-Navigate("http://".$adresse); 
  $IE-{'Visible'} = 1;
  
}}

  - Original Message - 
  From: 
  Steve 
  To: [EMAIL PROTECTED] 
  
  Sent: Wednesday, November 27, 2002 8:18 
  PM
  Subject: Preventing IE close
  
  I am using Win32::OLE to display some analysis 
  results in an Internet Explorer window. I want to have the same window 
  available for display of different results, so I want the user to be able to 
  minimize it but not close the window.Is there a way I can eliminate the 
  close button, or maybe trap the event it generates and make that event 
  minimize the window instead? 
  
  Steve


Re: Preventing IE close

2002-11-28 Thread Thomas Drugeon



sorry, I realised there wwas lots of mistakes in my 
code
I just c/p it from one of my code, modifing it on 
the fly...

use Win32::OLE qw(EVENTS);
# don't forget the qw(EVENTS) !


my $url= "" 
href="">http://www.perl.com/;


my $IE = 
OpenBrowser($url);
for(;;) {
 $url= "" # 
update current url
 # Do what you want (you would 
better add a pause like select(undef,undef,undef,0.001) to prevent any CPU 
overload) 
Win32::OLE-SpinMessageLoop;}

sub Event { my ( 
$Obj,$Event,@Args ) = @_; #print "Event triggered: 
'$Event'\n";if ($Event eq 
"Quit") {
$IE = 
OpenBrowser($url);
 
}}

sub OpenBrowser {
 my $url = "">
 my $IE = 
Win32::OLE-new("InternetExplorer.Application.1") or die "Error: 
$!"; $IE-Navigate($url); 
$IE-{'Visible'} = 1;

 Win32::OLE-WithEvents( $IE, 
\Event, 'DWebBrowserEvents' );
  # I use the 'DWebBrowserEvents' 
interface but I think other interface may be used, with the OnQuit event instead 
of Quit...
 
 return $IE;
}

  - Original Message - 
  From: 
  Thomas Drugeon 
  
  To: Steve ; [EMAIL PROTECTED] 
  
  Sent: Thursday, November 28, 2002 9:19 
  AM
  Subject: Re: Preventing IE close
  
  You can catch the "close" event, and then reopen 
  IE:
  Try something like this (you can also use the 
  EventLoop but I didn't managed to make it work) :
  
  my $Quit = 0;
  use Win32::OLE qw(EVENTS);
  
  $IE = 
  Win32::OLE-new("InternetExplorer.Application.1") or die "Impossible de 
  creer l'OLE InternetExplorer";$IE-Navigate("http://".$adresse);$IE-{'Visible'} = 
  1;Win32::OLE-WithEvents( $IE, \Event, 
  'DWebBrowserEvents' );$Quit = 
  0;
  for(;;) {
   $adresse = 
  $IE-{LocationURL};
   # Do what you want (you would 
  better add a pause like select(undef,undef,undef,0.001) to prevent any CPU 
  overload) 
  Win32::OLE-SpinMessageLoop;}
  
  sub Event { my ( 
  $Obj,$Event,@Args ) = @_; #print "Event triggered: 
  '$Event'\n";if ($Event eq 
  "Quit") {
   
   $IE = 
  Win32::OLE-new("InternetExplorer.Application.1") or die "Impossible de 
  creer l'OLE InternetExplorer"; 
$IE-Navigate("http://".$adresse); 
$IE-{'Visible'} = 1;
   
  }}
  
- Original Message - 
From: 
Steve 
To: [EMAIL PROTECTED] 

Sent: Wednesday, November 27, 2002 8:18 
PM
Subject: Preventing IE close

I am using Win32::OLE to display some analysis 
results in an Internet Explorer window. I want to have the same window 
available for display of different results, so I want the user to be able to 
minimize it but not close the window.Is there a way I can eliminate 
the close button, or maybe trap the event it generates and make that event 
minimize the window instead? 

Steve


Mixing Tk and Win32 GUI ?

2002-11-28 Thread Thomas Drugeon
Is this possible to mix Tk and Win32 windows in a same project?
(I tried once to have a win32 dialogue box to open over a Tk windows, but
the tk windows did not redraw when I mouved the win32 box!!)

In fact I would lik to use activeX controls, like providd with
Win32::GUI::AxWindow, in my Tk application (having the activeX integreted in
a Tk widget would be a must!)

Do you know how this could be done?

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



Converting HTML to PDF, acrobat ?

2002-11-14 Thread Thomas Drugeon
Hi!

I want to copy web pages in an automated process. I am able to do this
unsing LWP, storing each element of a page in a different file (HTML, GIF,
etc.).
The problem is that I want to store all these in PDF. I have been looking
for HTML2PDF softs on the web, but none of them seems to do the job
properly (or did I miss one of them?).
Acrobat 5 seems to be really powefull for converting online web pages, or
even web sites, to a PDF document. Do you know any way of controlling this
(OLE? commande line?) from Perl?

thanks,
Thomas

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



Implementing a queue, memory

2002-10-31 Thread Thomas Drugeon
hello,

I am implementing a queue, using shift and push to put and remove elements
from an array.
The problem is that I don't know how Perl will manage the memory.
Do you have experiences on such arrays after a big number of shift/push?
Will Perl reallocate former used memory (relased from the shift) to next
elements (from the push)?
Don't you think it could lead to some memory leaks after some time?
Do you think using pop/unshift in stead of shift/push would make any
difference ?

Thank you in advance.
Thomas

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



Re: Implementing a queue, memory

2002-10-31 Thread Thomas Drugeon
Thank you

Do you know any module implementig such queues in a file? like dmb tied
hashes do?

 IIRC perl is optimized for that scenario (I can't remember where I read it
 though). It shouldn't be a problem.


 /J


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



Re: Implementing a queue, memory

2002-10-31 Thread Thomas Drugeon
Sorry, I found it:

Tie::File


- Original Message -
From: Thomas Drugeon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 31, 2002 4:34 PM
Subject: Re: Implementing a queue, memory


 Thank you

 Do you know any module implementig such queues in a file? like dmb tied
 hashes do?

  IIRC perl is optimized for that scenario (I can't remember where I read
it
  though). It shouldn't be a problem.
 
 
  /J


 ___
 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 : RE : Memory consumption

2002-10-30 Thread Thomas Drugeon


Witch version of ActivePerl do you have (I have the 5.6 633)?
What results do you get exactly (time for the loop, memory consumption
at its end, result of the undef) ?

thanks
 
 maybe it's your configuration, your environnment is
 not good, we have old pc than yours and it's ok
 
  --- Thomas Drugeon [EMAIL PROTECTED] a écrit :   I
 ran this script on a PII 350, 128mo, with both
  activePerl and
  Siemens
   the loop takes about 2minutes to completes (!),
  eating up to 10mo at
  its
   end (witch is normal), and memory is released with
  the undef.
 
  By 10mo, I meant 10M !
  I'm sorry, this is a french habit (octet in stead of
  byte)
 
  Thomas
 
  ___
  Perl-Win32-Users mailing list
  [EMAIL PROTECTED]
  To unsubscribe:
 http://listserv.ActiveState.com/mailman/mysubs
 
 ___
 Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
 Yahoo! Mail : http://fr.mail.yahoo.com
 ___
 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