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)
(hw13) 1 % source C:/Users/MYNAME/test.tcl
couldn't open socket: invalid argument
========================================
I don't know why this script does not work under Hypermesh.
Any idea for help ?
Thanks,
UPDATE: it works well when I try command line within cmd window:
'C:\Program Files\Altair\13.0\hw\tcl\tcl8.5.9\win64\bin\tclsh85.exe' test.tcl
Find more posts tagged with
Sort by:
1 - 8 of
81
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.
Hi Mr Quy
I try with hm12 and it worked