Jump to content

Let me ask for permission 1 time to ask 2 questions: Check internet connection and get computer code - (Moved)


Recommended Posts

Posted

1. Is there any way to check for internet connection? Because I use inetread and inetget when running scripts without internet it gives an error.

2. Each computer has different machine codes, let me ask if there is any way to get the code. I see that very long computer does not know who has done this yet?

  • Moderators
Posted

Loc,

Did you mean to post this in the AutoItX section?

And your second question is complete gibberish - can you explain more fully what you want to do.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted (edited)

Google dịch sai hết Ý tôi là: (Câu hỏi 2 là lấy mã máy tính. Mã máy tính thường là số: 1578999843322577785. Hardwave id

Edited by Loc
  • Moderators
Posted

Moved to the appropriate forum.

Moderation Team

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted (edited)
On 10/8/2020 at 4:06 AM, Loc said:

2. Each computer has different machine codes, let me ask if there is any way to get the code. I see that very long computer does not know who has done this yet?

Are you referring to the computer's serial number?  If so, you can get it from several sources.  One source is by querying the WMI Win32_ComputerSystemProduct object.

Edited by TheXman
Posted (edited)
On 10/8/2020 at 4:06 AM, Loc said:

Is there any way to check for internet connection? Because I use inetread and inetget when running scripts without internet it gives an error.

There are plenty of ways to check for internet connectivity.

 

Here's one way.  Look at the example in the first post...
 

 

Edited by TheXman
  • 3 weeks later...
Posted
Func GET_MAC() ; 2020.04.13$_MACsIP
    ;https://www.autoitscript.com/forum/topic/165393-get-mac-address-efficiently/
    Local $_MAC, $_MACSize, $_MACsIP = @IPAddress1
    Local $_MACi, $_MACs, $_MACr, $_MACiIP
    $_MAC = DllStructCreate("byte[6]")
    $_MACSize = DllStructCreate("int")
    DllStructSetData($_MACSize, 1, 6)
    $_MACr = DllCall("Ws2_32.dll", "int", "inet_addr", "str", $_MACsIP)
    $_MACiIP = $_MACr[0]
    $_MACr = DllCall("iphlpapi.dll", "int", "SendARP", "int", $_MACiIP, "int", 0, "ptr", DllStructGetPtr($_MAC), "ptr", DllStructGetPtr($_MACSize))
    $_MACs = ""
    For $_MACi = 0 To 5
        If $_MACi Then $_MACs = $_MACs & ":"
        $_MACs = $_MACs & Hex(DllStructGetData($_MAC, 1, $_MACi + 1), 2)
    Next
    DllClose($_MAC)
    DllClose($_MACSize)
    Return $_MACs
EndFunc   ;==>GET_MAC

 

Skysnake

Why is the snake in the sky?

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...