Re: Launching Tkcon with a main script and another as arguments



First, try updating to the latest in CVS (you can do this via tkcon's
Help -> Retrieve Latest Version if it is relatively recent).

Then do:

wish tkcon.tcl mainScript.tcl -- configScript.tcl

I think there was a bug in the -- handling previously that I've
corrected. Let me know whether it works or not.

Jeff

Hi Jeff,

From the help of my current tkcon I can see that I have v2.4, CVS
v1.98. I tried 'Retrieve Latest Version' but got the error message
"Failed to retrieve latest tkcon source: expected http return code
200, received 403".

I therefore performed
tkcon master set ::tkcon:PRIV(proxy) wwwproxy:8080
and tried again, but still the same error message.

I decided to go direct to http://tkcon.sourceforge.net/ and downloaded
tkcon from there. I now have v2.5, CVS v1.101.

I ran the script again (with fingers crossed) but still,
mainScript.tcl is complaining that is does have any arguments :-(. I
have written the following very simple script to test this;
mainScript.tcl:
if {[llength $argv] == 0} {
puts "ERROR, no argument provided"
update
after 5000
exit
} else {
puts "SUCCESS: Argument \"[lindex $argv 0]\" provided"
update
source [lindex $argv 0]
puts "Constant1 = $CONSTANT1" ;# CONSTANT1 is only defined in the
sourced file
update
after 5000
exit
}

I then launched this from the wish console as follows
exec wish "D:/Tcl/bin/tkcon.tcl" "mainScript.tcl" --
"configScript.tcl"

But it runs as expected if I type the following in to Windows command
prompt
wish "D:/Tcl/bin/tkcon.tcl" "mainScript.tcl" "configScript.tcl"

Incidentally, I have noticed that I have to change directory to where
my scripts are and then run the exec command because tkcon complains
that no such file or directory exists if I type the following
(specifing the full path).
exec wish "D:/Tcl/bin/tkcon.tcl" "H:/Tone/My Documents/TCL/
tkcon_scripts/mainScript.tcl" -- "H:/Tone/My Documents/TCL/
tkcon_scripts/configScript.tcl"

Am I doing something wrong?

As always, guidance and pointers are most welcome.
Regards

Tony

.



Relevant Pages

  • Re: Memory output format
    ... And you need to set strDescription to a blank ... All values must be retrieved in the "Do Until" loop, ... I am using your script in the middle of a script pulling wmi info from ... The error is raised when the program attempts to retrieve the value of the ...
    (microsoft.public.scripting.wsh)
  • Re: Memory output format
    ... And you need to set strDescription to a blank ... All values must be retrieved in the "Do Until" loop, ... I am using your script in the middle of a script pulling wmi info from ... The error is raised when the program attempts to retrieve the value of the ...
    (microsoft.public.scripting.wsh)
  • Re: Force password Expiration to 5 days
    ... Then when the day arrives you can run a script or program that either: ... Expires everyones password, ... I have a VBScript program that converts ... A filter to retrieve all users that have not change their password since ...
    (microsoft.public.windows.server.scripting)
  • Re: Memory output format
    ... The error is raised when the program attempts to retrieve the value of the ... sAMAccountName attribute, but that attribute is not listed in the query as ... I'm having another issue with my script. ... FormatNumber strTotalPhysicalMemory ...
    (microsoft.public.scripting.wsh)
  • Re: Getting computer in AD domain
    ... which cannot be used in a script. ... in VBScript to retrieve information from AD. See this link: ... You can retrieve any attribute values desired. ... Not sure how to use this, as I don't use VBScript ...
    (microsoft.public.scripting.vbscript)