note 34635 rejected from class.com by didou

From: Date: Sat, 02 Aug 2003 12:27:53 +0000
Subject: note 34635 rejected from class.com by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-53196@lists.php.net to get a copy of this message
Note Submitter: alexs81@libero.it ---- Little but also unuseful example to use COM in real world this little example works... I was searching how to made a printing function of TXT files but notepad hasn't a COM connection <? $browser = new COM("internetexplorer.application"); //COM commection with IE (always present in windows) $browser->Navigate("c:\\php\\prova.txt");//Open a file (even a TXT) while ($browser->ReadyState!=4);//Waiting for the browser to finish rendering the DOC // trying to hide IE Icon and Window $browser->Width=0; $browser->Height=0; $browser->resizable=false; // Printing... $browser->ExecWB(6,2,null,null); $browser->Visible = false; sleep(1); //if I don't wait a sec IE tells me I've made sometihng wrong, i wiat a sec all right... another Xfiles of IE or someone knows why ??? $browser->quit(); //quitting and freeing memory... maybe useful... ?> Notice that COM Funciton can be called directly and arguments can be passed as a local function I tried com_invoke.... but no way to make it works

« previous php.notes (#53196) next »