Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/23/2017 in all areas

  1. I would suggest changing the xpath to "//span['@id=loading-indicator']". Once you have successfully called _FFXPath, you should be able to retrieve the class for further comparison using $class = _FFCmd("FFau3.xpath.className")
    1 point
  2. rootx, My _NoFocusLines UDF will do the trick for button, sllder, radio and checkbox controls, but I have never tried to do the same for a ListView. Not a trivial task in my opinion. M23
    1 point
  3. Thank you so much, @UEZ. I've tested the updated function, with manual capturing activated, and everything works as expected. Awesome stuff. Did my testing on Windows 10 Pro with two monitors having native resolutions of 2880x1800 (200% font scaling) and 2560x1440 (100% font scaling).
    1 point
  4. rootx, This is working for me. Add this function to the end of your script: ; #FUNCTION# ========================================================================================================= ; Name...........: _GUIListViewEx_GetLastSelectedItem ; Description ...: Get last selected item in active or specified ListView ; Syntax.........: _GUIListViewEx_GetLastSelectedItem($iLV_Index = 0) ; Parameters ....: $iLV_Index - Index of ListView as returned by _GUIListViewEx_Init ; Requirement(s).: v3.3.10 + ; Return values .: Success: Delimited string ListViewIndex|Row|Col ; Failure: Returns "" and sets @error as follows: ; 1 = No ListView yet active or invalid index passed ; 2 = No item selected in ; Author ........: Melba23 ; Modified ......: ; Remarks .......: If multiple items are selected, only the last selected is returned ; Example........: Yes ;===================================================================================================================== Func _GUIListViewEx_GetLastSelectedItem($iLV_Index = 0) ; Check valid index Switch $iLV_Index Case 1 To $aGLVEx_Data[0][0] ; Valid index Case Else ; Get active ListView $iLV_Index = _GUIListViewEx_GetActive() ; If no ListView active If $iLV_Index = 0 Then Return SetError(1, 0, "") EndSwitch ; Read last selected item Local $iRow = $aGLVEx_Data[$iLV_Index][20] Local $iCol = $aGLVEx_Data[$iLV_Index][21] ; Check selection has been made If $iRow = -1 Or $iCol = -1 Then Return SetError(2, 0, "") ; Return selection details Return $iLV_Index & "|" & $iRow & "|" & $iCol EndFunc Now amend the $LVN_KEYDOWN handler like this: Case $LVN_KEYDOWN $tInfo = DllStructCreate($tagNMLVKEYDOWN, $ilParam) $iKey = DllStructGetData($tInfo, "VKey") ; Get current selection $aLastSel = StringSplit(_GUIListViewEx_GetLastSelectedItem(), "|") Switch $iKey Case 38 ; Move up unless at top $iCurrItem = $aLastSel[2] - 1 If $iCurrItem < 0 Then $iCurrItem = 0 EndIf _GUICtrlListView_ClickItem($hWndFrom, $iCurrItem) Case 40 ; Move down unless at bottom $iCurrItem = $aLastSel[2] + 1 If $iCurrItem >= _GUICtrlListView_GetItemCount($hWndFrom) Then $iCurrItem = _GUICtrlListView_GetItemCount($hWndFrom) - 1 EndIf _GUICtrlListView_ClickItem($hWndFrom, $iCurrItem) EndSwitch And you can remove all the If $bChanged section from your idle loop as the handler clicking on the item sets of another pass through the handler as if you had used the mouse. As I said, it works for me - does it for you? M23
    1 point
  5. rootx, Does no-one ever do any debugging of their own scripts nowadays? A few simple ConsoleWrites give the answer: The reason the keys do not work is that the $itemc = _GUICtrlListView_GetSelectedIndices($hListView, False) line is returning nothing. As a result, the $iItemTextd = _GUICtrlListView_GetItemText($hListView, $itemc, 1) line always returns the same image path. You will have to add some code to track which item is being selected by the keys rather than relying on the _GUICtrlListView_GetSelectedIndices command. This is perhaps because my UDF is dealing with the colouring rather then leaving it to Windows - but do not hold your breath for me to amend it so that the command does return the correct value. M23 Edit: You are in luck - the UDF should be able to do what you want and a new function is being prepared.
    1 point
  6. Chiitus, No. Search the forum and you will find the explanation as to why not in many threads - all of which have been locked to save the poor old Oozlum bird. And even mentioning using a decomplier has been known to get people permanently banned, so please do not do it again. Read the Forum rules to be absolutely clear what is not allowed here. M23
    1 point
  7. Melba23

    .a3x Demo

    Graeme, Here are 3 files: Example.exe is this script compiled to exe: #pragma compile(AutoItExecuteAllowed, True) Run("Example.exe /AutoIt3ExecuteScript Script.au3") Run ("Example.exe /AutoIt3ExecuteScript Script.a3x") Script.a3x is this script compiled to a3x: #include <MsgBoxConstants.au3> MsgBox($MB_SYSTEMMODAL, "Example", "Compiled a3x script") Script.au3 is this script left as text: ; Note no include file n the au3 script as it will not necessarily be available MsgBox(4096, "Example", "au3 script") ; So we need magic numbers instead Run Example.exe and you will see the 2 MsgBoxes appear. Note that the .a3x file automatically includes the required MsgBoxConstants file when compiled - if you try running the same script as an .au3 file you are likely to get an error. M23
    1 point
  8. @DHL I've updated the code. Please test and reply if it works properly. I've only tested it on my notebook yet.
    1 point
  9. TheDcoder

    GUIBuilder Project

    Very true Long variable names for the win Regarding the original codebase, I think it is how exactly described by @TheSaint, It is just a proof of concept for GUIs in AutoIt... It was not written with long time development in mind, therefore, I think we should start fresh, borrowing some code but making everything consistent... consistency is the key
    1 point
  10. https://www.autoitscript.com/wiki/FAQ question 31
    1 point
  11. AutoIt does not use Java, it interacts with the Windows API. So the version of Java you use is irrelevant.
    1 point
  12. kemisten, Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. M23
    1 point
  13. water

    OutlookEX UDF

    Hey guys, seems the UDF gets used by some of you Is there anything missing (functions in the UDF, examples, tutorials in the wiki ...)?
    1 point
×
×
  • Create New...