This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
StaleJoke
Voice
Posts: 10 Joined: Tue Nov 29, 2005 8:04 pm
Post
by StaleJoke » Thu Dec 29, 2005 2:06 pm
I searched already, didnt find so posting
I need to know how can i make one bot startup another one which is in a different directory.
Please dont tell me to use contrab because i do not want the contrab to check it every some minutes and then start. I want to start another bot only as a result of some specific action.
I have tried this,
Code: Select all
catch {exec /home/otherbot/scripts/botchk >/dev/null 2>&1}
It does not work.
Any suggestions ?
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Dec 29, 2005 7:41 pm
Try encolse the command within quotes "".
StaleJoke
Voice
Posts: 10 Joined: Tue Nov 29, 2005 8:04 pm
Post
by StaleJoke » Thu Dec 29, 2005 10:13 pm
This way ?
Code: Select all
proc sother {} {
catch {exec "./home/otherbot/scripts/botchk >/dev/null 2>&1"}
}
Does not work.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Dec 29, 2005 10:28 pm
The first '.' (dot) after the quote is for? I only said quotes.
StaleJoke
Voice
Posts: 10 Joined: Tue Nov 29, 2005 8:04 pm
Post
by StaleJoke » Thu Dec 29, 2005 10:30 pm
With or without the '.' Either ways it does not work.
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Fri Dec 30, 2005 1:18 am
[exec] is not your Unix shell, it doesn't support redirection in the form of 2>&1 (it supports redir, but its syntax/semantics is a bit different)
so either try without it, or exec bash and pass the command with redir to it
connection, sharing, dcc problems? click
<here>
before asking for scripting help, read
<this>
use
StaleJoke
Voice
Posts: 10 Joined: Tue Nov 29, 2005 8:04 pm
Post
by StaleJoke » Fri Dec 30, 2005 8:43 pm
You lost me there.
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Fri Dec 30, 2005 11:47 pm
if [exec] is rocket science to you, give up on it and try something easier
I wonder what exactly is it that you didn't understand
connection, sharing, dcc problems? click
<here>
before asking for scripting help, read
<this>
use
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Sat Dec 31, 2005 5:47 am
Why don't you just create a
shell script and call it via exec as demond sugested?
Once the game is over, the king and the pawn go back in the same box.