ProcessList()

Pregunta Sin Miedo no te cortes cualquier cosa para empezar - Autoit se comienza facilmente.Para Ordenes o Comandos sueltos. Ver nota como preguntar.
Responder
takuya2
Mensajes: 13
Registrado: 28 Ene 2011, 12:55

ProcessList()

Mensaje por takuya2 »

Hola a todos, soy nuevo por aqui, y bueno, tengo un par de dudas, que por mucho que pruebo con cosas y cosas no me sale bien.

La cosa es que tengo un List, en el que quiero que salgan todos los procesos que tiene tal usuario en el momento, y a a ser posible, que se actualiza cada X tiempo. Bueno, La cosa es que consigo hacer que salga 1 de ellos, por ejemplo, pero no todos uno debajo de otro.

la linea la tengo asi:
$ProcesosActivos = GUICtrlCreateList(_ProcessList(), 448, 56, 137, 344)
y la func asi: ( Aunque la he cambiado miles de veces probando cualquier cosa... )
Func _ProcessList()

$list = ProcessList()
for $h2 = 1 to $list[0][0]
next

Endfunc
A ver si alguien puede hechar luz sobre mi oscuridad... xDDD
Avatar de Usuario
BasicOs
Site Admin
Mensajes: 2085
Registrado: 21 Nov 2006, 19:24
Ubicación: El Internet - (Canarias, España)
Contactar:

Re: ProcessList()

Mensaje por BasicOs »

De la ayuda mezclé los ejemplos de processList() y de GUICtrlCreateList, los junté en el mismo programa,
Te saca en pantalla los procesos que se están ejecutando en este momento, en un List-ado :smt017 :smt017 :smt023 :smt023

Código: Seleccionar todo

#include <GUIConstantsEx.au3>



	Local $MESSAGE = "The following buttons have been clicked"
	Local $add, $clear, $mylist, $close, $msg

	GUICreate("My GUI list") ; will create a dialog box that when displayed is centered

	$add = GUICtrlCreateButton("Add", 64, 32, 75, 25)
	$clear = GUICtrlCreateButton("Clear", 64, 72, 75, 25)
	$mylist = GUICtrlCreateList("Botones que se han pulsado", 176, 32, 190, 97)
	GUICtrlSetLimit(-1, 200) 	; to limit horizontal scrolling

	;GUICtrlSetData(-1, $MESSAGE)
	$close = GUICtrlCreateButton("my closing button", 64, 160, 175, 25)

	$list = ProcessList()

	for $i = 1 to $list[0][0]
		GUICtrlSetData($mylist, $list[$i][0]&" "& $list[$i][1])
	next


	GUISetState()

	$msg = 0
	While $msg <> $GUI_EVENT_CLOSE
		$msg = GUIGetMsg()

		Select
			Case $msg = $add
				GUICtrlSetData($mylist, "You clicked button No1|")
			Case $msg = $clear
				GUICtrlSetData($mylist, "")
			Case $msg = $close
				MsgBox(0, "", "the closing button has been clicked", 2)
				Exit
		EndSelect
	WEnd
Salu22:)
takuya2
Mensajes: 13
Registrado: 28 Ene 2011, 12:55

Re: ProcessList()

Mensaje por takuya2 »

Bien, tema resuelto, Podeis cerrar. Muchas gracias BasicOs
Responder