TCL script with http under Hypermesh
Hi,
I have a simple script :
package require http;
set myurl 'http://mysite/file.txt';
proc getPage { url } {
set token [::http::geturl $url]
set data [::http::data $token]
::http::cleanup $token
return $data
}
set file [ getPage $myurl ]
puts '$file'
With TCL 8.5 under Windows 7, I can run this script without problem.
But when I try to run under Hypermesh session (via : source ....) I got error message :
========================================
Main console display active (Tcl8.5.9 / Tk8.5.9)
'C:\Program Files\Altair\13.0\hw\tcl\tcl8.5.9\win64\bin\tclsh85.exe' test.tcl
Answers
-
Hi Mr Quy
I try with hm12 and it worked
0 -
Altair Forum User said:
Hi Mr Quy
I try with hm12 and it worked
Really? I have removed HM12 some month ago.
I'm waiting for release 14 now.
0 -
I tried it both in 12 and 13 and neither of them works for me... same error in 12.
Also tried it with adminstator rights... no success. But I still think its some permisson error....
Best regards,
Merula
0 -
WORKAROUND: the same task is written by Perl. From TCL, use 'exec ...'.
0 -
Hello I'm getting this error stating 'Main console display active (Tcl8.5.9 / Tk8.5.9)
(Documents) 1 % '0 -
Altair Forum User said:
Hello I'm getting this error stating 'Main console display active (Tcl8.5.9 / Tk8.5.9)
(Documents) 1 % 'It is not error message. It is headlines of tkconsole
0 -
Altair Forum User said:
Hello I'm getting this error stating 'Main console display active (Tcl8.5.9 / Tk8.5.9)
(Documents) 1 % 'It is not error message. It is headlines of tkconsole
0 -
We've had luck with the Windows 'start' command to load Word files and URLs from within the HyperMesh TCL environment. If you are still facing the issue, you can try something similar to:
exec cmd /c start "https://altair.com"
Hopefully letting Windows handle opening the page will work better.
0