Board index » Visual Studio » Couple of questions

Couple of questions

Visual Studio229
Hello there!



I have some questions:

1) How I can calculate planetary positions in VBScript. For example,

declination of the Sun or Sun rise and set times

2) Can I upload files with FTP protocol using VBScript





With best wishes,



Tarmo Tanilsoo


-
 

Re:Couple of questions

vbscript is not particularly suited for that type of functionality. It may

be best to use a third party control for that purpose.



Here is a link for the upload part

aspzone.com/articles/160.aspx">aspzone.com/articles/160.aspx



--

Regards,

Alvin Bruney



[Shameless Author Plug]

The Microsoft Office Web Components Black Book with .NET

available at www.lulu.com/owc

------------------------------------------------------------



"Tarmo Tanilsoo" <tarmo.tanilsoo@mail.ee>wrote in message

Quote
Hello there!



I have some questions:

1) How I can calculate planetary positions in VBScript. For example,

declination of the Sun or Sun rise and set times

2) Can I upload files with FTP protocol using VBScript





With best wishes,



Tarmo Tanilsoo









-

Re:Couple of questions

Tarmo Tanilsoo wrote:



Quote
I have some questions:

1) How I can calculate planetary positions in VBScript. For example,

declination of the Sun or Sun rise and set times



I have no idea.



Quote
2) Can I upload files with FTP protocol using VBScript



You can run ftp.exe from command line/batch/vbscript, using an input

file with the -s command line parameter:



http://groups.google.co.uk/groups?th" rel="nofollow" target="_blank">groups.google.co.uk/groups=dc0c0f2ec58712ff



http://groups.google.co.uk/groups?th" rel="nofollow" target="_blank">groups.google.co.uk/groups=d4a8746457a4297f





Alternatively:



You might want to take a look at the components below. They wrap

WinInet.dll in a object you can use from a VBScript. What support

they have for proxy server I don't know.





1)

AspFTP (free)

www.15seconds.com/issue/981203.htm">www.15seconds.com/issue/981203.htm



Download 981203.zip and unpack it. Register the dll aspftp.dll:



regsvr32.exe "<some path>\aspftp.dll"

(if you want to register it unattended, use regsvr32.exe /s ....)



you can then connect to the object like this:



Set oFTP = CreateObject("NIBLACK.ASPFTP")



See AspFTP2_Doc.htm in the zip file for documentation and e.g. AspFTP2_Get.asp

and AspFTP2_Put.asp for examples.



An example here as well:

http://groups.google.co.uk/groups?selm" rel="nofollow" target="_blank">groups.google.co.uk/groups=tKWmLfM5DHA.4028%40cpmsftngxa07.phx.gbl





2)

AspInet (free)

www.serverobjects.com/comp/AspInet.zip">www.serverobjects.com/comp/AspInet.zip



Download AspInet.zip and unpack it. Register the dll ASPINET.DLL:



regsvr32.exe "<some path>\ASPINET.DLL"

(if you want to register it unattended, use regsvr32.exe /s ....)



you can then connect to the object like this:



Set oFTP = CreateObject("AspInet.FTP")



See InetAsp.doc in the zip file for documentation and InetFtp.asp for examples



An example here as well:

http://groups.google.co.uk/groups?selm" rel="nofollow" target="_blank">groups.google.co.uk/groups=tKWmLfM5DHA.4028%40cpmsftngxa07.phx.gbl





3)

Ian Morrish's FAQ at groups.msn.com/WindowsScript/othercomobjects.msnw">groups.msn.com/WindowsScript/othercomobjects.msnw

- Free FTP COM Object & sample script



To use the example in the link above, you

need to run the exe file vbInet.exe that is inside the zip file vbInet.zip once



(it is a self registering exe file). vbInet.exe is a component that wraps the

API's so you can use it from a vbscript.



After you have run vbInet.exe, you can connect to the object like this:



Set oInet = WScript.CreateObject("VBInet.CNetUpload","oInet_")







--

torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway

Administration scripting examples and an ONLINE version of

the 1328 page Scripting Guide:

www.microsoft.com/technet/scriptcenter/default.mspx">www.microsoft.com/technet/scriptcenter/default.mspx

-

Re:Couple of questions



"Tarmo Tanilsoo" <tarmo.tanilsoo@mail.ee>wrote in message

Quote
Hello there!



I have some questions:

1) How I can calculate planetary positions in VBScript. For example,

declination of the Sun or Sun rise and set times



If you can calculate the planetary positions yourself, then use your

calculation algorithms in your vb code.





-

Re:Couple of questions

Tarmo Tanilsoo wrote:

Quote
Hello there!



I have some questions:

1) How I can calculate planetary positions in VBScript. For example,

declination of the Sun or Sun rise and set times



You might check out the VBScript posted here:



www.paulsadowski.com/WSH/suntimes.htm">www.paulsadowski.com/WSH/suntimes.htm

-