-
Posts
450 -
Joined
-
Last visited
About lsakizada
- Birthday 01/10/1915
Recent Profile Visitors
856 profile views
lsakizada's Achievements
Universalist (7/7)
0
Reputation
-
Thanks Edit: found bug in my code. thanks for the help.
-
Hi All, I have not visiting you for long time, happy to be here again !!!! I need help, I have a file that it is fails to opened with _FileReadToArray() function. It returns error 1 ("Error opening specified file"). BTW: For general info, the file is created on Amazon S3 and I downloaded it to my windows PC (win 7) Any other application other then autoit script is opening it properly without any issue. Not all files from S3 has that problem and this is raise some concern for me that something is wrong with autoit. Can you please help to investigate it?. I attached an example such "problematic" file. Here is the code how I call to open the file. Func _GetTestNameFromResultsFile($ResultsFile) Local $i, $arrContent, $arrLine, $res = 0 Local $delim = ",", $aRet $res = _FileReadToArray($ResultsFile, $arrContent) If $res = 1 Then ;succes For $i = 1 To 1 $arrLine = StringSplit($arrContent[$i], $delim) If IsArray($arrLine) And $arrLine[0] <> 0 Then $aRet = StringSplit($arrLine[1], '/') Return $aRet[4] Else _Log_Report($hLog, "_GetTestNameFromResultsFile: Error splitting first line!", 5) SetError(2) EndIf Next Else _Log_Report($hLog, "_GetTestNameFromResultsFile: Error opening file for reading test name! " & "error:" & @error, 5) SetError(1) EndIf EndFunc ;==>_GetTestNameFromResultsFile all_clips_results.csv
-
-
- finished task
- finished task shutdown
-
(and 1 more)
Tagged with:
-
AutoitScript and Windows10 Mobile
lsakizada replied to lsakizada's topic in AutoIt General Help and Support
There is nothing to do about switching development platform, anyone prefer its choices as well as autoit programers. For autoit programers It will be simple for instance to call node.js services from AU3 UI script. The development of the UI is easy with autoit scripts including interpreting the response JSON objects (some good libraries already on the forum) Using the GDIPlus library will make it the coolest UI on Windows 10 mobile. But, we will see how many Android users will switch to windows in the future so it will motivate developers to develop more mobile apps for windows 10. Mean time I will wait until someone will test it and post its observation. -
AutoitScript and Windows10 Mobile
lsakizada replied to lsakizada's topic in AutoIt General Help and Support
1) Agree but that's popularity could be changed in the future. 2) The Android emulators cannot help here since (unless you prove it) we need to test installing Windows 10 Mobile on top of Android which I never did it yet and it is a device dependency. -
AutoitScript and Windows10 Mobile
lsakizada replied to lsakizada's topic in AutoIt General Help and Support
@BrewManNH Microsoft developed the OS so the installer can wipes out Android and installs Windows 10 instead. Read Here So, Imagine how many Android users will prefer Windows because of ease integration with other Microsoft software, and if Autoit Script can run on that devices then creating Mobile Apps for Windows will be very cool and easy. Anyway, I do not have Android available now for testing so I will glad to hear from someone else who can share with us that experience. -
AutoitScript and Windows10 Mobile
lsakizada replied to lsakizada's topic in AutoIt General Help and Support
I was thinking to run GUI/EXE files created by Autoit on PC but deployed on Windows 10 mobile. Thats could be very powerful. According to their ad as I posted above: -
Probably this question was asked zillion times I am going to ask it one more: Does AU3 script can run on Windows 10 mobile? Regards
-
Please ignore my last post. I found the solution and it is very simple Needs to set the $iNumberOfBytesToRead default value of 8192 to $X bytes... Func _WinHttpReadData($hRequest, $iMode = Default, $iNumberOfBytesToRead = Default, $pBuffer = Default)
-
Hi, First thanks for this wonderful UDF! I am sending simple Get request to a server's API that response with json data. I noticed that the json data is truncated and partially data is received by the client Can you please let me know what should be done to capture all data? I have this code to send the get method Func BIPRequest($URL, $HTTPMethod, $HTTPSources = "", $JSON = '', $SaveHeaders = False, $SaveResponse = False, $ReadCookie = True, $SaveCookie = False, $Folder = @ScriptDir,$name="") Local $hOpen = _WinHttpOpen() Local $hConnect = _WinHttpConnect($hOpen, $URL) Local $hRequest = _WinHttpOpenRequest($hConnect, $HTTPMethod, $HTTPSources, Default, Default, Default, $WINHTTP_FLAG_SECURE) ; set options Local $CurrentOption = _WinHttpQueryOption($hRequest, $WINHTTP_OPTION_SECURITY_FLAGS) Local $Options = BitOR($CurrentOption, _ $SECURITY_FLAG_IGNORE_UNKNOWN_CA, _ $SECURITY_FLAG_IGNORE_CERT_CN_INVALID, _ $SECURITY_FLAG_IGNORE_CERT_DATE_INVALID) _WinHttpSetOption($hRequest, $WINHTTP_OPTION_SECURITY_FLAGS, $Options) ; Send request If $ReadCookie = True Then _WinHttpAddRequestHeaders($hRequest, "Cookie: " & String(ReadCookie($Folder))) EndIf _WinHttpSendRequest($hRequest, "Content-type: application/json", $JSON) ; Wait for the response _WinHttpReceiveResponse($hRequest) ; ...get full header Local $sHeader = _WinHttpQueryHeaders($hRequest) If $SaveCookie = True Then SaveCookie($sHeader,$Folder) EndIf ; ...get full data Local $sData = _WinHttpReadData($hRequest) ; Clean/Close handles _WinHttpCloseHandle($hRequest) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) ; Display retrieved header MsgBox(0, "Header", $sHeader) ; Display retrieved data MsgBox(0, "Data", $sData) If $SaveResponse = true Then SaveTestResponse($name, $sData ,$name) EndIf EndFunc ;==>BIPRequest
-
I found a way to send the request by using this WinHTTP functions. Unfortunately, I do not know how to retrieve the cookie in order to send it in next request. Can you please give me a clue how to to perform it with WinHTTP functions? #include "WinHttp.au3" Opt("MustDeclareVars", 1) Local $URL = "https://URL.com" Local $Sources = "/auth/signin" Local $Jason = '{"email":"test@MAILMAIL.com","password":"12345678"}' Local $hOpen = _WinHttpOpen() Local $hConnect = _WinHttpConnect($hOpen, $URL) Local $hRequest = _WinHttpOpenRequest($hConnect, "post", $Sources, Default, Default, Default, $WINHTTP_FLAG_SECURE) local $CurrentOption = _WinHttpQueryOption($hRequest, $WINHTTP_OPTION_SECURITY_FLAGS) local $NewOption = BitOR($CurrentOption, _ $SECURITY_FLAG_IGNORE_UNKNOWN_CA, _ $SECURITY_FLAG_IGNORE_CERT_CN_INVALID, _ $SECURITY_FLAG_IGNORE_CERT_DATE_INVALID) ; set options _WinHttpSetOption($hRequest, $WINHTTP_OPTION_SECURITY_FLAGS, $NewOption) ; Send request _WinHttpSendRequest($hRequest,"Content-type: application/json",$Jason) ; Wait for the response _WinHttpReceiveResponse($hRequest) ; ...get full header Local $sHeader = _WinHttpQueryHeaders($hRequest) ; ...get full data Local $sData = _WinHttpReadData($hRequest) ; Clean/Close handles _WinHttpCloseHandle($hRequest) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) ; Display retrieved header MsgBox(0, "Header", $sHeader) ; Display retrieved data MsgBox(0, "Data", $sData)
-
Hi, I am running this script against my site and it is return empty response in the message box. What could be the problem? Is this related to JSon? or maybe HTTPS? #include <array.au3> $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("POST", "https://SITE.com/auth/signin", False) $oHTTP.SetRequestHeader("Content-type", "application/json") $oHTTP.SetRequestHeader("User-Agent", "User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0") $sPD = '{"email":"test@EMAILEMAIL.com","password":"12345678"}' $oHTTP.Send($sPD) $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status If $oStatusCode <> 200 Then MsgBox(4096, "Response code", $oStatusCode) EndIf $file = FileOpen("Received.html", 2) FileWrite($file, $oReceived) FileClose($file)
-
_Excel_BookSaveAs CSV file as XLS on german machine
lsakizada replied to lsakizada's topic in AutoIt General Help and Support
Hi water . sorry for the late response. Thanks for the function. somehow it is still not working in my code. but the other was working for me. I can not test it much and see were it is fails but seems that its ok. thanks alot -
_Excel_BookSaveAs CSV file as XLS on german machine
lsakizada replied to lsakizada's topic in AutoIt General Help and Support
I read the Excel.SaveAs method in MSDN and it can get another parameter named Local see https://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.workbook.saveas.aspx The UDF function_Excel_BookSaveAs does not accept that as parameter. I tried to extend the function but it did not works for me I gues that I made some mistake somewhere I think it will be useful to support local by using native proprieties of excel. -
_Excel_BookSaveAs CSV file as XLS on german machine
lsakizada replied to lsakizada's topic in AutoIt General Help and Support
@Water, there are no changes in the function code right? just passing a text file. its works for me too thanks for the help