Jump to content

Recommended Posts

i am trying to ping my roku to see if its online so i can send some remote commands to it via telnet...

what i have so far is this BUT its not coming back anything:

#include <AutoItConstants.au3>
#include <Constants.au3>


$getInfo = _GetDOSOutput("M-SEARCH * HTTP/1.1" & @CRLF & "HOST: 239.255.255.250:1900" & @CRLF & "ST:roku:ecp" & @CRLF & "MAN:""ssdp:discover""" & @CRLF & "MX:10" & @CRLF & @CRLF)
ConsoleWrite($getInfo  & @CRLF)


Func _GetDOSOutput($sCommand)
    Local $iPID, $sOutput = ""
    $iPID = Run('"' & @ComSpec & '" /c ' & $sCommand, "", @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD)
ConsoleWrite($iPID  & @CRLF)
    While 1
        $sOutput &= StdoutRead($iPID, False, False)
ConsoleWrite($sOutput  & @CRLF)
        If @error Then
   ConsoleWrite("you have a error"  & @CRLF)
            ExitLoop
        EndIf
        Sleep(10)
    WEnd
    Return $sOutput
 EndFunc   ;==>_GetDOSOutput

Also all the info i want is returned the IP address that should come something back like this:
 

Location: http://192.168.1.134:8060/

any idea(s) what i am doing wrong here? 

 

Share this post


Link to post
Share on other sites

 

any idea(s) what i am doing wrong here?

Yes, you are posting in the wrong forum ;)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Ask a Mod to move it to the General Help and Support forum.

The Example Scripts forum is "A forum to share your cool scripts, User Defined Functions and AutoIt-based applications with others."


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

If the Roku is on your local network, you can navigate to your router configuration page in the browser, It is possibly 192.168.1.1, Then if you navigate to DHCP client table, you may be able to find the IP of your Roku.

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

×
×
  • Create New...