Jump to content
Sign in to follow this  
cprz

help with ping

Recommended Posts

alright sence you guys are good at helping just figure to see if i could get some help lol err i dont see y this isnt working here take a look

$plist = $list=GUICtrlCreateList ("|pinged ip |", 10,345,155,75)
$ping = GUICtrlCreateInput ( @IPAddress1, 10,  410, 155, 20)
$button = GUICtrlCreateButton ("PING",  10, 430, 40)

GuiSetState ()

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

    Select
       case $msg = $button
       GuiCtrlSetData($plist, Ping ($ping))


        


    
    EndSelect
Wend

Share this post


Link to post
Share on other sites

I think you need a GuiCtrlRead in there on $ping, right before you attempt to do the ping.

Edited by killaz219

Share this post


Link to post
Share on other sites

You have to seperate your 2 commands:

$plist = GUICtrlCreateList ("|pinged ip |", 10,345,155,75)
$list= $plist

and then add something like:

$data = GUICtrlRead($ping)
GuiCtrlSetData($plist,$data,$data)

:idiot:

Edit

Here is it how I mean it:

#include <GUIConstants.au3>
Global $plist,$list
GUICreate("test",500,500)
$plist = GUICtrlCreateList ("|pinged ip |", 10,345,155,75)
$list = $plist
Msgbox(0,"",$list & @LF & $plist)
$ping = GUICtrlCreateInput ( @IPAddress1, 10,  410, 155, 20)
$button = GUICtrlCreateButton ("PING",  10, 430, 40)

GuiSetState ()

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

    Select
       case $msg = $button
       $data = GUICtrlRead($ping)
       GuiCtrlSetData($plist,$data,$data)
    EndSelect
Wend
Edited by Holger

Share this post


Link to post
Share on other sites

rofl no wonder it wasnt working there was typo i did in the script the

$plist = list=GUICtrlCreateList ("|pinged ip |", 10,345,155,75)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...