Can not get my head around this one.
This function gets the DNS object s
If you have two DNS entries fine. but if you have only one! Trouble
$objItem.DNSServerSearchOrder = Primary DNS
$objItem.DNSServerSearchOrder = Secondry DNS not always there. I need a way to return 0 if not there or the IP if its there.
Or is there a way to tell how many objects there are in the "[?]"
I'm terrible at WMI errors, thanks for help in advance.
Func _GETcurrentNICinfo2() $oErrors = ObjEvent("AutoIt.Error", "Error_Handle") Local $DnsSecondry Local $objWMIService = ObjGet( "winmgmts:\\" & @ComputerName & "\root\CIMV2" ) Local $query = $objWMIService.ExecQuery("SELECT DNSServerSearchOrder FROM Win32_NetworkAdapterConfiguration WHERE Index = " & _GetSelectedNIC(), "WQL", 0x30 ) If @error Then Return 0 If NOT IsObj($query) Then Return 0 Else For $objItem In $query Return $objItem.DNSServerSearchOrder next Endif EndFunc
What should work @ converting the symbol's Unicode point
included in windows 10:
Some Random Bad example : really Need to jump out sorry ..
$hBtn = GUICtrlCreateButton(ChrW(BinaryToString("0xE70E", $SB_UTF16LE) ), 260, 37, 39, 21)
GUICtrlSetFont(-1, 13, 600, -1, "SegMDL2")
Currently, I'm using Opencv UDF and i'm encountering issues with DLLOPEN(). it is failing and returning -1
But, I cannot figure out why it is failing.
I need help from people.
I'm running windows 10 32bit.
This's my code.
#RequireAdmin $fileopen = DllOpen("opencv_core2413.dll") MsgBox(0,"Result",$fileopen) Example.au3opencv_core2413.dll
I've made a library, based on AutoItObject UDF with the goal of implementing getter and setter functionality and make it possible to define new object properties in as few steps as possible.
Thank you to @trancexx for getting me on the right track, and all users in Hooking into the IDispatch interface for the code to get me going.
If I've forgotten to add credit, please let me know
#include "AutoItObject_Internal.au3" $myCar = IDispatch() $myCar.make = 'Ford' $myCar.model = 'Mustang' $myCar.year = 1969 $myCar.__defineGetter('DisplayCar', DisplayCar) Func DisplayCar($oThis) Return 'A Beautiful ' & $oThis.parent.year & ' ' & $oThis.parent.make & ' ' & $oThis.parent.model EndFunc MsgBox(0, "", $myCar.DisplayCar) More examples: https://github.com/genius257/AutoItObject-Internal/tree/master/Examples
Edit2 (19th March 2017):
First of all, sorry about the lack of updates on this project. I always start too many projects and end up ignoring old projects, if I run into problems ^^'.
So I've started moving my AutoIt scripts to GitHub. I will still post the most recent script version here.
This script used to work on an older version of AutoIT. Currently I am running AutoIT v220.127.116.11 and it's failing.
Func PublicIP() ;Post public facing IP address Local $url = 'https://www.google.com/search?client=opera&q=what+is+my+ip&sourceid=opera&ie=UTF-8&oe=UTF-8' Local $getIPaddress = BinaryToString(InetRead($url)) Local $sStart = 'clamp:2">' Local $sEnd = '</div>' Local $ipaddress = _StringBetween($getIPaddress, $sStart, $sEnd For $i In $ipaddress MsgBox(0, 'External IP', "Your public IP address is " & $i) Next EndFunc ;==>PublicIP The console output shows:
"C:\Users\user\Documents\AutoIT\Scripts\WSI Tools.au3" (197) : ==> Variable must be of type "Object".: For $i In $ipaddress For $i In $ipaddress^ ERROR ->14:12:16 AutoIt3.exe ended.rc:1 +>14:12:16 AutoIt3Wrapper Finished. >Exit code: 1 Time: 9.811