Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
31
Task/Fork/FreeBASIC/fork.basic
Normal file
31
Task/Fork/FreeBASIC/fork.basic
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
Function script(s As String) As String
|
||||
Dim As String g = _
|
||||
"Set WshShell = WScript.CreateObject(""WScript.Shell"")" + _
|
||||
Chr(13,10) + "Return = WshShell.Run("""+s+" "",1,0)"
|
||||
Return g
|
||||
End Function
|
||||
|
||||
Function guardaArchivo(nombreArchivo As String, p As String) As String
|
||||
Dim As Long n = Freefile
|
||||
If Open (nombreArchivo For Binary Access Write As #n) = 0 Then
|
||||
Put #n,,p
|
||||
Close
|
||||
Else
|
||||
Print "No se puede guardar " + nombreArchivo : Sleep : End
|
||||
End If
|
||||
Return nombreArchivo
|
||||
End Function
|
||||
|
||||
Sub ejecutaScript(nombreArchivo As String)
|
||||
Shell "cscript.exe /Nologo " + nombreArchivo
|
||||
End Sub
|
||||
|
||||
Var g = script("notepad.exe") '<< ejecuta este .exe (notepad como demo)
|
||||
guardaArchivo("script.vbs",g)
|
||||
ejecutaScript("script.vbs")
|
||||
Dim As String s
|
||||
Print "Hola"
|
||||
Input "Teclee algo: ", s
|
||||
Print s
|
||||
Kill "script.vbs"
|
||||
Sleep
|
||||
Loading…
Add table
Add a link
Reference in a new issue