Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/02/2023 in all areas

  1. @TimRude as you noticed, with your initial script, the Console shows : TrayText:  UDFText: Read Text with _GUICtrlMenu_GetItemText Now if we modify the script like this... ;;; _GUICtrlMenu_SetItemBmp($hMenu, $idControl, _WinAPI_CreateSolidBitmap(WinGetHandle(AutoItWinGetTitle()), $iColor, $iBmpSize, $iBmpSize, $bRGB), False) Local $hBmp = _WinAPI_CreateSolidBitmap(WinGetHandle(AutoItWinGetTitle()), $iColor, $iBmpSize, $iBmpSize, $bRGB) _GUICtrlMenu_SetItemBitmaps($hMenu, $idControl, $hBmp, $hBmp, False) ...then the Console shows : TrayText: Read Text with TrayItemGetText UDFText: Read Text with _GUICtrlMenu_GetItemText
    1 point
  2. You should check out The WinHTTP functions: https://github.com/dragana-r/autoit-winhttp/releases Alternatively, you can also try out using the WinHTTP.WinHTTPRequest.5.1 object: https://learn.microsoft.com/en-us/windows/win32/winhttp/winhttprequest The WinHTTP UDF linked above is basically using this, though through DLLs directly instead of through the object Something like this though for the object: ; https://learn.microsoft.com/en-us/windows/win32/winhttp/winhttprequest Local $sURL = "http://ipv4.download.thinkbroadband.com/5MB.zip" Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") $oHTTP.Open("GET", $sURL, False) If (@error) Then ConsoleWrite('$oHTTP.Open error: ' & @error & @CRLF) EndIf $oHTTP.Send() If (@error) Then ConsoleWrite('$oHTTP.Send error: ' & @error & @CRLF) EndIf If ($oHTTP.Status <> 200) Then ConsoleWrite('$oHTTP.Status <> 200: ' & $oHTTP.Status & @CRLF) EndIf ConsoleWrite('$oHTTP.ResponseBody ('&stringlen($oHTTP.ResponseBody)&'): ' & StringLeft($oHTTP.ResponseBody, 1000) & @CRLF) ConsoleWrite('$oHTTP.ResponseText ('&stringlen($oHTTP.ResponseText)&'): ' & StringLeft($oHTTP.ResponseText, 1000) & @CRLF) FileWrite('test.zip', $oHTTP.ResponseBody) This should save a 5MB .zip file in your script directory. The .zip file is not meant to be opened: "These files are made of random data, and although listed as zip files, will appear to be corrupt if you try and open them"
    1 point
  3. Looks like that you may not be using an updated version of that UDF, which you can find here: The author did an update specifically to support what you're looking for, though they only provided an example with the Enter and ESC keys. I was interested in this, so I did play around with it and managed to add tabbing functionality, though it's not great. It also really only works if you set "All" on both the Columns and Rows. It may be possible to extend it further to loop through and look for the next available editable field, but that's more work than I'm willing to try out on this. Give this version that I updated a shot, and see if it works. Again, make sure to set your ListView to 'All': __ListViewEditInput_AddListview($Form1, $List1, "All", "All", "E") One annoyance with it was that for me, when I tabbed to the next column, it didn't visually 'highlight' or select the text in the cell. However when you tab into a cell it does have the WHOLE cell selected, and whatever you type will replace what's in the cell by default. Again, you might be able to change it around some to resolve that. ListViewEditInput.au3 Edit: Actually I'm dumb, I didn't check the actual example that @Kanashius provided in that linked post. In that example he did add a function for supporting tabbing himself, I haven't tried it out, but it looks a lot simpler than my approach. Either way, check out the original authors updated file and example, or my updated one. Both should have what you're looking for. Mine also drops to the first column on the next row when you tab while at the end of a row.
    1 point
  4. @Danp2 That's all i need. Problem is solved, you should mark it. Btw i take 4 posts to present a problem 😁 Thank you and @SOLVE-SMART giving me your patient
    1 point
  5. We had - I had already posted the UDF on autoit.de in 2017. Also in this forum I had posted the old version here. Now I have just made an extra thread for it so that there is a central point of contact for this. But thank you for your feedback! If it can be used effectively and helps some people, then it's already worth it. The basic approach of JSMN is that this lib does not parse the whole string, but it only sets breakpoints with the info where an element is located in the string. The final parsing of the elements happens only when the element is accessed. I had briefly skimmed the JSMN UDF and if I have interpreted it correctly (can also be wrong - have not examined it intensively), then each token is already parsed in the Json_Decode, no matter whether the element is used or not. This makes the performance advantage of jsmn invalid, but the result is pretty much the same as with my UDF - a nested structure of AutoIt data types (with the difference that dictionaries are used instead of maps for objects). So of course my UDF is not faster than the compiled jsmn-code but only faster than the processing around it (and also not in all cases).
    1 point
  6. Our Anti-Virus did not like when I tried to run that .cmd file. 😆 However, I was able to get it to work using the .bat file.
    1 point
  7. @iSanThere was an error in that first line. Try this instead -- _WD_ExecuteScript($sSession, "arguments[0].scrollIntoView(false);", __WD_JsonElement($VAT_Element))
    1 point
  8. @Danp2 That is a pretty neat thread and approach to doing things, thanks for linking it, I may not have seen it otherwise. Another option for @SkysLastChance would also be to get the AutoIt3.exe (or AutoIt3_x64.exe) itself approved, and then you could use a .bat or shortcut to call an uncompiled script or compiled as .a3x. .bat file would look something like: "C:\Program Files (x86)\AutoIt3\AutoIt3_x64.exe" "C:\Users\User\Documents\AutoIt\DoSomething.a3x" Though I doubt that IT would approve the AutoIt exe itself... That Au3toCmd really seems like a good option. Also if you're able to get the AutoIt exe approved or AutoIt installed, you don't even need to compile as .a3x, the .au3 file will work using the same syntax with a .bat file or a shortcut in the startup folder. https://www.autoitscript.com/autoit3/docs/intro/running.htm
    1 point
  9. You could use Au3toCmd. Otherwise, you would need to distribute Autoit3.exe with your .au3 file and place a shortcut in the user's startup folder.
    1 point
×
×
  • Create New...