Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Intermediate
Date of registration: Jan 1st 2009
Location: Hanover, Germany
Occupation: Software Engineer
Hobbies: Hilbert Curves
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
Dim a As String Dim b As java#net#URL Dim conn As java#net#URLConnection Dim c As java#io#InputStream Dim d As java#io#InputStreamReader Dim e As java#io#BufferedReader Dim f(1000) As String Dim n As Integer ' in case we are behind a proxy System.setProperty("http.proxyHost", "myproxy.xyz") System.setProperty("http.proxyPort", "8080") System.setProperty("http.proxyUser", "myuser") System.setProperty("http.proxyPassword", "mypassword") a = "http://www.jabaco.org" ' or whatever you want b = New java#net#URL(a) conn = b.openConnection() c = conn.getInputStream() d = New java#io#InputStreamReader(c) e = New java#io#BufferedReader(d) n = 1 Debug.Print "before loop" Do While (n <= UBound(f)) And e.ready() f(n) = e.readLine() Debug.Print n & ": " & f(n) n = n + 1 Loop d.close() e.close() |
Intermediate
Date of registration: Jan 1st 2009
Location: Hanover, Germany
Occupation: Software Engineer
Hobbies: Hilbert Curves
Jabaco Source |
|
1 2 3 4 5 6 |
Const quote = Chr(34) Dim url As String = "http://www.jabaco.org" Dim cmd As String = "cmd.exe /c start " & quote & "my window" & quote & " " & url Debug.Print cmd Shell(cmd) |
Intermediate
Date of registration: Jan 1st 2009
Location: Hanover, Germany
Occupation: Software Engineer
Hobbies: Hilbert Curves
Intermediate
Date of registration: Jan 1st 2009
Location: Hanover, Germany
Occupation: Software Engineer
Hobbies: Hilbert Curves
Intermediate
Date of registration: Jan 1st 2009
Location: Hanover, Germany
Occupation: Software Engineer
Hobbies: Hilbert Curves
Jabaco Source |
|
1 2 3 |
String host = "172.16.0.2" int timeOut = 3000; // 3 seconds at least int timeout = 3000; boolean status = InetAddress.getByName(host).isReachable(timeOut) boolean status = InetAddress.getByName (Host).isReachable (timeOut) |
Source code |
|
1 2 3 4 5 6 7 8 |
Public Sub Form_Load() host = "127.0.0.1" timeOut = 3000' // 3 seconds at least int timeout = 3000; status = InetAddress.getByName(host).isReachable(timeOut) MsgBox status MsgBox System.getProperty("os.name") End Sub |
Beginner
Date of registration: May 29th 2010
Location: Santos, Brazil
Occupation: Consultant
Hobbies: Builing some apps for accessing databases and some automation processes
Thanks a lot! It seems to work good!
Source code
1 2 3 4 5 6 7 8 Public Sub Form_Load() host = "127.0.0.1" timeOut = 3000' // 3 seconds at least int timeout = 3000; status = InetAddress.getByName(host).isReachable(timeOut) MsgBox status MsgBox System.getProperty("os.name") End Sub
Now I'm a step further towards converting my old VB6 program to Jabaco!
Intermediate
Date of registration: Jan 1st 2009
Location: Hanover, Germany
Occupation: Software Engineer
Hobbies: Hilbert Curves
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Option Explicit Public Sub Form_Load() Dim host As String Dim timeOut As Integer Dim status As Boolean host = "127.0.0.1" timeOut = 3000' // 3 seconds at least int timeout = 3000; status = java#net#InetAddress.getByName(host).isReachable(timeOut) MsgBox status MsgBox System.getProperty("os.name") End Sub |
Beginner
Date of registration: May 29th 2010
Location: Santos, Brazil
Occupation: Consultant
Hobbies: Builing some apps for accessing databases and some automation processes