PDA

Ver la Versión Completa : instruccion para ping...


jkimgt
18-01-2007, 15:51:59
que instruccion se usara en VisualFox para hacer PING a una maquina de red jovenes?

alguien que me instruya, cual es, y como se usa :oscar2: asi de aferrado...

o bien en Visual Basic, ya tenia un programa hueco que hacia eso, pero no se donde deje mi disco de VB jajajajaa, asi que seria mejor si fuera VFox que ya tengo todo lo demas hecho ahi.... pero si es VBasic pues que pizados lo vuelvo a hacer


:ok: buena onda.




.

fifo
19-01-2007, 08:26:30
que queres hacer estar pineando siempre a una pc ?

ericdiaz
19-01-2007, 08:58:15
! /N ping 192.168.1.104 -t
! /N ping 192.168.1.104

Visual FoxPro 9.0 Language Reference RUN | ! Command See Also (mk:@MSITStore:c:\archivos%20de%20programa\microso ft%20visual%20foxpro%209\dv_foxhelp.chm::/html/720d4dbf-2afa-4f75-af08-bc667a5fb8e9.htm#seeAlsoToggle)


Executes external operating commands or programs.
RUN [/N] WindowsCommand | ProgramName! [/N] WindowsCommand | ProgramName


Parameters

WindowsCommand Specifies a Windows executable command to execute.
ProgramName Specifies the Windows program or application to run.
/N Specifies NOWAIT. Include /N to execute another Windows-based application.

Remarks

You can issue RUN from within the Command window or from within a program.
Note To use RUN, Command.com or Cmd.exe must be located where the COMSPEC environment variable can find it.

Caution Do not use RUN to run disk reorganization programs such as CHKDSK from within Visual FoxPro. These programs modify the contents of your disk in a manner that may prevent Visual FoxPro from operating properly.

RUN and Visual FoxPro

The RUN command (without /N parameter) uses the following sequence order to determine which program to use when executing the specified RUN command:

Named PIF file - if the program you specify in RUN does not have an extension, Visual FoxPro first looks for a Program Information File (PIF) with the name you specify. If the PIF file is found, the program specified in the PIF is executed with the PIF parameters.
FOXRUN.PIF file - if a Named PIF file can not be found, the RUN command searches for the default Foxrun.pif file. If this file is found, the program specified in Foxrun.pif is executed with the PIF parameters.
COMSPEC Environment Variable - if no PIF file is found which meets the above criteria, the RUN command uses the SHELL program specified by the Windows operating system COMSPEC environment variable. This variable typically points to Cmd.exe, however, in older operating systems such as Windows 98, it will point to Command.com.Note For Visual FoxPro 9, the Foxrun.pif file is no longer installed in the Visual FoxPro root directory so that it is no longer used by default. The default behavior for Visual FoxPro 9 is that a RUN command (without /N parameter) should use the SHELL program specified by the COMSPEC environment variable. Foxrun.pif is now installed in the Visual FoxPro Tools directory if needed.

A PIF lets you run other programs under Windows. You can specify parameters for the program, such as whether the program is run in a window or on the full screen, the amount of memory allocated for the program, and so on.
If intended to be used, Foxrun.pif must be in the same directory as VFPVersionNumber.exe where VersionNumber represents the version number of this release of Visual FoxPro.
Unless needed, a PIF file should be avoided since the RUN command automatically use Command.com to call the program specified in the PIF file. For example, if your PIF file specified Cmd.exe as the program to run, Visual FoxPro would actually have Command.com call Cmd.exe to execute the specified RUN command, which may not be the desired behavior. It is preferable to have the RUN command directly use the SHELL program specified by the operating system's COMSPEC environment variable.
Note With Windows XP, you can view and edit the COMSPEC environment variable by right-clicking on your computer desktop's My Computer icon and selecting the Properties dialog box (Advanced tab).


/N

/N means NOWAIT. Include the letter N to execute another Windows-based application and return control immediately to Visual FoxPro. For example, the following statement opens the Windows Character Map accessory:

Copy Code ! /N CHARMAP.EXE

The following example opens the Windows Display Properties dialog box:

Copy Code ! /N CONTROL COLOR

A Windows-based application executed with RUN /N or ! /N behaves the same way the application does when you open it through the Windows Explorer or by selecting Run from the Start menu. You can switch between the application and Visual FoxPro or FoxPro for Windows using the standard Windows operations.

You can include an optional numeric value immediately after /N to specify how the Windows-based application is opened. Do not include any spaces between /N and the numeric value. The following table lists the numeric value you can include and describes the state of the Windows-based application when opened.

Value Application attributes
1 Active and normal size.
2 Active and minimized.
3 Active and maximized.
4 Inactive and normal size.
7 Inactive and minimized.

By default, Foxrun.pif runs the specified external program in a window. In Visual FoxPro, the FoxPro Run Command window is closed after the external program or command is finished executing.
You can use the Windows PIF editor to customize Foxrun.pif. You can edit the PIF to specify if the Inactive FoxPro Run Command window is left open or is closed (the default in Visual FoxPro) with the Close Window on Exit check box. You can also open external programs in a full screen by selecting Full Screen; allocate memory for the program; and so on.

Windows 2000 Logo Certification

If you plan to submit your application for Windows Logo certification, you should not use the RUN command because it can potentially violate the System Group Policy requirements. Instead, you should use DECLARE DLL with ShellExecuteEx.API.


See Also

Reference

GETENV( ) Function (mk:@MSITStore:c:\archivos%20de%20programa\microso ft%20visual%20foxpro%209\dv_foxhelp.chm::/html/52f2d18a-d480-4591-80fb-f58ec8a5de48.htm)
_SHELL System Variable (mk:@MSITStore:c:\archivos%20de%20programa\microso ft%20visual%20foxpro%209\dv_foxhelp.chm::/html/319cc503-66e5-4561-aea9-19f513a21a90.htm)
Other Resources

Commands (Visual FoxPro) (mk:@MSITStore:c:\archivos%20de%20programa\microso ft%20visual%20foxpro%209\dv_foxhelp.chm::/html/1b0b5237-6e5d-43cd-b3a6-6ebe7a470a0e.htm)

© Microsoft Corporation. All rights reserved.

cerberus_gt
19-01-2007, 09:02:00
! /n ping 192.168.1.104 -t
! /n ping 192.168.1.104


x 2


con el comando "!" desde el programa o bien desde el command podes ejecutar todos los comandos de DOS, valga la redundancia :adorara:

jkimgt
19-01-2007, 12:14:12
simon, eso quiero hacer pinear a una pc constantemente y segun el resultado hacer X funcion...

es cierto, no me acordaba de: "!" pero que valor me retorna? para poder usarlo en una instruccion IF .... es decir, si si pinea tal cosa si no haga esto... :nismo:...


y, esa onda "!" sigue funcionando en Visual FoX mucha? porque hay algunas cosas de fox que no trabajan en windows :rvm:....

encontre un programa en una pagina, pero todavia no la termino de decifrar :S



.