about ReceiveFile method... - WeOnlyDo Discussion board

about ReceiveFile method... (General questions)

by ondalx, Monday, May 16, 2005, 03:32 (7130 days ago)

Hi
WinXP, wodTelnetDLX v2.1.4.12

first of all, sorry I'm not good at english ^^;

I would like to receive a file to c: emp from on the server.
but, the following codes are doesn't work.
ccc2.txt file saved on desktop directory. I wanna save a file to c: emp directory.
What's the reason ?

<script LANGUAGE= VBScript > <!--
Sub doReceive_OnClick
telnetdlx.Send sz /home/test/ccc2.txt & vbLf
telnetdlx.ReceiveFile 0, c: empccc2.txt , 0
End Sub
-->
</script>

and...

as you know the following method is the prototype of ReceiveFile.
ReceiveFile(Portocol, [Filename], [ShowWindow])

I would like to invisible transfer window when i receiving a file from on the server.
How can i do that ?

Thanks in advance.
Darren.

Re: about ReceiveFile method...

by wodSupport, Monday, May 16, 2005, 03:36 (7130 days ago) @ ondalx

Darren,

why it doesn't work? What happens? Does Progress event fire at all?

Can you send full VBS script to techsupport@weonlydo.com?

Re: about ReceiveFile method...

by ondalx, Monday, May 16, 2005, 07:08 (7130 days ago) @ wodSupport

Hi
I sent a HTML file to techsupport@weonlydo.com.
Check it out ..please..
Thanks.
--------------------

<html>

<body>
<object classid= clsid:5220cb21-c88d-11cf-b347-00aa00a28331 width= 0 height= 0 viewastext>
<param name= LPKPath value= wodTelnetDLX.lpk >
</object>

<object name= telnetdlx classid= clsid:B7039D87-D648-4431-BA87-C3A04E6111DA codebase= wodTelnetDLX.cab#version=1.0.0.2 width=0 height=0>
</object>

<form name= myform >

Current TelnetDLX ActiveX Control Version (read-only):<br>
<input name= version type= text size= 80 readonly><br><br>

Current Connection Status (read-only):<br>
<input name= status type= text size= 80 readonly><br><br>

Hostname or IP:<br>
<input name= host type= text size= 80 ><br><br>

User ID, Password:<br>
<input name= userid type= text >
<input name= password type= password ><br><br>

Protocol, Port:<br>
<select name= protocol size= 1 >
<option>Raw</option>
<option selected>Telnet</option>
<option>Secure Shell (SSH) 1.5</option>
<option>Secure Shell (SSH) 2</option>
<option>Auto-negotiated Secure Shell (SSH)</option>
<option>SSL/TLS</option>
<option>Telnet negotiated SSL/TLS</option>
</select>
<input name= port type= text value= 23 size= 5 > (use 23 for Telnet, 22 for SSH)<br><br>

<input type= button value= Connect/disconnect! onclick= doConnect(); >
<input type= button value= Receive name= doReceive id= doReceive >
</form>

</body>

<script language= javascript >

with (telnetdlx) {
TerminalEmulation = 1; // use VT100 Emulation
AutoSize = true; // resize to fit
telnetdlx.BorderVisible = 1;
document.myform.version.value = telnetdlx.Version;
//telnetdlx.Columns = 2;
//telnetdlx.Rows = 2;
telnetdlx.ScrollBars = 0;
telnetdlx.Blocking = true
}

function doConnect () {
telnetdlx.Blocking = true;
//telnetdlx.Timeout = 0;
with (document.myform) {
if (telnetdlx.State == 0) { // connect!
telnetdlx.Login = userid.value;
telnetdlx.Password = password.value;
port.value = 23; //ssh2:22, telnet:23
protocol.selectedIndex = 1; //telnet:1, ssh2:3
telnetdlx.Connect (host.value, port.value, protocol.selectedIndex);
} else { // disconnect!
telnetdlx.Disconnect ();
}
}
}

</script>

<script for= telnetdlx event= statechange() language= JavaScript >
document.myform.status.value = telnetdlx.StateText (telnetdlx.State);
</script>

<script LANGUAGE= VBScript > <!--
Sub doReceive_OnClick
telnetdlx.Blocking = true
telnetdlx.Send sz /home/cs/bbb.txt & vbLf
for i=0 to 10000
telnetdlx.ScrollBars = 0
next

//telnetdlx.TransferStart wodTelnetDLXCom, c:\temp\ccc2.txt , true, false
telnetdlx.ReceiveFile 0, c:\temp\bbb.txt
End Sub

Private Sub telnetdlx_TransferStart(Filename, ResumeTransfer, Skip)
MsgBox Filename
//Filename = c:\temp\ccc2.txt
End Sub

-->
</script>
</html>

Re: about ReceiveFile method...

by wodSupport, Tuesday, May 17, 2005, 03:14 (7129 days ago) @ ondalx

Darren,

ok, this seems to be a bug, and I think we fixed it. Please download wodTelnetDLX again and try it out.

Problem was that after you downloaded file once, Resume was set to true and component did not try to download it again, but ZModem code was unaware of that and was waiting for actual file contents.

There is one problem. You cannot have in/out arguments in events in your JavaScript code (limitation of HTML/JS I guess), so you cannot set Resume = False at all.

Plz let me know how it goes with new version.