Chat with Me -- HOST
#3
Find your IP4 Address for Windows systems. (See the caution at the top of the code).

Edit: There may be a language difference that prevents the search match. The routine is not case-sensitive, but see, "search$= " for supported search terms.

Code: (Select All)
' CAUTION - THE SHELL STATEMENT WILL OVERWRITE ANY PREEXISTING FILE YOU HAVE IN YOUR LOCAL DIRECTORY NAMED "tmp.tmp".
' Change tmp.tmp to something else if that's a problem.
SHELL _HIDE "ipconfig>tmp.tmp"
OPEN "tmp.tmp" FOR BINARY AS #1
a$ = SPACE$(LOF(1))
GET #1, , a$
CLOSE #1
DO
    j = INSTR(LCASE$(a$), search$)
    IPAddy$ = MID$(a$, j)
    IPAddy$ = MID$(IPAddy$, 1, INSTR(IPAddy$, CHR$(13)) - 1)
    IPAddy$ = _TRIM$(MID$(IPAddy$, INSTR(IPAddy$, ":") + 1))
    IF j AND LEN(search$) > 0 THEN
        PRINT "Your IP Address is: "; IPAddy$
        EXIT DO
    ELSE
        SELECT CASE cnt
            CASE 0
                search$ = "ipv4 address"
            CASE 1
                search$ = "ip address"
            CASE 2
                search$ = "ipv4 "
            CASE 3
                search$ = "ipv4-address"
            CASE 4
                search$ = "ip-address"
            CASE 5
                search$ = "ipv4-"
            CASE ELSE
                PRINT "Sorry, can't find IP addy. Opening Notepad so you can find it..."
                SHELL _DONTWAIT "Notepad tmp.tmp"
                EXIT DO
        END SELECT
    END IF
    cnt = cnt + 1
LOOP

Pete
Reply


Messages In This Thread
Chat with Me -- HOST - by SMcNeill - 12-11-2022, 12:30 PM
RE: Chat with Me -- HOST - by SMcNeill - 12-11-2022, 12:37 PM
RE: Chat with Me -- HOST - by Pete - 12-11-2022, 05:41 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-11-2022, 06:02 PM
RE: Chat with Me -- HOST - by Pete - 12-11-2022, 06:13 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-11-2022, 07:08 PM
RE: Chat with Me -- HOST - by SMcNeill - 12-11-2022, 08:26 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-11-2022, 08:47 PM
RE: Chat with Me -- HOST - by SMcNeill - 12-11-2022, 08:55 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-11-2022, 09:13 PM
RE: Chat with Me -- HOST - by Pete - 12-11-2022, 11:19 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-11-2022, 11:49 PM
RE: Chat with Me -- HOST - by Pete - 12-12-2022, 12:34 AM
RE: Chat with Me -- HOST - by mnrvovrfc - 12-12-2022, 08:46 AM
RE: Chat with Me -- HOST - by Kernelpanic - 12-13-2022, 12:08 AM
RE: Chat with Me -- HOST - by mnrvovrfc - 12-13-2022, 12:24 AM
RE: Chat with Me -- HOST - by SMcNeill - 12-13-2022, 12:26 AM
RE: Chat with Me -- HOST - by Kernelpanic - 12-13-2022, 03:43 PM
RE: Chat with Me -- HOST - by mnrvovrfc - 12-13-2022, 05:06 PM
RE: Chat with Me -- HOST - by Pete - 12-13-2022, 12:57 AM
RE: Chat with Me -- HOST - by mnrvovrfc - 12-13-2022, 01:22 AM
RE: Chat with Me -- HOST - by Kernelpanic - 12-13-2022, 03:40 PM
RE: Chat with Me -- HOST - by Pete - 12-13-2022, 04:29 PM
RE: Chat with Me -- HOST - by SMcNeill - 12-13-2022, 03:44 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-13-2022, 03:53 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-13-2022, 03:49 PM
RE: Chat with Me -- HOST - by Pete - 12-13-2022, 05:38 PM
RE: Chat with Me -- HOST - by mnrvovrfc - 12-13-2022, 06:34 PM
RE: Chat with Me -- HOST - by Pete - 12-13-2022, 07:00 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-13-2022, 09:23 PM
RE: Chat with Me -- HOST - by Pete - 12-13-2022, 09:29 PM
RE: Chat with Me -- HOST - by SpriggsySpriggs - 12-13-2022, 09:12 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-13-2022, 09:34 PM
RE: Chat with Me -- HOST - by Pete - 12-13-2022, 10:06 PM
RE: Chat with Me -- HOST - by mnrvovrfc - 12-14-2022, 08:35 AM
RE: Chat with Me -- HOST - by Kernelpanic - 12-13-2022, 11:10 PM
RE: Chat with Me -- HOST - by mnrvovrfc - 12-14-2022, 09:52 AM
RE: Chat with Me -- HOST - by SpriggsySpriggs - 12-14-2022, 04:42 PM
RE: Chat with Me -- HOST - by Pete - 12-14-2022, 07:27 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-14-2022, 10:44 PM
RE: Chat with Me -- HOST - by mnrvovrfc - 12-15-2022, 01:48 AM
RE: Chat with Me -- HOST - by Pete - 12-14-2022, 10:52 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-14-2022, 11:27 PM
RE: Chat with Me -- HOST - by SMcNeill - 12-14-2022, 11:35 PM
RE: Chat with Me -- HOST - by Pete - 12-15-2022, 12:04 AM
RE: Chat with Me -- HOST - by SMcNeill - 12-15-2022, 12:09 AM
RE: Chat with Me -- HOST - by TempodiBasic - 12-15-2022, 12:54 AM
RE: Chat with Me -- HOST - by SpriggsySpriggs - 12-15-2022, 02:39 PM
RE: Chat with Me -- HOST - by mnrvovrfc - 12-15-2022, 02:52 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-16-2022, 12:59 AM
RE: Chat with Me -- HOST - by SpriggsySpriggs - 12-15-2022, 02:58 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-16-2022, 12:53 AM
RE: Chat with Me -- HOST - by Pete - 12-16-2022, 02:19 AM
RE: Chat with Me -- HOST - by Kernelpanic - 12-16-2022, 04:56 PM
RE: Chat with Me -- HOST - by mnrvovrfc - 12-16-2022, 11:24 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-16-2022, 10:01 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-17-2022, 05:55 PM
RE: Chat with Me -- HOST - by Pete - 12-17-2022, 06:13 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-17-2022, 08:12 PM
RE: Chat with Me -- HOST - by Kernelpanic - 12-17-2022, 08:54 PM
RE: Chat with Me -- HOST - by Pete - 12-18-2022, 09:33 AM
RE: Chat with Me -- HOST - by Kernelpanic - 12-17-2022, 09:57 PM



Users browsing this thread: 31 Guest(s)