Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Ow, thanks for that. I am looking forward to check that UDFs. Have not been around much lately. I have to start learning RegEx proper way but I like also what you said about JSON UDFs...
  3. The string appears to be a JSON string. Have you already tried one of the corresponding JSON UDFs? This should be easier to understand and more stable than using RegEx.
  4. Today
  5. Sorry, didnt refresh. Yes it works great! Thank You for your help! Glad to see you again.
  6. Hi Nine and thanks for trying to help. This version of a solution of yours leave ", "like_count" and , "author_id" after every line. I am very bad at regex so i dont know why but would like to see if you can correct it because your solution looks much more clear to me.
  7. Global $InputDatab = StringRegExp($InputDataa, '(?<="text": )(.+?)(?|, "like_count"|, "author_id")', 3) Try this.
  8. Hi sorry for bumping an old post but again i have a problem because site code changed. Everything worked fine but now there is a new line of code which unable this regex to work. Instead of "author_id" as closure now there is sometimes "like_count" instead of author_id which is still there but after much more code I dont need to extract. I did try to use delimiter in RegEx but I guess regex is not easy for me... Can someone just give me a suggestion how to make a regex which will say: Get text from here to (here or here). I did try to put it like this: Global $InputDatab = StringRegExp($InputDataa, '(?<=\"text\": \").*?(?=\", \"author_id\|like_count\")', 3) ...but it didnt work. Line instead of this was taking data from "text:" to "timestamp" Global $InputDatab = StringRegExp($InputDataa, '(?<=\"text\": \").*?(?=\", \"timestamp\")', 3) Here is an example of text which is in .info.json: So, now there are two lines which can be a closure for getting text: ', "like_count":' and ', "author_id":' How can I add in RegEx code that would do what i want? I did try it on my own with examples I found online but it does not work... Again much thanks in advance for this. Sorry, I just tried a bit more and solved a problem. Correct line is: Global $InputDatab = StringRegExp($InputDataa, '(?<=\"text\": \").*?(?=\", \"author_id|\", "like_count\")', 3) Thanks, sorry!
  9. @baselz, No sure why you quote my post? I gave you the reason why this must be failing, and you didn't respond at all to it. Try reading the answer again and in case you do not understand simply ask. PS: My comment isn't about the validity of the json, but the validity of the command you have formed. Cut and Paste the full command into a CMD window and check if it works.
  10. @baselz have you tried using: ?
  11. Again. If it runs well from the command line, it will do the same from a function in AutoIt but to believe that the failure is due to AutoIt is wrong. Humor me and run it at the command prompt. Basic troubleshooting.
  12. I run curl command using this function Local $result = Run(@ComSpec & " /c " & $curlCommand, "", @SW_HIDE, $STDOUT_CHILD) ProcessWaitClose($result) the Json is valid
  13. Have you checked what the contents of $curlCommand is and did you think it was valid? This runable version of your snipped: ; Construct JSON data $exitStatus = 0 $pluginOutput = "x" Local $jsonData = '{"exit_status": ' & $exitStatus & ', "plugin_output": "' & $pluginOutput & '"}' ; Send CURL command Local $curlCommand = 'curl -X POST -k -H "Content-type: application/json" -H "Accept: application/json" --data "' & $jsonData & '" "https://<URL>/v1/actions/process-check-result?service=.com!passive.setEnv_check"' ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $curlCommand = ' & $curlCommand & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console give this as output: @@ Debug(8) : $curlCommand = curl -X POST -k -H "Content-type: application/json" -H "Accept: application/json" --data "{"exit_status": 0, "plugin_output": "x"}" "https://<URL>/v1/actions/process-check-result?service=.com!passive.setEnv_check" Doubt that this part is valid: --data "{"exit_status": 0, "plugin_output": "x"}"
  14. If curl runs from command line, it'll run from AutoIt. That character has nothing to do with AutoIt.
  15. Hi, I'm failing to send Curl post command using AutoIT, basically I believe that the reason is having '!' special character in URL I would be glad for help ; Construct JSON data Local $jsonData = '{"exit_status": ' & $exitStatus & ', "plugin_output": "' & $pluginOutput & '"}' ; Send CURL command Local $curlCommand = 'curl -X POST -k -H "Content-type: application/json" -H "Accept: application/json" --data "' & $jsonData & '" "https://<URL>/v1/actions/process-check-result?service=.com!passive.setEnv_check"'
  16. try also: https://github.com/mlipok/Au3WebDriver-testing
  17. added to: https://www.autoitscript.com/wiki/WebDriver#References
  18. It is a small change not a bunch of changes, so I decide to submit PR without any issue
  19. https://github.com/Danp2/au3WebDriver/pull/517 Finally, I had the need to make an appropriate change for an identical task. ps. I have only just migrated this task/project from MOZREPL, so I have only now proposed an appropriate change.
  20. Yesterday
  21. Hello Nine Thank you for the answer. I have to continue testing... Ideally I would like to drive my Firefox without closing my multiple FireFox windows already open. Indeed when I use Firefox in classic mode, I launch Firefox: I 'm used to retrieve all my Firefox Windows (with a lot of tabs) which are saved when I close the browser. When I try to launch piloted Firefox, AutoIt notice me that Firefox process is already open. I will try with a simple script. My aim is to fill form fields and ideally autoscroll those fields objects so as to check what the automate script really do. (I was used to use the powerFull IE UDF which was more userfriendly to program) Thanks for the help As regards A.
  22. Have you looked in the helpfile that comes with AutoIt3 before asking? There is a slim chance it in standard supported ....who knows....
  23. With this solution, this is basically only possible by separating and treating them individually.
  1. Load more activity
×
×
  • Create New...