autoexec_ok + start ???

This is a discussion on autoexec_ok + start ??? within the TCL forums in Programming Languages category; when i do the following proc proc complang {} { set url "http://groups.google.fr/group/comp.lang.tcl/topics" eval exec [auto_execok start][list $url] "&" } i open firefox and get comp.lang.tcl all right when i do the same to get fr.comp.lang.tc proc compfr {} { set url " http://groups.google.fr/group/fr.comp.lang.tcl/topics " eval exec [auto_execok start ][list $url] "&" } i get vista console ????? apparently both are the same and do not give the same result ?? maybe it is late and i did not see an obious mistake in coding. If so i apologize. If not thank you in advance for any advice jerome...

Go Back   Application Development Forum > Programming Languages > TCL

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 11-05-2008, 04:43 PM
groupeCompteRendu@gmail.com
Guest
 
Default autoexec_ok + start ???

when i do the following proc

proc complang {} {
set url "http://groups.google.fr/group/comp.lang.tcl/topics"
eval exec [auto_execok start][list $url] "&"
}

i open firefox and get comp.lang.tcl all right

when i do the same to get fr.comp.lang.tc

proc compfr {} {
set url " http://groups.google.fr/group/fr.comp.lang.tcl/topics "
eval exec [auto_execok start ][list $url] "&"
}

i get vista console ?????

apparently both are the same and do not give the same result ??

maybe it is late and i did not see an obious mistake in coding. If
so i apologize. If not thank you in advance for any advice
jerome
Reply With Quote
  #2  
Old 11-05-2008, 04:52 PM
Don Porter
Guest
 
Default Re: autoexec_ok + start ???

groupeCompteRendu@gmail.com wrote:
> when i do the following proc
>
> proc complang {} {
> set url "http://groups.google.fr/group/comp.lang.tcl/topics"
> eval exec [auto_execok start][list $url] "&"
> }
>
> i open firefox and get comp.lang.tcl all right
>
> when i do the same to get fr.comp.lang.tc
>
> proc compfr {} {
> set url " http://groups.google.fr/group/fr.comp.lang.tcl/topics "
> eval exec [auto_execok start ][list $url] "&"
> }
>
> i get vista console ?????


Why do you have a leading and trailing space in your second example?

--
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter@nist.gov Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|_________________________________________________ _____________________|
Reply With Quote
  #3  
Old 11-05-2008, 05:43 PM
Mark Janssen
Guest
 
Default Re: autoexec_ok + start ???

On Nov 5, 10:43*pm, groupeCompteRe...@gmail.com wrote:
> when i do the following proc
>
> proc complang {} {
> set url *"http://groups.google.fr/group/comp.lang.tcl/topics"
> *eval exec [auto_execok start][list $url] "&"
>
> }
>
> i open firefox and get comp.lang.tcl all right
>
> when i do the same to get fr.comp.lang.tc
>
> proc compfr {} {
> set url *"http://groups.google.fr/group/fr.comp.lang.tcl/topics"
> *eval exec [auto_execok start *][list $url] "&"
>
> }
>
> i get vista console ?????
>
> apparently both are the same and do not give the same result ??
>
> maybe it is late and i did not see an obious mistake in coding. *If
> so i apologize. *If not thank you in advance for any advice
> jerome


Start is a bit peculiar when encountering arguments with spaces, it
will then interpret it as a window title. The 'correct' way to call
start is almost always:

eval exec [auto_execok start] ""[list $url] "&"

or in 8.5:

exec {*}[auto_execok start] "" $url &

But even this will fail when $url contains for instance ampersands.

See http://wiki.tcl.tk/start for more details and for a really robust
way to start a process on win32 (using TWAPI)

Mark
Reply With Quote
  #4  
Old 11-06-2008, 04:48 PM
groupeCompteRendu@gmail.com
Guest
 
Default Re: autoexec_ok + start ???

On 5 nov, 22:52, Don Porter <d...@nist.gov> wrote:
> groupeCompteRe...@gmail.com wrote:
> > when i do the following proc

>
> > proc complang {} {
> > set url *"http://groups.google.fr/group/comp.lang.tcl/topics"
> > *eval exec [auto_execok start][list $url] "&"
> > }

>
> > i open firefox and get comp.lang.tcl all right

>
> > when i do the same to get fr.comp.lang.tc

>
> > proc compfr {} {
> > set url *"http://groups.google.fr/group/fr.comp.lang.tcl/topics"
> > *eval exec [auto_execok start *][list $url] "&"
> > }

>
> > i get vista console ?????

>
> Why do you have a leading and trailing space in your second example?
>
> --
> | Don Porter * * * * *Mathematical and Computational Sciences Division |
> | donald.por...@nist.gov * * * * * * Information Technology Laboratory |
> |http://math.nist.gov/~DPorter/* * * * * * * * * * * * * * * * *NIST |
> |_________________________________________________ _____________________|


Hello
thanks to you and Mark for helping and now it works.
friendly
jerome
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 04:39 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.