Leaderboard
Popular Content
Showing content with the highest reputation on 05/18/2020 in all areas
-
Hi everyone, Some good news for you among all the gloom of these virus-ridden times: Nine, Subz and Danyfirex have accepted the invitation to become MVPs. Please join me in congratulating them on their new status in our community. Keep safe out there, M233 points
-
While negative ints in keys don't hard crash in latest beta anymore, version 3.3.15.1 allowed that and worked: Local $m[] $m[-5] = "aaa" _ArrayDisplay(MapKeys($m)) ConsoleWrite($m[-5] & @LF) >Running:(3.3.15.1):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\jc\Documents\AutoMAT\tmp\t.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. aaa +>04:24:08 AutoIt3.exe ended.rc:0 +>04:24:08 AutoIt3Wrapper Finished. >Exit code: 0 Time: 4.2722 points
-
Features: Create modern looking borderless and resizable GUIs with control buttons (Close,Maximize/Restore,Minimize, Fullscreen, Menu) True borderless, resizeable GUI with full support for aerosnap etc. Many color schemes/themes included. See MetroThemes.au3 for more details. 3 type of Windows 8/10 style buttons. Modern checkboxes, radios, toggles and progressbar. All buttons, checkboxes etc. have hover effects! Windows 10 style modern MsgBox. Windows 10/Android style menu that slides in from left. Windows 10 style right click menu Credits: @UEZ, for the function to create buttons with text using GDIPlus. @binhnx for his SSCtrlHover UDF Changelog: Download UDF with example:1 point
-
GUICtrlSetResizing on UDF (CreateWindowEx) created controls
argumentum reacted to matwachich for a topic
Hi! Would it be possible to provide a way to set resizing of UDF GUI controls just like standard AutoIt controls??? This would absolutly great! It will be possible to use custom controls and make them follow GUI size just like standard ones. This idea came to me because I'm currently making a wrapper for https://www.mctrl.org/ In a desesperate move, I tried to create a dummy label with resizing flags I needed, then creating a custom control with the same CtrlID of the label 😛 But, it seems there have to be a way to make the AutoIt WindowProcedure recognizes the custom control...1 point -
I wrote this because I wanted a simple way to compress data in memory instead of files. And because rasim has done an excellent job with his 7Zip udf that handle files I did not include any file support. Following functions exists: _Zlib_Version() _Zlib_Shutdown() _Zlib_Startup($Filename = "zlibwapi.dll") _Zlib_CalculateAdler32($DataPtr, $DataSize) _Zlib_Uncompress($CompressedPtr, $CompressedSize, $UncompressedPtr, $UncompressedSize) _Zlib_Compress($InBufferPtr, $InBufferSize, $OutBufferPtr, ByRef $OutBufferSize, $CompressionLevel = $Z_DEFAULT_COMPRESSION) _Zlib_CompressBinary($binary, $CompressionLevel = $Z_DEFAULT_COMPRESSION) _Zlib_UncompressBinary($compressedbinary, $UncompressedBinaryLength) More info in the UDF. Example: #include "zlib udf.au3" _Zlib_Startup() $bin=StringToBinary("hahahahahahahahahahahehe") $binlen=BinaryLen($bin) $compressed=_Zlib_CompressBinary($bin) $uncompressed=_Zlib_UncompressBinary($compressed,$binlen) MsgBox(64,BinaryToString($bin),"Original:"&@CRLF&$bin&@CRLF&@CRLF&"Compressed: "&@CRLF&$compressed&@CRLF&@CRLF&"Uncompressed: "&@CRLF&$uncompressed) _Zlib_Shutdown() Download: zlib_udf.au3 Previous downloads: 33 Zlib dll download: http://www.zlib.net/ Ps. If anyone want to continue adding functions to this, go ahead I won't probably work anymore one this anyway1 point
-
Issue with MSI Uninstall
Earthshine reacted to Subz for a topic
I think the issue is that your script isn't elevated, RunAs doesn't elevate the script, as EarthShine pointed out you would require #RequireAdmin at the top of your script, but that will prompt for username and password, before running the script. So you would need to use something like Task Scheduler or PSExec to elevate as a non-admin (see post attached). There are also tools like PDQ Deploy or Lansweeper where you can create full package deployments across your network.1 point -
[SOLVED] Permute a string by changing it's case
Colduction reacted to TheXman for a topic
You're welcome. It was a fun little exercise with binary bits as @Dan_555 originally pointed out.1 point -
Give this a spin: example() Func example() Const $ALPHA_STRING = "aBc" Local $aChars = StringSplit($ALPHA_STRING, "") Local $iNbrOfChars = $aChars[0] Local $sString = "" For $i = 0 To (2 ^ $iNbrOfChars) - 1 ;Loop thru iterations (base2 000, 001, 010, ... 111) $sString = "" ; Initialize string For $j = 0 To $iNbrOfChars - 1 ; Loop thru chars If BitAND($i, 2 ^ $j) Then ; If bit $j of $i is 1 $sString &= StringUpper($aChars[$j+1]) ; Append uppercase char to string Else ; Else $sString &= StringLower($aChars[$j+1]) ; Append lowercase char to string EndIf ; EndIf Next ; End char loop ConsoleWrite($sString & @CRLF) ; Display string iteration Next ;End iteration loop EndFunc1 point
-
[SOLVED] Permute a string by changing it's case
Colduction reacted to Dan_555 for a topic
Someone wrote a function for the binarynumbers, here and here is what you can do: #include <String.au3> $y=0 $t="abc" for $x=$y to $y+7 $m="" $z=DecToBase($x,2) $z=_StringRepeat("0",3-StringLen($z)) & $z ;ConsoleWrite($z & @crlf) For $j=3 to 1 step -1 $k=StringMid($z,$j,1) $l=StringMid($t,4-$j,1) If $k=1 Then $m=$m & StringUpper($l) Else $m=$m & $l EndIf Next ConsoleWrite ($m & @CRLF) Next Func DecToBase($iInt, $iBase) ; for bases 2 to 9 Local $iRem, $sRet = '' While $iInt > $iBase -1 $iRem = Mod($iInt, $iBase) $sRet = $iRem & $sRet $iInt = Int(($iInt - $iRem) /$iBase) WEnd Return $iInt & $sRet EndFunc ;==> DecToBase1 point -
[SOLVED] Permute a string by changing it's case
Colduction reacted to jchd for a topic
Enough for me.1 point -
How can I determine the number of fragments in a file?
argumentum reacted to Exit for a topic
Just a code snipped to show what i want: Local $File = "C:\Windows\System32\Tasks\Microsoft\Windows\Defrag\ScheduledDefrag" MsgBox(64+262144, Default, "the Fragmentscount of "&$File& " is "&_GetFragmentsCount($File),0) Func _GetFragmentsCount($File) Local $Fragmentscount=0 ;~ please insert the magic code here Return $Fragmentscount EndFunc1 point -
Well, reading the url from the autoit code, the desired output should be: when i look on these numbers, then i notice a pattern. Binary numbers ! (% here represents binary number) 0 = %000, 1=%001 , 2=%010, 3=%011, 4=%100 ... 7=%111 the 1 in this example moves from right to left, but in the output, it moves from left to the right. so basically, one needs to loop through each of the numbers in the binary format, and to apply upper case for each binary 1 . The string is converted to lowercase at the beginning, so the first case would be "abc" i hope this helps a bit.1 point
-
WM_COPYDATA return
argumentum reacted to KaFu for a topic
Using COM for IPC and triggering events without a loop but via ObjEvent() could be a good method too. Edit: Or do something like this in a loop and look for changes / reset the var when read.1 point -
Indeed, I recall working with negative integers in 3.3.15.x, it certainly looks like the latest beta version has a new algorithm for storage which is not capable of handling negative integers, @Jon Any comments on this matter? @TheSaint Your silly suggestions are certainly not helping my brain think of a proper name1 point
-
zLib (Deflate/Inflate/GZIP) UDF
argumentum reacted to mLipok for a topic
Just checked AutoIt 3.3.15.3 Beta.... works fine with x64.1 point -
Maybe have a single "host" script that communicates with a bunch of "worker" scripts. Each worker script could control it's own browser session. Check out this UDF --1 point
-
WebDriver UDF - Help & Support (II)
seadoggie01 reacted to Danp2 for a topic
@sarge Maybe I'm just being extra dense in my old age, but I'm having difficulty understanding the issue -- Which commands are causing the slowdown? Have you tried controlling multiple tabs by switching between them with _WD_Window or _WD_Attach? If you are trying to reduce run times, why throw in the extra Sleep commands?1 point -
1 point
-
It is still a mystery to me how the OP got the regex to find the end of a stream. I completely rewrote the code. I have a slightly different requirement, I want to get text data out of a stream. I tried to cut down on the regex functions. Since the regex selfdestructs on hitting a null byte in most streams and I move the pointer after each found stream, the function is not that expensive I think. On my four year old laptop it chews through 8 megabytes in 5-6 seconds. This code doesn't drill down into the tagging, it just searches for a typical start of a stream with a length declaration, and then trusts that length declaration to find the end of the stream. The regex repeats on the rest of the data that is past the found stream. This probably is a dirty way to do it, but it seems to work for me with a variety of pdfs. ; Find Streams within a pdf and return contents assuming text string #include <Array.au3> #include "zlib_udf.au3" Dim $stream_Array[1] Dim $streamtext Dim $x _Zlib_Startup("zlib1.dll") $stream_Array = GetPdfStreamContent(FileOpenDialog("select pdf File", @MyDocumentsDir, "Adobe PDF Files (*.pdf)")); calls the function that extracts the streams For $x = 1 To UBound($stream_Array) - 1 $Streaminput = BinaryToString(_Zlib_UncompressBinary($stream_Array[$x], 0)) If StringIsASCII ( $Streaminput ) Then $streamtext &= $Streaminput Next FileWrite( "result.txt", $streamtext ) Func GetPdfStreamContent($fullfilename) ;Finds streams within a PDF. Returns an Array with the streams starting at $strm_Array[1] Local $start_obj = '(?i)(?s)\d* \d* obj[\n|\r]<<.*/Length (\d+).*>>\n*stream\r*\n' ;this is regex, (\d+) will return length, @extended the position of the stream Local $offset = 0 Local $strm_Array[1] $sData = FileRead($fullfilename) While 1 ;Find the stream via regex. We get the length declaration since the regex will die at null bytes, making it impossible to find endstream tags $result_array = StringRegExp(StringTrimLeft($sData, $offset), $start_obj, 1) If @error = 0 Then ;A stream with length declaration was found $offset += @extended ;store stream in array _ArrayAdd($strm_Array, StringMid($sData, $offset, $result_array[0])) ;sometimes the stream length is wrong due to missing @cr at start, this will leave a @LF at the end. We delete it here $strm_Array[UBound($strm_Array) - 1] = StringStripWS($strm_Array[UBound($strm_Array) - 1], 2) ;Advance offset past the end of the stream, so that the regex won't run into a null byte prior to the next stream $offset += StringLen($strm_Array[UBound($strm_Array) - 1]) Else ExitLoop EndIf WEnd Return $strm_Array EndFunc ;==>GetPdfStreamContent I guess one could also use it to extract image content, depends on how you handle the returned data.1 point