Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!
Showing posts with label programación. Show all posts
Showing posts with label programación. Show all posts

Tuesday, August 23, 2011

VB Script that starts running a program

Source

The Message Box works but how do you tie together by clicking "Yes" it starts running the program fsav.exe?
Option Explicit
Dim MessageBox
Dim RunScan
RunScan = "C:\Program Files\F-Secure\Anti-Virus\fsav.exe"
MessageBox = MsgBox("Run Anti-Virus Scan Now?", _
vbYesNoCancel + vbQuestion, _
"F-Secure")
If MessageBox = "Yes" Then
Run RunScan
End If 
-------------------
Try this - substitute Excel for F-Secure.
Code:
Option Explicit

Sub Run(ByVal sFile)
   Dim shell
   Set shell = CreateObject("WScript.Shell")
   shell.Run Chr(34) & sFile & Chr(34), 1, false
   Set shell = Nothing
End Sub
Dim MessageBox
Dim RunScan
RunScan="C:\Program Files\Microsoft Office\Office12\EXCEL.EXE"
MessageBox=MsgBox("Run Excel Now?",vbYesNo,"Excel")
If MessageBox=6 Then
   Run RunScan
End If

Thursday, July 16, 2009

"hello world"

Source
...
The Debian and Ubuntu Linux distributions provide the "hello world" program through the apt packaging system; this allows users to simply type "apt-get install hello" for the program to be installed, along with any software dependencies. While of itself useless, it serves as a sanity check and a simple example to newcomers of how to install a package. It is significantly more useful for developers, however, as it provides an example of how to create a .deb package, either traditionally or using debhelper, and the version of hello used, GNU hello, serves as an example of how to write a GNU program.[2]

The first known instance of the usage of the words "hello" and "world" together in computer literature occurred earlier, in Kernighan's 1972 Tutorial Introduction to the Language B[1], with the following code:

main( ) {
extrn a, b, c;
putchar(a); putchar(b); putchar(c); putchar('!*n');
}
a 'hell';
b 'o, w';
c 'orld';