All Activity
- Past hour
-
SOLVE-SMART reacted to a post in a topic: WebDriver is drivering me crazy
-
SOLVE-SMART reacted to a post in a topic: WebDriver is drivering me crazy
- Today
-
@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.
-
@baselz have you tried using: ?
-
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.
-
I run curl command using this function Local $result = Run(@ComSpec & " /c " & $curlCommand, "", @SW_HIDE, $STDOUT_CHILD) ProcessWaitClose($result) the Json is valid
-
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"}"
-
If curl runs from command line, it'll run from AutoIt. That character has nothing to do with AutoIt.
-
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"'
-
WebDriver is drivering me crazy
mLipok replied to MarcoMonte's topic in AutoIt General Help and Support
try also: https://github.com/mlipok/Au3WebDriver-testing -
WebDriver is drivering me crazy
mLipok replied to MarcoMonte's topic in AutoIt General Help and Support
added to: https://www.autoitscript.com/wiki/WebDriver#References - Yesterday
-
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.
-
Fastest Way to Delete Empty Records in 1d Array
AspirinJunkie replied to gcue's topic in AutoIt General Help and Support
With this solution, this is basically only possible by separating and treating them individually. -
Fastest Way to Delete Empty Records in 1d Array
Nine replied to gcue's topic in AutoIt General Help and Support
nvm - not totally woke-up, @AspirinJunkie good job. -
Fastest Way to Delete Empty Records in 1d Array
Andreik replied to gcue's topic in AutoIt General Help and Support
@AspirinJunkie Nicely done and performs really good. -
Fastest Way to Delete Empty Records in 1d Array
AspirinJunkie replied to gcue's topic in AutoIt General Help and Support
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 -
Fastest Way to Delete Empty Records in 1d Array
Andreik replied to gcue's topic in AutoIt General Help and Support
@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 -
Fastest Way to Delete Empty Records in 1d Array
AspirinJunkie replied to gcue's topic in AutoIt General Help and Support
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 - Last week
-
Fastest Way to Delete Empty Records in 1d Array
Andreik replied to gcue's topic in AutoIt General Help and Support
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.