Leaderboard
Popular Content
Showing content with the highest reputation on 07/26/2021 in all areas
-
https://www.autoitscript.com/autoit3/files/archive/autoit/ RunErrorsFatal has been removed with version 3.2.11.03 points
-
Alternative to IE.au3 - Need some guidance
SkysLastChance and 2 others reacted to water for a topic
The WebDriver UDF comes with a demo script. Further examples can be found in this thread.3 points -
(Poll) What features do you wish you had in AutoIt?
TheDcoder and one other reacted to JockoDundee for a topic
Nah. It's a hidden utility from @Earthshine's bootleg of Windows11. You run it right after you do something stupid, like decide you want every font known to man installed because wtf.2 points -
(Poll) What features do you wish you had in AutoIt?
JockoDundee and one other reacted to RTFC for a topic
It's a template library creating a localised, unnamed abstraction layer, so basically like Execute, but able to handle multiple lines of code, local vars, bound arguments, and such). Quite handy. You made me very happy. Be careful with that; that's how I got myself married. Please implement my personal favourite: tribooleans (False, Undecided, True). Think of how humanly waivering your codes could be (I might show you a GUI..., or not, or later, if you're good, however...). You know that old Monty Python song: Is that part of Weight Watchers? Can i send my sister?2 points -
(Poll) What features do you wish you had in AutoIt?
TheSaint and one other reacted to JockoDundee for a topic
FYI, debloater.com is available2 points -
I don't recall seeing Execute in your code, but I will surely provide some alternative which would make arrays more "manipulable". Interesting, but they are fundamentally incompatible with dynamic typing, so unfortunately you will have to live with whatever non-OOP objects that end up in ECI. No problem! I see, but I don't think AutoIt uses any kind of bytecode, perhaps the interpreter runs purely based on the parser without any intermediate? This would explain why it takes a very large overhead. In my opinion the overhead shouldn't be too big if the instructions are ready in advance, I would expect a slow down of 10x at max, so it shouldn't take hours like in AutoIt. I mean, I don't want to limit my imagination I'd want to be able to atleast run it on SoC type computers, like RPi and mobile phones, and perhaps some advanced micro-processors. Of course, that goes without saying, I'd be implementing all the labour-intensive tasks in C and provide functions from them. As for a compiler, I think we can target LLVM and have it translate the IR into actual machine code instead, it is a very mature platform which supports many targets, so we get those benefits for free I am imagining something like this Parser -> Byte-code (ECI-specific IR) -> LLVM IR -> Whatever LLVM can give you Initially I'd be implementing an interpreter which will work with the AST, and after there is enough momentum we can switch to bytecode, don't want to start too quick and mess up the bytecode stuff before we have a working proof of concept. Once the project is mature enough we can start thinking about LLVM, JIT and all that fancy stuff Sorry about being so dismissive about it, I initially thought you were suggesting a more direct integration. I appreciate your suggestion, I will surely be implementing the useful utility functions you mentioned, we will see to what degree we can adopt them Anyway, how does a library implement a language feature like lambdas? Is it all just a bunch of macros? Since functions would be first-class features, you could use them as a value in any place. Maybe I can make "constructors" possible by implementing sub-functions which inherit the parent function's calling context, effectively adding state to it . No inheritance system for now... unless I change my mind for some reason or if people really ask for it. No doubt, but they GPU code you mentioned is an extreme case in my opinion, I don't really see people using ECI to write efficient graphics stuff, I am sure @UEZ and co would happily explore the limits, but not serious stuff really. The multi-threaded system I am imagining would be baked into the language itself, not like an after-thought as it is usually implemented in many language. All of the locking, barriers, synchronization etc. would be handled internally, your MT code would look just like the ST code, but it will block when reading locked variables etc. This shouldn't be an issue for a high-level scripting language like AutoIt or ECI. Thank you! I am absolutely going to need them if I am ever going to lead this project towards fruition I like his take on objects too, also see on my thoughts above about implementing "constructors" via sub-functions and inheritance. Nah, not really, JS isn't a multi-threaded language, but it has the ability to switch the context of execution whenever it needs to, so it creates an illusion. It is a nice way to implement non-linear code but it doesn't really work if you don't have an event-based approach. Promises are just wrappers around the event-based stuff in JS, they are handy but I would never use them outside JS. If I am being pedantic I could say you can do that with OnEvent mode, I use it in one of my programs (ProxAllium). Multi-threading is seldomly used in scripting, but having it available can be a blessing! Imagine myself when I had to implement a complex scheduler in AutoIt, all single threaded 😭 No problem about late replies. It doesn't effect performance directly, but I get your point, you don't want there to be extra effort for only a little less bloat. I am in the same boat (pun unintended), I'd only look into this when it is time, not something I am racing to implement in v1 -- Damn, did this post beat my previous post's record?2 points
-
MultiProcess V3 [NO FUNC LIMITS]
argumentum reacted to RTFC for a topic
Please study the difference between multi-threading and multi-processing. This is NOT multithreading!1 point -
; Find the element $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//body") ; Retrieve it's innerText attribute $sInnerText = _WD_ElementAction($sSession, $sElement, "Attribute", "innerText") You have the option of running the browser in headless mode, which would keep it always hidden. Search the forum or use Google for more details. 😉1 point
-
Take a look at @Danp2 's webdriver-udf-w3c-compliant-version-042820211 point
-
Writing binary to a file
66Gramms reacted to JockoDundee for a topic
There's another way to do it without writing all the variables one after another - you create a struct that contains the datatypes and the order of the vars, then assign them, then write the struct. Take a look here at @Nine's struct based solution to a slightly different problem, and if its not clear how to apply it, let us know.1 point -
LOL. I am giving you the Word Wall prize of the day. Congratulation on all those Wurdles. P.S. For those who don't know, a Wurdle is a Word Wall broken down into little hurdles you need to leap over to get to the end. Breaks down the Word Wall for easier consumption. P.S.S. Maybe we should accuse you of Post Bloat.1 point
-
OK... so please read this and our Forum rules next: Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team1 point
-
(Poll) What features do you wish you had in AutoIt?
TheDcoder reacted to seadoggie01 for a topic
This looks the same to me. Someone please DM the difference. My poor dyslexic brain hurts now Edit: Oh, wait, this was a joke wasn't it, lol1 point -
Did you mean recurse?1 point
-
(Poll) What features do you wish you had in AutoIt?
TheDcoder reacted to seadoggie01 for a topic
Java's objects, but only because I know them much more. I'm sure with a bit of time I won't mind JS's objects. And I probably would mind JS's objects less if the IDE found more errors, but that's another story. Edit: And your knowledge on Java vs JS objects seems to be correct... as far as my knowledge goes @jchd Correct me if I'm wrong, but with the style of array TheDcoder has mentioned, an array element will contain another array. So you could recurse through each array's elements to sort them. Something like this: Function _SortNDimensionArray($aArray, $vFunc) ; For each element For $i=0 To UBound($aArray) - 1 ; If the element is an array If VarGetType($aArray[$i]) = "Array" Then ; Sort the inner array _SortNDimensionArray($aArray, $vFunc) EndIf Next ; Actually sort the array Call($vFunc, $aArray) EndFunction (P.S. Recurse is a word, right? Wiki has it listed, but Chrome says it's a typo)1 point -
Using FF.au3 + MozRepl in 2021
Musashi reacted to noellarkin for a topic
Just tested it, FF.au3 works out-of-the-box with all the browsers I mentioned The only function that doesn't seem to work (for obvious reasons) is __FFStartProcess() but that's not an issue, I can use ComSpec to run the browser process. Thank you so much for this amazing UDF! Regarding the lurking, ah, well, the thing is, I'm just a hobbyist, I don't code full-time, and over the past year I've been learning AutoIT just because it saves me so much time in data-entry work. And every time I wanted to join the forum I would just get intimidated by all the pros and the high level at which you guys are developing libraries here. Finally decided to join today, now that I have something (albeit something very minor) to contribute :)1 point -
Writing binary to a file
66Gramms reacted to JockoDundee for a topic
The problem with it not being binary, in the way you want it, is simple: When you concatenate a binary variable with a string it becomes a string again, then when Binary runs on it, it gets encoded as text. This line is the problem: FileWrite($hTmpFile, Binary($LogIndex & ";" & $InfoCount & ";" & $warningCount & ";" & $errorCount)) If instead you try: FileWrite($hTmpFile, Binary($LogIndex)) Assuming that $LogIndex is a Integer, then you will file a four-byte file containing a binary written integer. As for the file overwrite problems, your code works fine with me, and either creates or overwrites as appropriate. However I do not know the value of your $tmpPath variable, maybe there is a directory permission problem?1 point -
What happens if you run the following example ? Does the overwrite fail or not ? #include <FileConstants.au3> #include <MsgBoxConstants.au3> ; fake data, since real values were not specified :-) Local $sInfo = "@Logdata", $LogIndex = 16, $InfoCount = 127, $WarningCount = 255, $ErrorCount = 1024 Local $hFileOpen Local $sFilePath = @ScriptDir & "\fdnTmp.bin" Local $sData = $sInfo & ";" & $LogIndex & ";" & $InfoCount & ";" & $WarningCount & ";" & $ErrorCount Local $dBinData = Binary($sData) MsgBox(BitOR($MB_SYSTEMMODAL, $MB_ICONINFORMATION), "Output :", $sData & @CRLF & $dBinData & @CRLF & "IsBinary = " & IsBinary($dBinData)) ; Delete file (in case it exists) : Local $iFileExists = FileExists($sFilePath) If $iFileExists Then MsgBox($MB_SYSTEMMODAL, "", "The file exists and will be deleted." & @CRLF & "FileExist returned: " & $iFileExists) Else MsgBox($MB_SYSTEMMODAL, "", "The file doesn't exist." & @CRLF & "FileExist returned: " & $iFileExists) EndIf FileDelete($sFilePath) ; Create a testfile -> @ScriptDir & "\fdnTmp.bin" $hFileOpen = FileOpen($sFilePath, $FO_OVERWRITE) If $hFileOpen = -1 Then Exit MsgBox(BitOR($MB_SYSTEMMODAL, $MB_ICONERROR), "", "1. ERROR : FileOpen()") FileWrite($hFileOpen, "Testfile") If @error Then MsgBox(BitOR($MB_SYSTEMMODAL, $MB_ICONERROR), "", "1. ERROR : FileWrite()") FileClose($hFileOpen) ; Overwrite existing file : $hFileOpen = FileOpen($sFilePath, BitOR($FO_BINARY, $FO_OVERWRITE)) If $hFileOpen = -1 Then Exit MsgBox(BitOR($MB_SYSTEMMODAL, $MB_ICONERROR), "", "2. ERROR : FileOpen()") FileWrite($hFileOpen, $dBinData) If @error Then MsgBox(BitOR($MB_SYSTEMMODAL, $MB_ICONERROR), "", "2. ERROR : FileWrite()") FileClose($hFileOpen)1 point
-
You know exactly what kind of reaction you will get from Melba23 when you insult me or the dev team. You know it, and you do it anyway. You might not have intended it as an explicit insult, maybe even a joke, or maybe just a thoughtless blunt statement of fact. But based on previous and repeated comments in the past that's pretty much the only way it will be read. And Melba23 has made it quite clear that he's not putting up with it anymore and I can understand that. I've got a week or two of holiday and AutoIt dev time planned now and I'm not going to waste it on these distractions - that's why I'll personally tend to ignore these threads.1 point
-
(Poll) What features do you wish you had in AutoIt?
TheDcoder reacted to JockoDundee for a topic
Just came across this 7yr old “debate” over the use of dot notation with structs, and worries about the potential for misuse. Interesting… <spoiler alert - it doesn’t end well>0 points