Jump to content
Sign in to follow this  
Guest

TCL script with http under Hypermesh

Recommended Posts

Guest

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

Share this post


Link to post
Share on other sites
Guest

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.

Share this post


Link to post
Share on other sites

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


Share this post


Link to post
Share on other sites
On 4/4/2020 at 4:49 PM, HRISHIKESH 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

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...