In comp.sys.mac.system Greg Shenaut <> wrote:
> I'm trying to make a Tk script on OS/X, and I've noticed that when I
> start the script from a terminal window, it starts up but its windows all
> stay behind the terminal window unless you click on them.
> I decided to add the lines
> catch {exec osascript -e {tell app "Wish Shell" to activate} &}
> sleep 2000
> where "sleep" is a delay using vwait.
> This works, but it seems pretty kludgy. Is there a more reasonable
> way to do this?
> TIA
> Greg Shenaut
> PS If I start the Tk script from an xterm window, it starts in front
> even without the "activate" command.
Would you please send me your program (or stripped down version of said) and
any invoking script? I cannot seem to reproduce your problem .... then maybe
I can be of assistance.
Steve
--
@_=map{eval"100${_}"}split/!/,'/5!*2!+$]!/10+$]';use Tk;$m=tkinit;$t='just an'.
'other perl hacker';$z='createText';$c=$m->Canvas(-wi,$_[1],-he,25)->grid;$c->$
z(@_[2,3],-te,$t,-fi,'gray50');$c->$z($_[2]-$],$_[3]-$],-te,$t);$m->bind('<En'.
'ter>',sub{$y=int(rand($m->screenheight));$m->geometry("+$y+$y")});MainLoop;