Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Today
  3. @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.
  4. @baselz have you tried using: ?
  5. 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.
  6. I run curl command using this function Local $result = Run(@ComSpec & " /c " & $curlCommand, "", @SW_HIDE, $STDOUT_CHILD) ProcessWaitClose($result) the Json is valid
  7. 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"}"
  8. If curl runs from command line, it'll run from AutoIt. That character has nothing to do with AutoIt.
  9. 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"'
  10. try also: https://github.com/mlipok/Au3WebDriver-testing
  11. added to: https://www.autoitscript.com/wiki/WebDriver#References
  12. It is a small change not a bunch of changes, so I decide to submit PR without any issue
  13. 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.
  14. Yesterday
  15. 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.
  16. Have you looked in the helpfile that comes with AutoIt3 before asking? There is a slim chance it in standard supported ....who knows....
  17. With this solution, this is basically only possible by separating and treating them individually.
  18. Ah yes - i hoped to bypass the "(?>\||\z)"-construct with StringStripWS but didn`t had your case in mind. So just add this and it should work: #include <Array.au3> Local $array[3] $array[0] = '' $array[1] = '' $array[2] = ' some data ' $array[1] = ' ' ConsoleWrite(StringLen($array[2]) & @CRLF) $array = _strip_AspirinJunkie2($array) ConsoleWrite(StringLen($array[0]) & @CRLF) _ArrayDisplay($array) Func _strip_AspirinJunkie2(ByRef $aArray) Return StringRegExp(_ArrayToString($aArray), "\s+(?>\||\z)(*SKIP)(?!)|[^|]+", 3) EndFunc
  19. @AspirinJunkie In some cases won't work: #include <Array.au3> Local $array[3] $array[0] = '' $array[1] = '' $array[2] = ' some data ' $array[1] = ' ' ConsoleWrite(StringLen($array[2]) & @CRLF) $array = _strip_AspirinJunkie2($array) ConsoleWrite(StringLen($array[0]) & @CRLF) _ArrayDisplay($array) Func _strip_AspirinJunkie2(ByRef $aArray) Return StringRegExp(StringStripWS(_ArrayToString($aArray), 2), "\s+\|(*SKIP)(?!)|[^|]+", 3) EndFunc
  20. You could also go about it the other way round. Instead of deleting the empty elements using StringRegExpReplace, return the non-empty elements using StringRegExp. Then you can do without lookarounds and pack the whole thing into a one-liner: Func _strip_AspirinJunkie2(ByRef $aArray) Return StringRegExp(StringStripWS(_ArrayToString($aArray), 2), "\s+\|(*SKIP)(?!)|[^|]+", 3) EndFunc
  21. This seems to work to remove that second keyboard and go back to normal. I had a bad feeling about making changes to the Region section…and wasn't disappointed.
  22. Last week
  23. Didn't test the speed so it might be faster with lookaheads. I thought it might be faster because lookaheads sometimes are time expensive but (\|\s*)* it's time expensive as well.
  1. Load more activity
×
×
  • Create New...