From: Guillem C. W. <vac...@es...> - 2002-04-22 15:00:22
|
I include this simple program because I want to download some web pages = without losing the user interaction. How I have to change this code in = order to avoid the error in the second click ? If someone have some example for doing this I will be very very happy ! ##Interf=EDcie gr=E0fica pel Parsev70b ##AUTOR: Guillem Cunillera i Wefers use Win32::GUI; use Win32::API; use LWP::UserAgent;=20 use LWP::Simple; use URI::https; use LWP::Protocol::https; my $w_tutor =3D Win32::GUI::Window->new ( -top =3D> 0, -left =3D> 0, -width =3D> 600,=20 -height =3D> 600, -minsize =3D> 600,600 -text =3D> "Tutor",=20 -name =3D> "e_w_tutor",); my $download =3D $w_tutor->AddButton( -text =3D> "OBTENIR DADES", # Text al bot=F3 -left =3D> 400, -top =3D> 160, -height =3D> 25, -name =3D> "download", ); sub download_Click { =20 $download->Disable(); =20 if ($ere=3Dfork() ) { =20 print "A\n";=20 }=20 else=20 { =20 print "B \n"; $download->Enable(); exit(0); =20 } =20 print "acabo click \n"; return 1; =20 } =20 # --------------------------- sub e_w_tutor_Terminate { # -------------------------- $w_tutor->Hide(); =20 print "adeu! \n"; return -1; } $w_tutor->Show (); Win32::GUI::Dialog(); # Inici d'execucio gr=E0fica |