Jump to content

redrider81

Active Members
  • Posts

    47
  • Joined

  • Last visited

redrider81's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thank you so much for the work you have done here. THis is exactly what I was looking for, and I am so glad I did not begin work until I found this. It will be the basis for my entire application.
  2. I have taken a look at GUICtrlCreateListView and the Table.UDF created by AndyBiochem (great job). I can't see any sign or mention of whether or not there is any way to build a table or grid view where the data in the boxes can be updated. I also don't see anywhere that says they are read only, so I am not sure. Thanks to anyone who can confirm my assumption that it's not possible to edit any grid or table view in AutoIt.
  3. Good question, and one I had thought about. I was just going to ignore them for my implementation because the only methods my AutoIt objects have are methods that save and retrieve data from the file system, and the only thing I'm doing with JSON objects is sending/receiving the properties. I don't have any dynamic JS methods to deal with. Thats fortunate... because to deal with the methods the proper way, would require something crazy, like creating a library that actually translates javascript functions to autoit functions and back. No way Jose. If I were to do that, I would more likely just do the program using pure OO_JSON, and make my methods JS methods, and not even using AutoIt objects or functions. To be honest, I would have done this already, but I don't know Javascript. I also was uncertain if dynamic JS methods in the OO_JSON framework could do all the same things that custom functions can do with AutoIt Objects.
  4. Can anyone from the core team indicate if there is an elegant/easy method to do one of the following: Convert object directly to JSON string? Convert an object to any format of string? Return the properties of the object as an array or delimited string? Return the class name of the object created as a string? I'm trying to exchange my objects with ozmikes OO_JSON.au3 UDF . Thanks in advance.
  5. A perfectly acceptible workaround came to me , but of course only after I posted the question in the forum (See below). However, the question still warrants an answer however if anyone has time. I'm sure this could become an undesirable workaround in some cases. Func _FolderHolder($sPath = @ScriptDir, $sId = "Folder1") Local $oClassObject = _AutoItObject_Class() With $oClassObject .Create() .AddProperty("path", $ELSCOPE_PUBLIC, $sPath) .AddProperty("id", $ELSCOPE_PUBLIC, $sId) .AddProperty("_self", $ELSCOPE_PRIVATE, $sPath & "\" & $sId) EndWith Return $oClassObject.Object EndFunc
  6. Can someone tell me if the following is possible: Set a property equal to the result of an expression based on the values of other properties (upon instantiation)? The example below doesn't work, but I think it would be the most direct way to achieve my goal if it could work. Ideally, _self property should always be correct and accessible immediately after instantiation, without any additional manual commands required to set it. I've thought about creating getter and setter methods, but even then you would need two commands, one to create the object, one to populate the _self property. Example: Func _FolderHolder() Local $oClassObject = _AutoItObject_Class() With $oClassObject .Create() .AddProperty("path", $ELSCOPE_PUBLIC, @ScriptDir) .AddProperty("id", $ELSCOPE_PUBLIC, "Folder1") .AddProperty("_self", $ELSCOPE_PRIVATE, $oClassObject.path & "\" & $oClassObject.self) EndWith Return $oClassObject.Object EndFunc
  7. Has anyone tested this with Microsoft Azure SQL?
  8. You are right of course, an all-in-one UDF would be a bad idea. Instead, as mLipok suggested: a handful of demo scripts that include the "Suite" and show the execution of popular use cases would be very helpful for the average scripter. However, to enable that to happen, there are a few more API related UDFs that have not yet been written. Specifically, one for OAuth/OAuth2/OpenIDConnect, a NoSQL UDF that handles both XML and JSON, a converter for XML <to/from> JSON, and even a UDF that abstracts the calling of API's (Rest vs RPC vs Hybrid... JSON vs XML). I Suppose SOAP should be on the menu, but I don't have any of those to deal with at the moment. So really, I guess the idea boils down to just creating these extra "Web API related" UDFs.
  9. Indeed, that is a good point.
  10. There are some impressive UDFs emerging or being re-written recently surrounding REST services. At the same time, the explosion of useful web services and use-cases to tie them together shows no signs of slowing. I suggest a project to tie together the existing UDFs into a more comprehensive UDF which abstracts the four major functions of working with REST services: Authentication (OAuth1/2, OpenID/Connect, Etc)The HTTP Calls (Flexibility with URL, HTTP Methods, Header, Body)Manipulating the Data (XML and JSON)Local Storage/Caching (A new file-based NoSQL Strategy combined with SQLite)Some of these are pretty tall orders, however the overall notion seems so universally useful with the present technologies, I wanted to suggest it for community feedback to measure support. Full disclosure, I don't have time or skill level to contribute to these UDF's in a meaningful way. I thought maybe I shouldn't even post this for that reason, but I went ahead anyway. The UDFs that I find exciting and think would be good candidates for inclusion are listed below:
  11. I just want to say that I have tremendous respect for mLipok for taking on this tremendous task, and the rate of updates is staggering and encouraging. Also, thanks to all those like guinness and anyone else who works on these UDF's out of ... whatever motivation they may have. I think this and the recent OO_JSON.au3 do make sense for future inclusion as native libraries... but I don't know how that process works.
  12. Hi Mike, I think there might be some issue with the expression-based json path. All results seem to be matching the regular expression, and in the results that are returned, it's replacing the matched text with "-1". Please test and confirm. I pretty much took it verbatim from here: https://github.com/jayway/JsonPath $oJSON = _OO_JSON_Init() $sBooks = '{"store":{"book":[{"category":"reference","author":"Nigel Rees","title":"Sayings of the Century","price":8.95},{"category":"fiction","author":"Evelyn Waugh","title":"Sword of Honour","price":12.99},{"category":"fiction","author":"Herman Melville","title":"Moby Dick","isbn":"0-553-21311-3","price":8.99},{"category":"fiction","author":"J. R. R. Tolkien","title":"The Lord of the Rings","isbn":"0-395-19395-8","price":22.99}],"bicycle":{"color":"red","price":19.95}},"expensive":10}' $jsObjBooks = $oJSON.parse($sBooks ) consolewrite($jsObjBooks.jsonPath("$..book[?(@.author =~ /.*REES/i)]").stringify())
  13. Well, interestingly... This is not what I was looking for... although I would have been wanting this someday. I would have resorted to FileInstall when it came time to deploy our JSON tool for people to use. This is MUCH better. My goal was to have all required code contained in the AU3 for the developers purposes. As I think more about it, perhaps this is impossible. It would require a program that actually converts a resource to a binary string that you could copy and paste into the AU3 , and then a new Autoit function like "AutoIt Parse Binary" that you would put that string into. This would eliminate the quotes issue for ascii strings at least. Actually... with that in mind I just had an idea. There are some encryption functions i used about 8 years ago for passwords... but any simple hash function would do the trick actually. Take a string of text, hash it, and then in the AU3 file you can just put the hashed string with the unhash function. That i can probably do.
  14. Interesting idea doing something like GRAPE where it pulls dependencies from the internet at runtime / compiletime. The hosting/URL location would have to be reliable and robust long-term, but thats not impossible. To be honest, it depends on where AutoIt is going for the future. Does it work in Windows 10, is the community going to continue, etc. It does appear that there is no reasonable alternative to the external files. It's a bummer, but livable. I guess in every other IDE/Language you rely on external libraries which rely on other external libraries... but at least there you can put them all in a /lib directory. Wait... can we do something similar, like save the json2.txt as an .au3 file and put it in the Includes directory and treat it like any other include? At least then it wouldn't need to be copied to every project directory and it wouldn't stick out like such a sore thumb. Regards, Jerry
  15. Is the dependency situation with the three extra files explained anywhere? Is there a reason you did not just incorporate/embed these files into the UDF? I can see some benefit to keeping external "Packages" external (easy to replace when an update comes out, etc). However from my perspective, that's outweighed by the disadvantage of having to remember to lug them around with the UDF. Thanks again!
×
×
  • Create New...