Leaderboard
Popular Content
Showing content with the highest reputation on 03/25/2022 in all areas
-
Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
argumentum and one other reacted to Shark007 for a topic
Working as expected for me.2 points -
Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
argumentum and one other reacted to Jos for a topic
Uploaded a new Beta for SciLExer.dll and AutoItTools.lua with the following changes: Change for the Folding for MultiLine If/Elseif statements so the end fold is always on the IF/ElseIf line and the start new fold on the Then line. Added style.au3.92 to the Lexer which I use for #region/#EndRegion blocks to be able to segregate them form the other SPECIAL keywords and give it its own fold level. This also means that multiple SPECIAL lines are now foldable like the multiple Commentlines and multiple Pre-Processor lines. Updated AutoItTools.lua to set style.au3.92 equal to style.au3.12 to ensure the #region/#endregion lines are properly colored.2 points -
Active Directory UDF - Help & Support (III)
DonChunior reacted to water for a topic
& stands for AND | stands for OR You are looking for groups whose name start with APZ_ OR APPL_ OR CPZ_PRD_. The syntax gets a bit more complex now: "(&(objectcategory=group)(|(name=APPL_*)(name=APZ_*)(name=CPZ_PRD_*)))" See "Nested Operation" on the SelfADSI page.1 point -
The FileOpen() guess
pixelsearch reacted to jchd for a topic
From what I recall, the leading part of the file is scanned for conformance to one of the UTF8 or UTF16-LE (w/ or w/o BOM) encodings. If ever a byte > 0x7F not introducing a valid UTF8 sequence is found and the file is not valid UTF16-LE, the file is considered codepage encoded, aka ANSI (improper term here). Not mentionned in the help, it seems that if a null byte (0x00) is encountered, then the file is read as binary. And your example shows exactly this. In the script below, the function vd() is a variable dump (not provided here to keep things short). #include <FileConstants.au3> #include <MsgBoxConstants.au3> Opt("MustDeclareVars", 1) Local $hFileOpen = FileOpen("Product.dbf", $FO_READ) If $hFileOpen = -1 Then Exit MsgBox($MB_TOPMOST, "", "Open error") Local $sFileRead = FileRead($hFileOpen) Local $iKeepError = @error, $iKeepExtended = @extended If $iKeepError <> 0 Then Exit MsgBox($MB_TOPMOST, "", "Read error") FileClose($hFileOpen) ConsoleWrite("@extended = " & $iKeepExtended & @crlf) ; 146 (strangely correct) vd($sFileRead, 0, 0, 0) vd(String($sFileRead), 0, 0) vd(BinaryMid($sFileRead, 1, 1)) vd(BinaryMid($sFileRead, 2, 1)) ConsoleWrite(Asc(StringMid($sFileRead, 1, 1)) & " " & _ Asc(StringMid($sFileRead, 2, 1)) & @crlf) ; 48, 120 (correct!) The console output I get is: @extended = 146 Binary (146) 0x03790113030000006100100000000000 ... 6D6E6F7020202020203131312E31311A String (294) '0x037901130300000061001000000000 ... 6E6F7020202020203131312E31311A' Binary (1) 0x03 Binary (1) 0x79 String (3) '121' 48 120 Here you see that the output of FileRead is a binary variant. StringMid forces this binary to be converted to a string. The first character of this string is '0' whose ASCII code is decimal 48. The next character in the string is 'x' whose ASCII code is decimal 120.1 point -
Having all Userids and Passwords in plain text in simple text files isn't very secure, is it? I hope your security requirements are equal to the security provided by this setup1 point
-
Natural Sort issue
pixelsearch reacted to ad777 for a topic
Windows 7 32 bit. AutoIt_Version: 3.3.16.0 $r1 = -1 $r2 = -1 $r3 = 11 point -
Webdriver iFrame nested hell - (Moved)
SkysLastChance reacted to Nine for a topic
Would that be helpful to you ? ConsoleWrite("Frames=" & _WD_GetFrameCount($sSession) & @CRLF) Local $aTag = _WD_FindElement($sSession, $_WD_LOCATOR_ByTagName, "iFrame", Default, True) _ArrayColInsert($aTag, 1) _ArrayColInsert($aTag, 1) For $i = 0 To UBound($aTag)-1 $aTag[$i][1] = _WD_ElementAction($sSession, $aTag[$i][0], "attribute", "name") $aTag[$i][2] = _WD_ElementAction($sSession, $aTag[$i][0], "attribute", "id") Next _ArrayDisplay($aTag)1 point -
#include <Array.au3> Opt("MustDeclareVars", 1) Func Test_1($x) Local $Array = _STCBF_Struct($x) Local $At = '' For $i = 0 To (UBound($Array)-1) Step 1 $At &= $Array[$i] &' - ' ;ConsoleWrite("$Array["& $i &"] = "& $Array[$i] &@CRLF ) Next MsgBox(0x40, "Thread-1", "Added Thread #1" &@CRLF&@CRLF& StringLeft($At,(StringLen($At) -3)) ) EndFunc ;==> _Thread_Start Func Test_2($x) Local $Array = _STCBF_Struct($x) Local $At = '' For $i = 0 To (UBound($Array)-1) Step 1 $At &= $Array[$i] &' - ' ;ConsoleWrite("$Array["& $i &"] = "& $Array[$i] &@CRLF ) Next MsgBox(0x40, "Thread-2", "Added Thread #2" &@CRLF&@CRLF& StringLeft($At,(StringLen($At) -3)) ) EndFunc ;==> _Thread_Start Func Test_3($x) Local $Array = _STCBF_Struct($x) Local $At = '' For $i = 0 To (UBound($Array)-1) Step 1 $At &= $Array[$i] &' - ' ;ConsoleWrite("$Array["& $i &"] = "& $Array[$i] &@CRLF ) Next MsgBox(0x40, "Thread-3", "Added Thread #3" &@CRLF&@CRLF& StringLeft($At,(StringLen($At) -3)) ) EndFunc ;==> _Thread_Start Local $Ax[4] = [100, 'A', 200, 'B'] Local $N = 10 Local $Bx[4] = [300, 'C', 400, 'D'] _Sub_Thread_CallBack_Func("Test_1", $Ax) _Sub_Thread_CallBack_Func("Test_2", $N) _Sub_Thread_CallBack_Func("Test_3", $Bx) MsgBox(0x40, "Thread-0", "## Default_Thread ##") ;################################################################################################################################################# Func _Sub_Thread_CallBack_Func($F, ByRef $P) Local $Px = "", $L = StringLen($P) If IsArray($P) Then For $i = 0 To (UBound($P)-1) Step 1 $Px &= $P[$i] &"," Next $Px = StringLeft($Px, (StringLen($Px) -1) ) $L = StringLen($Px) $P = $Px EndIf Local $H = DllCallbackRegister($F, "int", "DWORD_PTR") Local $S = DllStructCreate("INT; Char["& $L &"]") DllStructSetData($S, 2, $P) DllStructSetData($S, 1, $L) Local $R = DllCall("kernel32.dll", "hwnd", "CreateThread", "ptr", 0, "dword", 0, _ "long", DllCallbackGetPtr($H), "ptr", DllStructGetPtr($S), "long", 0, "int*", 0) ;DllCallbackFree($H) ;Return $R Sleep(10) EndFunc Func _STCBF_Struct(ByRef $x) Local $y = DllStructGetData(DllStructCreate("INT; Char["& DllStructGetData(DllStructCreate("INT; Char[1]", $x), 1) &"]", $x), 2) Local $Ar = StringSplit($y, ',', 2) Return $Ar EndFunc ;################################################################################################################################################# creates a thread and already passes the data in a array.1 point
-
You will have to activate the game ONCE anyway, so just run the code above, then run the game...the minimize it an it should still be running and sending1 point
-
Dll Global SetWindowsHookEx
Gianni reacted to argumentum for a topic
@philpw99, the CRC32's in the ZIP are the same. Likely is the same file, but different names.0 points