Xshell Forum

I got error when I ran scrpit in Xshell4

Last post: Tuesday, May 31, 2011 1:15 AM by Support, 16 reply

 
Tuesday, May 17, 2011 7:02 AM - jason

I got error when I ran scrpit in Xshell4

 
I ran the sample script as show in manual by changing the ip address, username and password.
I got error messge "Error: 80029c4a, LoadTypeLib" in a small popup window.
What should I do to get scripting work?
Thanks a lot!

Program Ver. : Xshell 4
Tuesday, May 17, 2011 11:48 PM - Support

Re: I got error when I ran scrpit in Xshell4

 
This error may occur when the Xshell.tlb file is not in the same directory with Xshell.exe. Put both of them in the same folder and try again.

Let me know if the problem persists.


---
Technical Support
Wednesday, May 18, 2011 5:06 AM - jason

Re: I got error when I ran scrpit in Xshell4

 
I can not find out Xshell.tlb both in the installed directory and home directory.
Where is it?
Thanks.
Wednesday, May 18, 2011 6:55 PM - Support

Re: I got error when I ran scrpit in Xshell4

 
The Xshell.tlb file should be installed in the installed folder (same directory with Xshell.exe). This file might have been deleted for some reason. Could you try reinstalling the software?


---
Technical Support
Wednesday, May 18, 2011 7:42 PM - jason

Re: I got error when I ran scrpit in Xshell4

 
I have reinstalled the software,
but I still can not find Xshell.tlb in the installed directory.
The installer did not show any error while installing Xshell4.
What's wrong?
Thanks.
Wednesday, May 18, 2011 8:19 PM - Support

Re: I got error when I ran scrpit in Xshell4

 
I am sorry for the inconvenience. I found out that the Xshell.tlb file is missing in the Xshell standard install package. We will fix this in the next release.

Meanwhile, here is the Xshell.tlb file. Please add put this file in the same directory with Xshell.exe.

---
Technical Support
Attachment Xshell.tlb (4.1 KB)  
Wednesday, May 18, 2011 10:13 PM - jason

Re: I got error when I ran scrpit in Xshell4

 
Thank you!
I can run script now.
But I found the scripting is a bit unnormal.
The attachment is my test script.
Here are my test step:
First, open a serial session,
Second, run the script.
But the script is blocked at line 28, while the screen outputs these:
TFTP from server 10.11.52.25; our IP address is 10.11.240.89; sending through gateway 10.11.240.1
Filename 'uImage'.
Load address: 0x81000000
Loading: T ###########################################################################################################################################################################################################################################################################################################################################################################################################################################
done
Bytes transferred = 2189864 (216a28 hex)
TI8168_EVM#
The "done" is there, but the script couldn't catch it.
Is there something wrong in my script?
Thanks.
Thursday, May 19, 2011 1:37 AM - howard

Re: I got error when I ran scrpit in Xshell4

 
I run script, report error alse.

my script content:

Sub Main
xsh.Screen.Send "su -"
End Sub
Thursday, May 19, 2011 2:04 AM - Support

Re: I got error when I ran scrpit in Xshell4

 
Howard,

Have you tried the following solution?

Xshell Forum : Error running script in Xshell 4 Error 80029c4a, LoadTypeLib


---
Technical Support
Thursday, May 19, 2011 2:07 AM - howard

Re: I got error when I ran scrpit in Xshell4

 
i compare jason‘s test_script.vbs with mine,i found my vbs file encode by utf8.
utf8 files can't run?
i have downloaded your Xshell.tlb.
Thursday, May 19, 2011 7:31 PM - Support

Re: I got error when I ran scrpit in Xshell4

 
There is a bug in processing script files encoded in UTF8 format. We will look into this problem. Thank you for your patience.


---
Technical Support
Thursday, May 19, 2011 10:45 PM - Support

Re: I got error when I ran scrpit in Xshell4

 
Jason,

Try putting the following line before "xsh.Screen.Send "set ethaddr 7C:8E:E4:F7:2B:76"

xsh.Screen.Synchronous = true


Also, update was released today to fix missing Xshell.tlb file.


---
Technical Support
Sunday, May 22, 2011 5:49 PM - jason

Re: I got error when I ran scrpit in Xshell4

 
I had added "xsh.Screen.Synchronous = true",
but I got the same result. :-(
Tuesday, May 24, 2011 12:09 AM - maestoso

Re: I got error when I ran scrpit in Xshell4

 
Jason, I find these functions in manual;
void WaitForString(LPCTSTR lpszString),
Long WaitForStrings(VARIANT FAR* strArray, long nTimeout)

It could help your problem, I think.

xsh.Screen.WaitForString "done"
->
Dim result
result = xsh.Screen.WaitForStrings("done", 10000)
Tuesday, May 24, 2011 5:31 PM - maestoso

Re: I got error when I ran scrpit in Xshell4

 
oh, I had a mistake for using the function. The follow script will be correct;

Dim waitStrs
waitStrs = Array(Chr(10), "done")
Dim result
result = xsh.Screen.WaitForStrings(waitStrs, 10000)

Thursday, May 26, 2011 6:36 AM - jason

Re: I got error when I ran scrpit in Xshell4

 
Hi, maestoso. Thanks for you suggestion.
But it does not work for me.
I think there are some bug in scripting function.
I also found that if the script hasn't been finished,
close Xshell4 will cause a error.
Tuesday, May 31, 2011 1:15 AM - Support

Re: I got error when I ran scrpit in Xshell4

 
UTF-8, Big Endian, Unicode support is added in Xshell 4 build 0091. Use the Help > Check for updates feature to update your Xshell copy.


@Jason: We are looking in to this problem. We will get back to you in the next few days.


---
Technical Support