Leaderboard
Popular Content
Showing content with the highest reputation on 01/04/2022 in all areas
-
This is not only about bothering, but also about proof of concept. And a proof (for my self) that I can do this .2 points
-
I was looking for a way to embed Windows Media Player into Autoit. I found 2 Windows Media Player UDF's but both of them seem to have used the OCX directly. The problem with using the OCX directly is that the video display size cannot be changed, and it takes the size of the video inherently. @seangriffin created the VLC GUI based on embedding the IE object into the GUI and that seems to work perfectly with Windows Media Player as well and it does not give the resize problem. I built the WMP.au3 around this concept and would like to share it with everybody. Attached is the WMP.au3 and the WMP_Example.au3 where it is used. Feedback is appreciated. This is my first UDF, so please be kind. SudeepJD WMP_Example.au3 WMP.au31 point
-
Why is _ArraySort so broken? Updated 1/9/22 630pm g2g
Earthshine reacted to markyrocks for a topic
Updated 1/4/2022: added pointer sort test, float sort test, double sort test, insort test, enums and a few other utility functions. The .ccp is kinda messy rn. Not too worried about it. Updated 1/9/22 ... I totally missed the fact that the dll wasn't actually included in the files. Duh. Been so busy sry. Its in there now. The files originally on this page are gone It's an obsolete test anyways. I've move far beyond it. Its been replaced with the latest test/example. Sorry I suck and files and editing posts apparently. So what got me started down this road is from another recent thread i'm sure you've all seen it. I don't use autoit that much anymore except for trying to break it or make it do stuff that it doesn't want to, in an effort to improve it if I can. Writing this actually just gave me an idea which is pretty cool. Anyways. It seems that theres a fear of using arraysort bc its so amazingly slow which it is. I was wondering if i could fix that and well.... I did to a small degree. It would need to get alot more complicated from here to actually fix it the write way so that it would be full featured and recognize autoit datatypes and pass that information along and on the dll end it would need some overloads or a "more elegant" solution. That being said all this does is work on integers atm. ## copying the array to a dllstruct takes about 1500 ms ... the dll sort takes about 25 ms. (on my pos 5 year old laptop) copying the resulting sorted struct to a autoit array takes about 1500 miliseconds ## The built in arraysort takes roughly 10x longer of those combined. So simply accessing from the resulting dllstruct will deffinitly save some time. I played around with this for a few hours, tested it many times so that I made sure its all working correctly. anyways I'll post the test script here and attach the source.cpp and header if anyone wants to build it themselves and the dll.1 point -
This is a very simple sample about checking printer status and set its online/offline status.may help those who in need of this issue. $StrComputer="." $obj=ObjGet("winmgmts:\\"&$StrComputer&"\root\CIMV2") $colitems=$obj.ExecQuery("Select * from Win32_Printer") For $objitem In $colitems If $objitem.Caption=="SHARP AR-1808S" Then $a=Int($objitem.Attributes / 1024) If Mod($a, 2)=0 Then MsgBox(0,0,"Printer is online",8) ElseIf Mod($a, 2)=1 Then MsgBox(0,0,"Printer is offline,press 'OK'button To make the printer online ",8) ;core code $objitem.WorkOffline = False $objitem.Put_ ;~~~~~~~~~~~~~~~~~~~~~~ MsgBox(0,'','Printer is online now.') Else MsgBox(0,0,"unknown status",8) EndIf EndIf next1 point
-
WebDriver UDF - Help & Support (III)
TheDcoder reacted to seadoggie01 for a topic
Did you forget to escape the backslash in your RegEx? regex101 says it's an error Edit: And it's broken if selected comes before the value Edit2: Per the HTML Standard (?) a closing </option> tag isn't even required I'd disagree without defining best. Your solution is the fast and easy, while not relying on a profile is probably better practice1 point -
Hello everyone, Today I would like to introduce ImageRE.au3 UDF, this is a UDF about ImageSearch that I just finished writing. Sincere thanks to @Danyfirex for helping me in completing this UDF. This UDF is written based on the Image Recognition Library (ImageRecognition.dll), homepage: https://www.3delite.hu/Object Pascal Developer Resources/ImageRecognitionLibrary.html Image Recognition Library (IRL) is a component for use in Win32 and Win64 (2K/XP/Vista/7/8/10) software with a purpose to provide image recognition functionality, that is compare two pictures if they are the same or similar or find a smaller picture in a bigger picture with difference tolerance. License: IRL in shareware and commercial software? You can use this component in your free programs with a freeware license. If like it and use it for shareware or commercial software (or make money with it in any way) you have to buy a shareware or commercial license. Commercial license also allows the usage of the component inside a commercial company. Features: - Loading a picture from local disk - Loading a picture from HBitmap (by _ScreenCapture_Capture, _ScreenCapture_CaptureHwnd, IR_WinCapture...) - Loading a picture from memory - Exact, relative ARGB and AHSL with alpha channel support - ColorTolerance, PixelTolerance support - Pre-process images with 6 different resamplers - Multi-threaded processing - Multiple match support - OpenCL accelerated search - Rotate search support - Stretch search support - A fully multi-threaded loading queue functionality for batch loading of pictures - A fully multi-threaded search queue functionality for batch processing with support of parallel CPU-OpenCL processing a the same time - Full unicode support - Platforms: Win32 and Win64 About ImageRE UDF: Includes 8 main functions that I have summarized from IRL, ensuring all the features that IRL brings. Some example images: Download ImageRE.au3 UDF + Examples + IRL (Size 7Mb): https://1drv.ms/u/s!AhiIbjk1VKtOfEwStW1Sp0WGR3Q I'm not very good at English. So the UDF notes and examples are mostly translated using Google Translate. So there will be explanations that are very confusing or obscure. I hope you understand. 😔1 point
-
@mLipok I just realized that your theme is only related to code highlighting, I originally thought it might be a full style like the ones TheSaint made Your update did change the highlighting colour By the way, I suggest removing the advanced options from the header: @advanced dropdown bg-selected "Background image" { image1 "Default image 1" <<<EOT url(https://mysite.com/default-background-1.jpg) EOT; image2 "Default image 2" <<<EOT url(https://mysite.com/default-background-2.jpg) EOT; custom "Custom background" <<<EOT var(--bg-custom, none) EOT; noBG "None" <<<EOT none EOT; } @advanced text bg-custom "Custom Background; include url()" "url()" They don't seem to be of any use.1 point
-
WebDriver UDF - Help & Support (III)
seadoggie01 reacted to TheDcoder for a topic
Nice trick, but we also need to keep the current version as it is more robust, the RegEx might fail in edge cases, there's a saying about using RegEx with HTML I would implement this with a flag to choose the method, and in my opinion the default should be the original method because it's accurate and has less chance of failing. If someone wants speed they can set $bFast = True to use the RegEx method1 point -
Why is _ArraySort so broken? Updated 1/9/22 630pm g2g
markyrocks reacted to pixelsearch for a topic
Yes it fixed it, thanks ! This dll could be useful at times and I'm keeping it on my computer. I have to tell that before using it the 1st time, I uploaded it to VirusTotal (it's a reflex everyone should have before using a new dll) : so no virus found (out of 66 AV) as shown in the pic below (re-checked right now), great ! I just added 2 ByRef when calling both functions, also changed some variable names in them and got rid of some + 1 ... - 1, trying to make the 2 functions "matchable when read" as most as possible (lol) but it's just cosmetic : ;===================================== Func ArrayToStruct(ByRef $arr) Local $sz = UBound($arr) Local $struct = DllStructCreate("int[" & $sz & "]") For $i = 0 To $sz - 1 DllStructSetData($struct, 1, $arr[$i], $i+1) Next Return $struct EndFunc ;==>ArrayToStruct ;===================================== Func StructToArray(Byref $struct, $sz) Local $arr[$sz] For $i = 0 To $sz - 1 $arr[$i] = DllStructGetData($struct, 1, $i+1) Next Return $arr EndFunc ;==>StructToArray Just a question. Let's forget strings. Would it be hard to have the dll take care of all numeric variables (double) instead of integers only ? If it's too hard then please forget it and we'll stick with the dll you already provided. Thanks.1 point -
Today I was working on dark Theme on the forum with my Chrome browser, and here are my effects: The code : ; #FUNCTION# ==================================================================================================================== ; Author ........: Cephas <cephas at clergy dot net> ; Modified.......: Jos - added $iStart parameter and logic, Ultima - added $iEnd parameter, make use of _ArrayToString() instead of duplicating efforts; Melba23 - added 2D support ; =============================================================================================================================== Func _ArrayToClip(Const ByRef $aArray, $sDelim_Col = "|", $iStart_Row = -1, $iEnd_Row = -1, $sDelim_Row = @CRLF, $iStart_Col = -1, $iEnd_Col = -1) Local $sResult = _ArrayToString($aArray, $sDelim_Col, $iStart_Row, $iEnd_Row, $sDelim_Row, $iStart_Col, $iEnd_Col) If @error Then Return SetError(@error, 0, 0) If ClipPut($sResult) Then Return 1 Return SetError(-1, 0, 0) EndFunc ;==>_ArrayToClip And screeenshot: https://userstyles.world/style/2609/autoit-forum-darkstyle2 @-moz-document domain("autoitscript.com") { pre.geshi { background: rgb( var(--theme-area_background) ); } .kw1{ color: mediumpurple !important; /*keywords */ } .kw2{ color: yellow !important; /*function names */ } .kw3{ color: violet !important; /*function names */ } .st0{ color: mediumaquamarine !important; /* strings */ } .re0 { color: white !important; /* variables */ } .sy0 { color: lightsalmon !important; /* operators */ } .br0 { color: orange !important; /* bracketes */ } .nu0 { color: orangered !important; /* numbers */ } }1 point
-
Why is _ArraySort so broken? Updated 1/9/22 630pm g2g
Leendert-Jan reacted to jchd for a topic
You're right, _ArraySort is an arthritic teethless sleepy dog with only one eye and three legs. I wanted to write a sort function in AutoIt working similar to C qsort(), that is: relying on a user-supplied collation function. That's the correct approach since only the user can write such collation suited to the array dimensions, datatypes and possibly complex collation (sort) criterions he needs to deal with. Else we see a number of useless parameters, endless variations of the _ArraySort function itself where users have to implant their collation right in the middle of the sort functions inside his own derivation of _ArraySort(). More worrisome is the fact that all this has to be done again for arrays with 1, 2, 3, ..., 24 dimensions. And done again if one column changes from string to integer, or any type change. And done again if the multi-column sort criterion change. Experienced users have learn to be hurt be these limitations and often have to write weird code and use unnatural way to store their data just because they know in advance how sorting an array the way they would have found natural is painful. That's why the dog badly needs a surgeon. For an AutoIt qsort() to work efficiently (in AutoIt), we need: an efficient way to declare an array programmatically regardless of its dimensions, an efficient way to extract/replace a multidimensional row of an array regardless the dimensions of the array. Ideally we'd love to have a way to extract/replace a multidimensional block out of an array regardless the dimensions of the array. We have none of these features. The way to circumvent the issue is either to convert back and forth every indivudual data cell to something a decent language can process, just like you did, or leave the dead body spoil rotten. It's a pity as it would only need few additions to completely change the game, for instance: Execute("Local $aNew[$n0][$n1][$n2][$n3][$n4]") ; create a new 5D array Local $aExtract = $aBigOne[{$i}] ; extract multidimentional row $i off array ... ; deal with $aExtract $aBigTwo[{$k}] = $aExtract ; assign multidimentional row in array row $k1 point -
start ms-settings:
BlackLumiere reacted to BrewManNH for a topic
Run(@ComSpec & " /c start ms-settings:")1 point -
[Solved]Change active display screen
seadoggie01 reacted to ChrisBair for a topic
I would recommend using http://12noon.com/?page_id=801 point -
I use: _WD_CapabilitiesAdd('args', 'user-data-dir', 'C:\Users\' & @UserName & '\AppData\Local\Google\Chrome\User Data\Default') _WD_CapabilitiesAdd('args', '--profile-directory', Default) But it usually works fine. It usually had issues when I manually stopped the script and then killed the ChromeDriver.exe process.0 points