Jump to content

Search the Community

Showing results for tags 'get'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum
  • AutoIt

Calendars

  • Community Calendar

Found 29 results

  1. I'm trying to get data from http://poe.trade/ - disclaimer, although this site is about a game, my script will not in any way interact directly with the game in any way. The script is just to get data from the site. To explain how it works - you submit a POST request and a custom URL is returned, then you do a GET request on that URL and you get the final URL you want. First issue: Now, I've tried doing so by using https://apitester.com/ and the first phase works. Here's how it looks like at APITester: Request Headers POST /search HTTP/1.1 Host: poe.trade Accept: */* User-Agent: Rigor API Tester Content-Length: 43 Content-Type: application/x-www-form-urlencoded Request Body online=x&name=kaom%27s%20heart&league=incursion When I submit this, the response I get is this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>Redirecting...</title> <h1>Redirecting...</h1> <p>You should be redirected automatically to target URL: <a href="http://poe.trade/search/ioritewoteteme">http://poe.trade/search/ioritewoteteme</a>. If not click the link. So I then do a GET request for 'http://poe.trade/search/ioritewoteteme', which results in this response: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>Redirecting...</title> <h1>Redirecting...</h1> <p>You should be redirected automatically to target URL: <a href="http://poe.trade/search/inamotezuakito">http://poe.trade/search/inamotezuakito</a>. If not click the link. Great, this link (http://poe.trade/search/inamotezuakito) is exactly what we want. However, when I try to do the same in autoit, the result is quite different: Global Const $HTTP_STATUS_OK = 200 $test = HttpPost("http://poe.trade/search", "/online=x&name=kaom%27s%20heart&league=incursion") ClipPut($test) MsgBox(1, "", $test) Func HttpPost($sURL, $sData = "") Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") $oHTTP.Open("POST", $sURL, False) If (@error) Then Return SetError(1, 0, 0) $oHTTP.SetRequestHeader("Host", "poe.trade") $oHTTP.SetRequestHeader("User-Agent", "Rigor API Tester") $oHTTP.SetRequestHeader("Accept", "*/*") $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send($sData) If (@error) Then Return SetError(2, 0, 0) If ($oHTTP.Status <> $HTTP_STATUS_OK) Then Return SetError(3, 0, 0) Return SetError(0, 0, $oHTTP.ResponseText) EndFunc The code above returns: ' 謟 ' Any ideas as to what I am doing incorrectly? Second issue: Once I get the final link using APITester and do a GET on that i get a bunch of hieroglyphs. A friend of mine advised that the data is GZiped, which is a pain in the butt to be honest. However, apparently curl can uncompres that. How would I go about it? Thanks
  2. Hello friends, i have a working curl command that show informations about my account on binance.com, but_it dont work with autoit code without curl.exe. I want to do it without curl, because the whole process much Slower_ with StdoutRead (I want get the response in variable.) My Curl command in Autoit: This 2 are works, but_ i would like to do it without curl.exe $apikey="XYZ" sCommand = @ScriptDir & '\curl.exe -k -H "X-MBX-APIKEY: ' & $apikey & '" -X GET "https://api.binance.com/api/v3/account?' & $request the same in .bat file curl.exe -k -H "X-MBX-APIKEY: XYZ" -X GET "https://api.binance.com/api/v3/account?timestamp=1514917812000&signature=85bdee77e53cd521e1d5229fbfb459d53799c42b3fa4596d73f1520fad5f965a" (I use curl with -k option which allows curl to make insecure connections, because there is problem with the sites certificate, (cURL error 60)) I tried many variations, this is the latest... I cant get the same response. curl $error message (I changed ): {"code":-2015,"msg":"Invalid API-key, IP, or permissions for action."} autoit version $error message (Response code:400): Mandatory parameter 'timestamp' was not sent, was empty/null, or malformed. $request = $query & '&signature=' & $signature $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET", "https://api.binance.com/api/v3/account", False) $oHTTP.SetRequestHeader("X-MBX-APIKEY", $apikey) $oHTTP.Send($request) $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status If $oStatusCode <> 200 then MsgBox(4096, "Response code", $oStatusCode) EndIf thanks
  3. Hi all, I have a bit of code that works on my old Win10 PC, that fails on my new Win10 PC, and I think the only significant difference is the version of Autoit - old PC has 3.3.12, new has 3.3.14. I couldn't find anything mentioned in the change logs though, so perhaps I'm wrong. Anyway, the code to replicate my issue is: Test('username', 'DOMAIN') ; THIS ERRORS: ;Test('localun', 'DOMAIN') ; THIS ERRORS: ;Test(' ', ' ') ; THIS ERRORS: ;Test('', '') ; THIS ERRORS: ;Test('localun', '') ; THIS ERRORS: ;Test('', 'DOMAIN') Func Test($un, $dom) $compName = 'PCNAME' $FullName = '.' $Description = '.' ; get the WIM object $objWMIService = ObjGet("winmgmts:\\" & $compName & "\root\cimv2") ; get default user full name and description $objAccount = $objWMIService.Get("Win32_UserAccount.Name='" & $un & "',Domain='" & $dom & "'") If IsObj($objAccount) Then $FullName = $objAccount.FullName $Description = $objAccount.Description EndIf ConsoleWrite($FullName & @CRLF) ConsoleWrite($Description & @CRLF) Return EndFunc On my old PC this code will output just . and . for each of those line currently commented out. Which is fine. On my new PC any of those commented out lines of code cause an error, and the script won't even compile. $objAccount = $objWMIService.Get("Win32_UserAccount.Name='" & $un & "',Domain='" & $dom & "'") $objAccount = $objWMIService^ ERROR I'm very much a newb with the WMI stuff and objects, but it looks like the .Get property is failing when either $un or $dom aren't valid in v3.3.14, whereas in 3.3.12 the .Get would fail to return an object, which is then caught by the If statement. Am I on track with this? Is there some new/better way to code the example so that 3.3.14 will compile it?
  4. Hi all I want a way to get the last key pressed. I have a program that works with keyboard shortcuts and I want to give the permission for the user to edit shortcut keys depending on what suits him i want to make read-only edit box and the program writes the latest shortcut key pressed Please help me, greetings to all And thanks in advance
  5. hello guys how are you؟ I hope to be fine. I have a question please how do I get the menu item that was pressed without that contains a variable؟ For example I have a menu of Favorites and I want the script recognizes the existing path in the pressed item i'll repeat to tell the item does not contain a variable Is there any solution if you want to explain more I could write an example of what I want. Greetings to all, thanks in advance
  6. Hello my friends I have an urgent question, please help. How do I select all the text in the edit or input And how to get the currently selected text Please help urgently Greetings and thanks for all
  7. Hi All, I've coded the small script below, but it can't seem to get the instance of Windows Media player as it keeps going to @error, I've not used com objects before so any assistance would be appreciate. I already have WMP open and minimised. I retrieved "WMPlayerApp" from the AutoIT info tool, I've included a copy below. I'm using these sources: https://msdn.microsoft.com/en-us/library/dd564085.aspx https://msdn.microsoft.com/en-us/library/dd564018.aspx $oWMP = ObjGet("", "WMPlayerApp") If @error Then MsgBox(0, "Can't get WMP", "Couldn't connect to the WMP instance") Exit EndIf $wmpPlayState = $oWMP.playState MsgBox(0, "Play State", $wmpPlayState) $wmpSongName = $oWMP.currentMedia.name MsgBox(0, "Play State", $wmpSongName) I've also seen references to the below, but I want to get an existing open WMP: ObjCreate("wmplayer.OCX") and have looked at the WMP.udf but can't see how it will do either of the functions I've coded above.
  8. Hello i have problem with function PixelGetColor. On my computer it working fine but in some cases it not working. And Im clicking on the active window on red color and it give me the same color still. But in other computers when clicking on the same color red it gives other values and returned color in MsgBox is not red. Dont know is it a real main thing what causing problem but, I noticed that problem was on one windows 10. I have windows 8 and working well. On other windows 10 works well to Maybe it is caused by windows aero or something like that How to deal with it? There is a code HotKeySet("{PAUSE}", "MouseCord") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func MouseCord() Global $MousePos = MouseGetPos() $clickedColor = PixelGetColor($MousePos[0], $MousePos[1]) MsgBox(0, "Done", $clickedColor) EndFunc
  9. Hi All, I run multiple AutoIT scripts concurrently, is there a way of distinguishing between them? When I look under Details in task manager I just see a bunch of "AutoIt3.exe" processes. Under the processes tab I again just see a bunch of "AutoIt v3 Script" or "AutoIt v3 Script (32 bit)" applications. When I hover my mouse over the tray icon I can see the tooltip "AutoIt - Current Time.au3" but am not sure how to reference this. For example if I run a script called "Current Time.au3", how can I determine from another au3 script if this "Current Time.au3" script is running and grab it's handle (using WinGetHandle() or similar)? Following from that l'd even like to pause/resume the script, if that's possible.. Cheers!
  10. How to select a folder and assign the path value to a variable in autoit? ; Selecting a file and assigning that to $sPath value) Case $file $sPath = FileOpenDialog("Open a file", @desktopdir, "Cabinet Files (*.cab)",$FD_MULTISELECT) GUICtrlSetData($file, $sPath) ; How to do the same with a folder? Case $folder $sPath = FileSelectFolder($sPath, "")Need the selected folder path to be used in the $sPath section for further implementation. Or a method to Select Folder or Files at once.
  11. Hey, I created a Date- and Timepicker in my GUI, I can get the date I selected (GUICtrlRead), but I want to compare it with the current date. I got this far: Func AddEntry() $hours = GUICtrlRead($input_hour) $minutes = GUICtrlRead($input_minutes) $seconds = GUICtrlRead($input_seconds) $date = GUICtrlRead($Date1) If @HOUR = $hours and @MIN = $minutes and @SEC = $seconds then MsgBox(0, "", "Time is right") ; @WDAY, @MON, @MDAY, @YEAR just give out number and I dont know how I can compare them with the "Monday, January 1, 2015" outputHope you can help!
  12. Hello, I need help, I have created couple small pictures(about 200) in one GUI, I need to move them fast about 1-5 pixels every picture somehow. There are only pictures in GUI, no other controls. I tried this, but it's too slow: Global Const $AC_SRC_ALPHA = 1 For $ii = 0 To $size For $iii = 0 To $size GUICtrlSetPos(_ArrayGet($data, $ii, $iii, 1), ControlGetPos($GUI, "", _ArrayGet($data, $ii, $iii, 1))[0] + 2, ControlGetPos($GUI, "", _ArrayGet($data, $ii, $iii, 1))[1] + 2) Next Next Func _ArrayGet(ByRef $aArray, $i1, $i2 = 0, $i3 = 0, $i4 = 0, $i5 = 0, $i6 = 0, $i7 = 0, $i8 = 0, $i9 = 0, $i10 = 0, $i11 = 0, $i12 = 0, $i13 = 0, $i14 = 0, $i15 = 0, $i16 = 0, $i17 = 0, $i18 = 0, $i19 = 0, $i20 = 0) ;Function made by ProgAndy Local $iDims = UBound($aArray, 0) #forceref $i1, $i2, $i3, $i4, $i5, $i6, $i7, $i8, $i9, $i10, $i11, $i12, $i13, $i14, $i15, $i16, $i17, $i18, $i19, $i20 Local $NULL If Not IsArray($aArray) Then Return SetError(1, 1, $NULL) Local $sAccess = "$aArray" For $i = 1 To $iDims Local $iIndex = Int(Eval("i" & $i)) If $iIndex >= UBound($aArray, $i) Then Return SetError(3, $i, $NULL) $sAccess &= '[' & $iIndex & ']' Next If @NumParams - 1 > $iDims Then For $i = $iDims - 1 To @NumParams $sAccess &= ", $i" & $i Next Local $vResult = Execute("_ArrayGet(" & $sAccess & ")") If @error Then SetError(@error, @extended + $iDims) Return $vResult Else Return Execute($sAccess) EndIf EndFunc ;==>_ArrayGetI didn't wrote all script, becouse it's huge. It took about 1200 - 1600 milisecounds, I need that pictures would move much faster. It's possible to make it much faster, that it would took about 2-10 milisecounds? Thanks.
  13. Get Portable Devices

    Well an Implementation of IPortableDeviceManager Interface to get all Portable Device conected to our pc. #include <Array.au3> #include <WinAPICom.au3> Opt("MustDeclareVars", 1) Global Const $sCLSID_PortableDeviceManager = "{0af10cec-2ecd-4b92-9581-34f6ae0637f3}" Global Const $sIID_IPortableDeviceManager = "{a1567595-4c2f-4574-a6fa-ecef917b9a40}" Global Const $sTagIPortableDeviceManager = "GetDevices hresult(ptr;dword*); RefreshDeviceList hresult(); " & _ "GetDeviceFriendlyName hresult(wstr;wstr;dword*); GetDeviceDescription hresult(wstr;wstr;dword*); " & _ "GetDeviceManufacturer hresult(wstr;wstr;dword*); GetDeviceManufacturer hresult(wstr;wstr;ptr;dword*dword*); " & _ "GetPrivateDevices hresult(ptr;dword*)" Global Enum $eDevID, $eDevName, $eDevManufacturer, $eDevDescription Local $aPnPDevices = GetPortableDevices() If IsArray($aPnPDevices) Then _ArrayDisplay($aPnPDevices) ;~ Success: Return 0 ;~ Failure: Return 2DArray [n][4] |;[n][0]$eDevID, [n][1]$eDevName, [n][2]$eDevManufacturer,[n][3] $eDevDescription Func GetPortableDevices() Local $aDevicesInfo[0][0] ;[n][0]$eDevID, [n][1]$eDevName, [n][2]$eDevManufacturer,[n][3] $eDevDescription Local $oPortableDeviceManager = 0 Local $SizeofArray = 0 Local $hr = 0x80004005 ;E_Fail Just to Initialized <0 Local $taPnPDeviceIDs = 0 Local $tName = 0 $oPortableDeviceManager = ObjCreateInterface($sCLSID_PortableDeviceManager, $sIID_IPortableDeviceManager, $sTagIPortableDeviceManager) If Not IsObj($oPortableDeviceManager) Then Return 0 If FAILED($oPortableDeviceManager.GetDevices(Null, $SizeofArray)) Then Return 0 If $SizeofArray < 1 Then Return 0 $taPnPDeviceIDs = DllStructCreate("ptr[" & $SizeofArray & "]") If FAILED($oPortableDeviceManager.GetDevices(DllStructGetPtr($taPnPDeviceIDs), $SizeofArray)) Then Return 0 ReDim $aDevicesInfo[$SizeofArray][4] For $i = 0 To $SizeofArray - 1 $tName = DllStructCreate("wchar[512]", DllStructGetData($taPnPDeviceIDs, 1, $i + 1)) $aDevicesInfo[$i][$eDevID] = DllStructGetData($tName, 1) $aDevicesInfo[$i][$eDevName] = _GetFriendlyName($oPortableDeviceManager, $aDevicesInfo[$i][$eDevID]) $aDevicesInfo[$i][$eDevManufacturer] = _GetDeviceManufacturer($oPortableDeviceManager, $aDevicesInfo[$i][$eDevID]) $aDevicesInfo[$i][$eDevDescription] = _GetDeviceDescription($oPortableDeviceManager, $aDevicesInfo[$i][$eDevID]) $tName = 0 _WinAPI_CoTaskMemFree(DllStructGetData($taPnPDeviceIDs, 1, $i + 1)) Next Return $aDevicesInfo EndFunc ;==>GetPortableDevices Func _GetDeviceManufacturer($oInterface, $PnPDeviceID) Local $sString = "" $oInterface.GetDeviceManufacturer($PnPDeviceID, $sString, 128) Return $sString EndFunc ;==>_GetDeviceManufacturer Func _GetDeviceDescription($oInterface, $PnPDeviceID) Local $sString = "" Local Const $Size = 128 $oInterface.GetDeviceDescription($PnPDeviceID, $sString, 128) Return $sString EndFunc ;==>_GetDeviceDescription Func _GetFriendlyName($oInterface, $PnPDeviceID) Local $sString = "" Local Const $Size = 128 $oInterface.GetDeviceFriendlyName($PnPDeviceID, $sString, 128) Return $sString EndFunc ;==>_GetFriendlyName Func _GetProperty($oInterface, $PnPDeviceID) Local $sString = "" Local Const $Size = 128 $oInterface.GetDeviceFriendlyName($PnPDeviceID, $sString, 128) Return $sString EndFunc ;==>_GetProperty Func FAILED($hr) Return ($hr < 0) EndFunc ;==>FAILED Saludos
  14. Well Another Function. For Get de Drive letter marked as write enabled. Global Const $sCLSID_CDBurn = "{fbeb8a05-beee-4442-804e-409d6c4515e9}" Global Const $sIID_ICDBurn = "{3d73a659-e5d0-4d42-afc0-5121ba425c8d}" Global Const $sTagCDBurn = "GetRecorderDriveLetter hresult(wstr;uint); Burn hresult(hwnd); HasRecordableDrive hresult(bool*)" MsgBox(0, "", _GetRecorderDriveLetter()) Func _GetRecorderDriveLetter() Local $sDriveLetter = "" Local $HasRecordableDrive = False Local $oCDBurn = ObjCreateInterface($sCLSID_CDBurn, $sIID_ICDBurn, $sTagCDBurn) If Not IsObj($oCDBurn) Then Return $sDriveLetter If SUCCEEDED($oCDBurn.HasRecordableDrive($HasRecordableDrive)) Then $oCDBurn.GetRecorderDriveLetter($sDriveLetter, 4) EndIf Return $sDriveLetter EndFunc ;==>_GetRecorderDriveLetter Func SUCCEEDED($hr) Return ($hr >= 0) EndFunc ;==>SUCCEEDED
  15. Get Connected NetWorks

    I was needing to check all my connected networks and check if there is internet connection. so I wrote this function. #include <MsgBoxConstants.au3> #include <Array.au3> Global $NLM_ENUM_NETWORK_CONNECTED = 0x01 ;~ Global $NLM_ENUM_NETWORK_DISCONNECTED = 0x02 ;~ Global $NLM_ENUM_NETWORK_ALL = 0x03 Global Enum $eName, $eIsConectedtoInternet Local $aNetworks = GetNetWorks() If @extended Then For $i = 0 To @extended - 1 ConsoleWrite("NetWork Name: " & $aNetworks[$i][$eName] & "| IsConectedToInternet: " & $aNetworks[$i][$eIsConectedtoInternet] & @CRLF) Next _ArrayDisplay($aNetworks, "NetWork Name|NetWork Is Conected to Internet") EndIf ;~ Success: Return an 2DArray[][] and sets @extended Ubound of Array ;~ Failure: Return 0 and set @extended 0 Func GetNetWorks($NLM_ENUM_NETWORK = $NLM_ENUM_NETWORK_CONNECTED) Local $aNetworks[0][2] ;[n][0]NetWorks Name|[n][1]isConnectedtoInternet Local $INetworks = 0 Local $ReDim = 0 Local $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc") Local $oINetworkListManager = ObjCreate("{DCB00C01-570F-4A9B-8D69-199FDBA5723B}") ;Create INetworkListManager Object by CLSID If Not IsObj($oINetworkListManager) Then Return 0 $INetworks = $oINetworkListManager.GetNetworks($NLM_ENUM_NETWORK) If Not IsObj($INetworks) Then Return 0 For $INetwork In $INetworks $ReDim = UBound($aNetworks, 1) + 1 ReDim $aNetworks[$ReDim][2] $aNetworks[$ReDim - 1][0] = $INetwork.GetName $aNetworks[$ReDim - 1][1] = $INetwork.isConnectedtoInternet Next $oINetworkListManager = 0 ;Free Return SetExtended($ReDim, $aNetworks) EndFunc ;==>GetNetWorks ; User's COM error function. Will be called if COM error occurs Func _ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_ErrFunc Saludos
  16. Get selected text?

    Hello. I am working in a clipboard manager which I will release to autoit's example scripts. The problem is that I have no Idea how to get currently selected text WITHOUT sending ^c... I've already check out some other similar topics in the forum but nothing.. Any ideas? Thanks in advance. ( Also getting the selected text outside autoit's form, for example getting selected text not from Autoit's GUI but from another window, like Notepad. )
  17. So I was looking everywhere about getting an array's number of slots in use... and found nothing. Is this even possible? for example Global $array[5] $array[1] = "1 slot in use" $arrayslotsinuse = ArrayGetSlotsInUse($array) Thanks in advance ...I tried making a counter but didn't work so well.. (it crashed app)
  18. Dear AutoIt Community, I have checked some HTTP examples in the forums. So, I created a basic script as the following: $login = ObjCreate("winhttp.winhttprequest.5.1") $sUsername = "ty" $sPassword = "AAbb11!!" Local $url = "http://192.168.182.160:9889/authenticate.action" $login_packet = "username=" & $sUsername & "&password=" & $sPassword & "&vcode=0000&dstInfo=300%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0&language=en_US&name=default" $login.open("POST", $url) $login.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $login.send($login_packet) $login.WaitForResponse() $cookies = $login.GetAllResponseHeaders() ConsoleWrite($cookies & @CRLF)Actually, the username and password is correct. I got the following response: Cache-Control: no-store,no-cache Date: Wed, 27 May 2015 12:33:22 GMT Content-Length: 95 Content-Type: text/plain;charset=UTF-8 Server: OpenAS Set-Cookie: session_cookie=34431a76-54d5-498f-aae2-866dd5199304; Path=/; HttpOnly Set-Cookie: JSESSIONID=3FCE7FEE16230EF25BD2DFA280958212; Path=/; HttpOnlyIf I change the username or password, I want to a failed login, I got this: Cache-Control: no-store,no-cache Date: Wed, 27 May 2015 12:34:25 GMT Content-Length: 87 Content-Type: text/plain;charset=UTF-8 Server: OpenAS Set-Cookie: session_cookie=01a233ed-a008-496a-89b1-0d044d03949a; Path=/; HttpOnly Set-Cookie: JSESSIONID=4350A7C51D6C0E7F294ED9D6E08DB9A6; Path=/; HttpOnlyOnly the session cookie and session ID is changed. But there is no result whether I failed to login. Here is the successful HTTP result: http://192.168.182.160:9889/authenticate.action POST /authenticate.action HTTP/1.1 Host: 192.168.182.160:9889 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Firefox/38.0 Accept: */* Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded;charset=UTF-8 X-Requested-With: XMLHttpRequest Referer: http://192.168.182.160:9889/login.action?ssoLogin=true Content-Length: 148 Cookie: session_cookie=77e59d47-fa86-4ce4-87c2-8486e68c7dbd; JSESSIONID=05788845F16A110B6C7747DFDB9B7F3F; bme_locale_session=en_US; sna_cookie=; locale_cookie=en_US; access_time_cookie=0 Connection: keep-alive Pragma: no-cache Cache-Control: no-cache username=ty&password=AAbb11!!&vcode=0000&dstInfo=300%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0&language=en_US&name=default HTTP/1.1 200 OK Cache-Control: no-store,no-cache Set-Cookie: session_cookie=99e86bd3-6308-4ce1-ab29-960aa69147e9; Path=/; HttpOnly Set-Cookie: sna_cookie=99e86bd3-6308-4ce1-ab29-960aa69147e9; Path=/; HttpOnly Set-Cookie: locale_cookie=en_US; Expires=Fri, 26-Jun-2015 10:31:48 GMT; Path=/ Set-Cookie: JSESSIONID=56472DD2CEBF17A3218C3765585380A9; Path=/; HttpOnly Content-Type: text/plain;charset=UTF-8 Content-Length: 49 Date: Wed, 27 May 2015 10:31:47 GMT Server: OpenASHere is the failed HTTP result: http://192.168.182.160:9889/authenticate.action POST /authenticate.action HTTP/1.1 Host: 192.168.182.160:9889 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Firefox/38.0 Accept: */* Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded;charset=UTF-8 X-Requested-With: XMLHttpRequest Referer: http://192.168.182.160:9889/login.action?ssoLogin=true Content-Length: 149 Cookie: session_cookie=acec9a18-b702-4f7b-96c6-667a7b35ac08; JSESSIONID=4211585FF6FE3DFC19FEF39196DCB61A; bme_locale_session=en_US Connection: keep-alive Pragma: no-cache Cache-Control: no-cache username=ty&password=dsadsadsa&vcode=0000&dstInfo=300%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3A0&language=en_US&name=default HTTP/1.1 200 OK Cache-Control: no-store,no-cache Content-Type: text/plain;charset=UTF-8 Content-Length: 111 Date: Wed, 27 May 2015 11:21:43 GMT Server: OpenAS As I see, the successful result includes cookies and session ID; but failed result doesn't include these. I wonder why the result of the script for failed attempt still showing session ID. Can you please tell me what to modify in my script in order not to get session ID when login failed? Any comments are welcome, thanks.
  19. Hi. I want to get the page with socks 5. I has been search for 2 days but didnot found I see winHttp but it only support proxy Any one can help me please? Socks 5 or 4 not proxy please Thank for reading and im sorry about my stupid English
  20. Just very simple but universal/usefull function to get all content of TreeView from external application. It's not optimized for speed and error testing is missing, it's just for very simple code ;-) #Include <String.au3> #Include <GuiTreeView.au3> ; "C:\Program Files (x86)\Resource Kit\oleview.exe" ; COM Library Objects --> ClassMoniker $sAll = _TreeView_GetAll('OLE/COM Object Viewer', '', 'SysTreeView322') FileDelete('treeview_get_all.txt') FileWrite('treeview_get_all.txt', $sAll) ;~ClipPut($sAll) Func _TreeView_GetAll($title, $text, $classNN, $expand = False, $indent = ' ', $bullet = '') ; $bullet = '- ' $sAll = '' $hWnd = ControlGetHandle($title, $text, $classNN) If $expand Then _GUICtrlTreeView_Expand($hWnd) ; Expand All $hItem = _GUICtrlTreeView_GetFirstItem($hWnd) While $hItem <> 0x00000000 $sItem = _GUICtrlTreeView_GetText($hWnd, $hItem) $level = _GUICtrlTreeView_Level($hWnd, $hItem) $sIndent = _StringRepeat($indent, $level) $sAll &= $sIndent & $bullet & $sItem & @CRLF $hItem = _GUICtrlTreeView_GetNext($hWnd, $hItem) WEnd Return $sAll EndFunc Hope it can help somebody ...
  21. How can I programatically find the styles of all the sentences on a Microsoft Word document? I tried this code but it didn't work: #include <Word.au3> Global $oWord, $oDoc $oWord = _Word_Create() $oDoc = _Word_DocGet($oWord, 1) Local $sCount = $oDoc.Sentences.Count For $i = 0 To $sCount - 1 Local $oRange = _Word_DocRangeSet($oDoc, -1, $wdSentence, $i, $wdSentence, 1) ConsoleWrite("The style of this sentence is: " & $oRange.Style & @LF) Next
  22. How can I get a list of all the headings in a Microsoft Word document by using AutoIt? I tried: #include <Word.au3> #include <MsgBoxConstants.au3> Global Const $wdRefTypeHeading = 1 ; Heading $Headings = $oDoc.GetCrossReferenceItems($wdRefTypeHeading) $Count = UBound($Headings) MsgBox($MB_SYSTEMMODAL, "Debug", $Count) But it did not function well.. For example, it just get 1 heading from my rich document that have many headings! I also tried this: #include <Word.au3> #include <MsgBoxConstants.au3> $Count = $oDoc.Paragraphs.Count For $i = 0 To $Count - 1 $oRange = _Word_DocRangeSet($oDoc, -1, $wdParagraph, $i, $wdParagraph, 1) If StringInStr($oRange.text, "Header Text") Then MsgBox($MB_SYSTEMMODAL, "Debug", $oRange.Style) EndIf Next And this: #include <Word.au3> #include <MsgBoxConstants.au3> $Count = $oDoc.Paragraphs.Count For $i = 0 To $Count - 1 $oRange = _Word_DocRangeSet($oDoc, -1, $wdSentence, $i, $wdSentence, 1) If StringInStr($oRange.text, "Header Text") Then MsgBox($MB_SYSTEMMODAL, "Debug", $oRange.Style) EndIf Next But the Range.Style property didn't work in AutoIt.. Could someone help me how to get a list of all the headings in a Word document?
  23. How to store the object or the handler of a current focused window of an Internet Explorer that's not created by an AutoIt v3 script, into a variable?
  24. Could you please show me a script that will set whatever value at the "Description:" field (ONLY!!) of such this kind of a web form: www.fiercewireless.com/jobs/post/ I tried to find a way but I am empty right now..
  25. The code works on windows 7 but not on XP... why so? #include <File.au3> Global $sIP, $MAs $Station=InputBox("Workstation", "enter the workstation", "") _GetMACFromIP($sIP) Local $text = StringReplace($MAs, "-", "") IniWrite(@ScriptDir & "\MAC.ini", "mac_addresses", $Station, $text) Func _GetMACFromIP($sIP) Local $MAC,$MACSize Local $MAi,$MAr ;Create the struct $MAC = DllStructCreate("byte[6]") ;Create a pointer to an int $MACSize = DllStructCreate("int") ;*MACSize = 6; DllStructSetData($MACSize,1,6) ;call inet_addr($sIP) $MAr = DllCall ("Ws2_32.dll", "int", "inet_addr", _ "str", $sIP) $iIP = $MAr[0] ;Make the DllCall $MAr = DllCall ("iphlpapi.dll", "int", "SendARP", _ "int", $iIP, _ "int", 0, _ "ptr", DllStructGetPtr($MAC), _ "ptr", DllStructGetPtr($MACSize)) ;Format the MAC address into user readble format: 00:00:00:00:00:00 $MAs = "" For $MAi = 0 To 5 If $MAi Then $MAs = $MAs & "-" $MAs = $MAs & Hex(DllStructGetData($MAC,1,$MAi+1),2) Next ;Return the user readble MAC address Return $MAs EndFunc Resolved by using this code instead: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=MAG.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <WinAPI.au3> #include <File.au3> $IPDetails=_IPDetails() $Station=InputBox("Workstation", "enter the workstation", "") Local $text = StringReplace($IPDetails[1], ":", "") IniWrite(@ScriptDir & "\MAC.ini", "mac_addresses", $Station, $text) Func _IPDetails() Local $oWMIService = ObjGet("winmgmts:{impersonationLevel = impersonate}!\\" & "." & "\root\cimv2") Local $oColItems = $oWMIService.ExecQuery("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True", "WQL", 0x30), $aReturn[5] = [4] If IsObj($oColItems) Then For $oObjectItem In $oColItems If $oObjectItem.IPAddress(0) == @IPAddress1 Then $aReturn[1] = $oObjectItem.MACAddress $aReturn[2] = $oObjectItem.DefaultIPGateway(0) EndIf Next Return $aReturn EndIf Return SetError(1, 0, $aReturn) EndFunc ;==>_IPDetails
×