Yaerox Posted November 20, 2023 Posted November 20, 2023 2 minutes ago, Musashi said: As far as I know, this UDF works with datatype Maps and therefore requires AutoIt version 3.3.16.1 or higher. Thank you Sir!
TheDcoder Posted November 20, 2023 Posted November 20, 2023 Or you can also use an older Beta version if needed. EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
seangriffin Posted April 1 Posted April 1 Any reason for having $s_String as "ByRef" in _JSON_Parse ? I have a use case for minimal script, and wish to embed the JSON string directly in the _JSON_Parse such as $search = _JSON_Parse('{"name":"Sean"}') $s_Type = $search.name I took the "ByRef" keyword out of _JSON_Parse and seems to work? Cheers, Sean. See my other UDFs: Chrome UDF - Automate Chrome | SAP UDF - Automate SAP | Java UDF - Automate Java Applications & Applets | Tesseract (OCR) UDF - Capture text from applications, controls and the desktop | Textract (OCR) UDF - Capture text from applications and controls | FileSystemMonitor UDF - File, Folder, Drive and Shell Monitoring | VLC (Media Player) UDF - Creating and controlling a VLC control in AutoIT | Google Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoIT | SAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBox | eBay UDF - Automate eBay using the eBay API | ChildProc (Parallel Processing) UDF - Parallel processing functions for AutoIT | HyperCam (Screen Recording) UDF - Automate the HyperCam screen recorder | Twitter UDF - Automate Twitter using OAuth and the Twitter API | cURL UDF - a UDF for transferring data with URL syntax See my other Tools: Rapid Menu Writer - Add menus to DVDs in seconds | TV Player - Automates the process of playing videos on an external TV / Monitor | Rapid Video Converter - A tool for resizing and reformatting videos | [topic130531]Rapid DVD Creator - Convert videos to DVD fast and for free | ZapPF - A tool for killing processes and recycling files | Sean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoIT | Sean's GUI Inspector - A scripting tool for querying GUIs | TransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey Planner | Automate Qt and QWidgets | Brisbane City Council Event Viewer - See what's going on in Brisbane, Australia
AspirinJunkie Posted April 1 Author Posted April 1 (edited) That had performance reasons. With a classic ByRef, large strings have to be duplicated when they are transferred. As the function also works recursively, this would take place several times and would have a corresponding impact on performance. Important: “Would have”. In fact, AutoIt has quite obviously built in a kind of COW mechanism. This means that a copy is not created automatically, but only when the content is actually changed in the function. However, I do not know this with certainty but only deduce it from the performance behavior. The important point is: ByRef has no (more?) influence on the performance of the _JSON_Parse() function. So the recommendation would actually be to remove ByRef to enable direct string inputs. Which I have just done myself and adapted the repository accordingly. Edited April 1 by AspirinJunkie SOLVE-SMART 1
Nine Posted April 1 Posted April 1 (edited) Once you are confortable with your script, you can remove au3check (or compile, or run from Explorer) then you can use direct string even with ByRef. #AutoIt3Wrapper_Run_Au3Check=n Func Test(ByRef $sString) MsgBox(0, "Test", $sString) EndFunc Test("This is a test") Meanwhile, you can fool au3check by having a wrapper of the original (included) function. Since au3check is a single pass process, it won't detect if you use it like this : Func Test(ByRef $sString) MsgBox(0, "Test", $sString) EndFunc TestEx("This is a test") Func TestEx(ByRef $sString) Test($sString) EndFunc That way you still get the benefit of ByRef all the time... Edited April 1 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now