Sign in to follow this  
Followers 0
Laymanball

Command Ping

3 posts in this topic

#1 ·  Posted (edited)

I learned programming.

Error here?

I just get it.

Thanks.

-------------------------------------

Switch @IPAddress1
    Case '127.0.0.1'
        $iURL = InputBox("Command Ping [OffLine]", "Your IP: "&@IPAddress1&@LF&@LF&"Enter: URL name", "localhost", "", 220, 140, 400, 300)
        If Not $iURL Then Exit
        Run(@ComSpec & " /k " & 'ping '& $iURL, "", @SW_SHOW)
    Case Else
        $iURL = InputBox("Command Ping [OnLine]", "Your IP: "&@IPAddress1&@LF&@LF&"Enter: URL name", "www.google.com", "", 220, 140, 400, 300)
        If Not $iURL Then Exit
        Run(@ComSpec & " /k " & 'ping '& $iURL, "", @SW_SHOW)
EndSwitch
Edited by Laymanball

My Sample Script

Download: VistaDesktopIconsChangerForXp.au3 (Com,Doc and Bin only) http://www.4shared.com/rar/NMHYL5Igba/VistaDesktopIconsChangerForXp_.html

                     VistaDesktopIconsChangerForXp.exe (Resources) http://www.4shared.com/rar/nzs7Mb1gba/VistaDesktopIconsChangerForXp_.html

Share this post


Link to post
Share on other sites



Update: Add PingInfo.log.

#NoTrayIcon
maincommandping()
Func maincommandping()
    Global $iURL, $pid, $btn, $pidl
    Switch @IPAddress1
        Case '127.0.0.1'
            $iURL = InputBox("Command Ping [OffLine]", "Your IP: "&@IPAddress1&@LF&@LF&"Enter: URL name", "localhost", "", 220, 140, 400, 300)
            If Not $iURL Then Exit
            $pid = Run(@ComSpec & " /k " & 'ping '& $iURL, "", @SW_SHOW)
        Case Else
            $iURL = InputBox("Command Ping [OnLine]", "Your IP: "&@IPAddress1&@LF&@LF&"Enter: URL name", "www.google.com", "", 220, 140, 400, 300)
            If Not $iURL Then Exit
            $pid = Run(@ComSpec & " /k " & 'ping '& $iURL, "", @SW_SHOW)
    EndSwitch
    If ProcessWaitClose($pid)Then
        $btn = MsgBox(36, "", "Do you wante save log data?")
        If $btn = 7 Then Exit
        $pidl = Run(@ComSpec & " /k " & 'ping '& $iURL & " >"&$iURL&"_PingInfo.log", "", @SW_HIDE)
        If ProcessExists($pidl) Then ProcessClose($pidl)
    EndIf
EndFunc

My Sample Script

Download: VistaDesktopIconsChangerForXp.au3 (Com,Doc and Bin only) http://www.4shared.com/rar/NMHYL5Igba/VistaDesktopIconsChangerForXp_.html

                     VistaDesktopIconsChangerForXp.exe (Resources) http://www.4shared.com/rar/nzs7Mb1gba/VistaDesktopIconsChangerForXp_.html

Share this post


Link to post
Share on other sites

Reply edit. info.log at not show.

#NoTrayIcon
#include <Process.au3>

maincommandping()
Func maincommandping()
    Global $iURL, $pid, $btn, $pidl
    Switch @IPAddress1
        Case '127.0.0.1'
            $iURL = InputBox("Command Ping [OffLine]", "Your IP: "&@IPAddress1&@LF&@LF&"Enter: URL name", "localhost", "", 220, 140, 400, 300)
            If Not $iURL Then Exit
            $pid = Run(@ComSpec & " /k " & 'ping '& $iURL, "", @SW_SHOW)
        Case Else
            $iURL = InputBox("Command Ping [OnLine]", "Your IP: "&@IPAddress1&@LF&@LF&"Enter: URL name", "www.google.com", "", 220, 140, 400, 300)
            If Not $iURL Then Exit
            $pid = Run(@ComSpec & " /k " & 'ping '& $iURL, "", @SW_SHOW)
    EndSwitch
    If ProcessWaitClose($pid)Then
        $btn = MsgBox(36, "", "Do you wante save log data?")
        If $btn = 7 Then Exit
         WinWaitActive("[Class:ConsoleWindowClass]", "", 1)
        _RunDOS('ping '& $iURL & " >"&$iURL&"_PingInfo.log")
        If ProcessWaitClose($pidl) Then ProcessClose($pidl)
    EndIf
EndFunc

My Sample Script

Download: VistaDesktopIconsChangerForXp.au3 (Com,Doc and Bin only) http://www.4shared.com/rar/NMHYL5Igba/VistaDesktopIconsChangerForXp_.html

                     VistaDesktopIconsChangerForXp.exe (Resources) http://www.4shared.com/rar/nzs7Mb1gba/VistaDesktopIconsChangerForXp_.html

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  
Followers 0