Sorry, > if ($d && trim(`dcop $d Quanta focus`) == 'true' ){ does not work all the time > if ($d && trim(`dcop $d Quanta isActiveWindow`) == 'true' ){ does work just fine - so far. Sasha On October 10, 2005 04:36 pm, Sasha Andric wrote: > Some of my php files are automatically encoded when they are saved. These > actions are scripted in php. Someone might find this useful. > > // this will find currently active/focused instance of quanta > $dcopid = ''; > $dcopids = trim(`dcop | grep quanta`); > $dcopids = explode ("\n" , $dcopids) ; > foreach ($dcopids as $d ) { > $d = trim($d); > if ($d && trim(`dcop $d Quanta focus`) == 'true' ){ > $dcopid = $d ; > break; > } > } > > // this is how to print error message so it returns to quanta > // and pop up messages dock > if ($err) { > $fp = fopen("php://stderr", "w"); > if ($fp) { > fputs($fp, "$err\n"); > fclose($fp); > } > exit (1); > } > _______________________________________________ > Quanta mailing list > Quanta@mail.kde.org > https://mail.kde.org/mailman/listinfo/quanta _______________________________________________ Quanta mailing list Quanta@mail.kde.org https://mail.kde.org/mailman/listinfo/quanta