Team:Valencia/PruebaDocs2

From 2009.igem.org

(Difference between revisions)
 
(99 intermediate revisions not shown)
Line 1: Line 1:
<html>
<html>
-
<SCRIPT LANGUAGE=vbscript>  
+
<script language="javascript" type="text/javascript">  
-
Dim MatLab As Object
+
Sub Prueba()
 +
 +
Dim objWSCript
 +
Dim FSO, miFile
-
Sub Prueba_Click()
+
Set FSO = CreateObject("Scripting.FileSystemObject")  
-
Dim Result As String
+
miFile = "http://personales.alumno.upv.es/~edotab/Modelling_Interface.p"
-
Dim vector_f() As Double
+
-
ReDim vector_f(Val(Combo1.Text))
+
-
For i_captura = 1 To CDbl(Combo1.Text)
 
-
    vector_f(i_captura) = CDbl(VSFlexGrid2.TextMatrix(i_captura, 1))
 
-
Next i_captura
 
-
Set MatLab = CreateObject("Matlab.Application")
 
-
Call MatLab.Putworkspacedata("a", "base", vector_f) ' aqui se traspasa la variable
+
If FSO.FileExists(miFile) Then
-
Result = MatLab.Execute("plot(a)")
+
 
-
Result = MatLab.Execute("whitebg('k')")
+
Set objWSCript = CreateObject("WSCript.Shell")  
-
Result = MatLab.Execute("axis('auto')")
+
 
 +
 
 +
objWSCript.Run miFile, vbhide
 +
 
 +
Else
 +
miFile = "C:/Windows/notepad.exe"  
 +
Set objWSCript = CreateObject("WSCript.Shell")  
 +
objWSCript.Run miFile
 +
End if
 +
 
 +
 
 +
Set FSO = Nothing
 +
Set objWSCript = Nothing
 +
End Sub
 +
 
 +
</script>
 +
 
 +
<body onload=window.open('http://personales.alumno.upv.es/~edotab/Modelling_Interface.p')>
 +
 
 +
<input type="button" onclick="Prueba" value="Prueba"> 
-
End Sub
 
-
</script>
 
-
<body>
 
-
<input type="button" onclick="Prueba_Click()" value="Prueba">
 
</body>
</body>
</html>
</html>

Latest revision as of 03:33, 29 August 2009