Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/09/2018 in all areas

  1. Jon

    AutoIt v3.3.14.4 Released

    AutoIt v3.3.14.4 has been released. Thanks to everyone involved, both visible and behind the scenes. Download it here. Complete list of changes: History
    4 points
  2. rcmaehl

    Steam Library UDF

    Hi all, I've recently needed to be able to catalog Programs on my system and Steam is a pain to do. So here's the UDF I've made. FAQ Q1: Isn't this game related? A1: It's borderline, yes, so much so I cleared it with M23 before posting Q2: Can you add X function that does X with the Steam API? A2: No Q3: Can you add X function that does X with games? A3: No Q4: Can you add X function that doesn't meet the above criteria? A4: No, just to be safe anyway Q5: Why doesn't this get me the .exe!? A5: See Q3 UDF https://github.com/rcmaehl/_GetSteam
    1 point
  3. Just a little program I whipped up a couple of days ago, to fill a need. It has a few nice features. Basically it gives batch list ability, to any program that supports an input path on the command-line (%1 etc). It only supports drag & drop, and uses RunWait .... but feel free to adapt to your needs. Batch Create & Run v1.8.zip BUGFIX OLDER DOWNLOADS Older Screenshot NOTE - My usage was with a BAT file, so even though I coded for EXE files as well, that element remains untested, but should work. EDIT - Of course, if you use a DOS (console) EXE, you might want to add a checkbox to specify that the @Comspec method should be used. Perhaps I will add that ... one day. DONE
    1 point
  4. Melba23

    ScreenCapture

    jbuena1234, Just install the latest release - the bug fixes are included. M23
    1 point
  5. LegitStack, When you reply, please use the "Reply to this topic" button at the top of the thread or the "Reply to this topic" editor at the bottom rather than the "Quote" button - responders know what they wrote and it just pads the thread unnecessarily. Thanks for your future cooperation in this. M23
    1 point
  6. look into IUIAutomation You don’t appear to try anything on your own. Do you have any suggestions?
    1 point
  7. Try : $oIE.document.parentwindow.execScript("imSubmitAction('action.standardsearch.detailed');")
    1 point
  8. Another example, since you know the Guid no need to use RegEnumKey #RequireAdmin #include <Misc.au3> searchUninstallStrings("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\") searchUninstallStrings("HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\") Func searchUninstallStrings($sRegUninstallPath) Local $sUninstallString Local $aUninstall[4][2] $aUninstall[0][1] = "{9F89F857-ADEB-4916-9D7B-2859DAC597DF}" $aUninstall[0][1] = "10.0.13477" $aUninstall[1][0] = "{2C24C6C3-41A0-4E19-8EAE-78E9C928433E}" $aUninstall[1][1] = "10.0.3.1169" $aUninstall[2][0] = "{4B99E166-E028-4FC2-BF8D-FB40CE0A6FAE}" $aUninstall[2][1] = "11.0.1.3674" $aUninstall[3][0] = "{E6BD5A9E-65E0-4139-A535-0D9FF61443FF}" $aUninstall[3][1] = "12.1.13856" For $i = 0 To UBound($aUninstall) - 1 If StringRight($sRegUninstallPath, 1) = "\" Then $sRegUninstallPath &= $aUninstall[$i][0] Else $sRegUninstallPath &= "\" & $aUninstall[$i][0] EndIf $sUninstallString = _VersionCompare($aUninstall[$i][1], RegRead($sRegUninstallPath, "DisplayVersion")) = 0 ? RegRead($sRegUninstallPath, "UninstallString") : "" If $sUninstallString = "" Then ContinueLoop RunWait("MsiExec.exe /x " & $aUninstall[$i][0] & " /qb /norestart") Next EndFunc
    1 point
  9. A couple of suggestions -- 1) Add a ConsoleWrite or a MsgBox inside the If statement so that you can be sure the desired element is being found 2) Instead of checking for onclick, it may work better to check for innertext -- $oLabels = _IETagNameGetCollection ($oIE, "label") For $oLabel In $oLabels If _IEPropertyGet($oLabel, 'innertext') = "Recherche avancée" Then ConsoleWrite('Found element!' & @CRLF) _IEAction($oLabel,"click") ExitLoop EndIf Next
    1 point
  10. I did, but still not working Func searchUninstallStrings($uninstall_path) Local $var[4] $var[0] = "{9F89F857-ADEB-4916-9D7B-2859DAC597DF}" ;10.0.13477 $var[1] = "{2C24C6C3-41A0-4E19-8EAE-78E9C928433E}";10.0.3.1169 $var[2] = "{4B99E166-E028-4FC2-BF8D-FB40CE0A6FAE}" ;11.0.1.3674 $var[3] = "{E6BD5A9E-65E0-4139-A535-0D9FF61443FF}" ;12.1.13856 $i = 0 While True $i += 1 Local $entry = RegEnumKey($uninstall_path, $i) If @error <> 0 Then ExitLoop $regPath = $uninstall_path & "\" & $entry $DisplayName = RegRead($regPath, "DisplayName") If $DisplayName <> "" Then $message = $DisplayName & @CR $UninstallString = RegRead($regPath, "UninstallString") If $entry = "{9F89F857-ADEB-4916-9D7B-2859DAC597DF}" Then RunWait($UninstallString) ElseIf $entry = "{2C24C6C3-41A0-4E19-8EAE-78E9C928433E}" Then RunWait('msiexec /x "' & $var[1] & '"') ElseIf $entry = "{4B99E166-E028-4FC2-BF8D-FB40CE0A6FAE}" Then RunWait('msiexec /x "' & $var[2] & '"') ElseIf $entry = "{E6BD5A9E-65E0-4139-A535-0D9FF61443FF}" Then ;RunWait('msiexec /x "' & $var[3] & '"') RunWait($UninstallString) $CMD = EndIf If $UninstallString <> "" Then ;$message &= "Uninstall: '" & $UninstallString & "'" ;MsgBox(4096, "SubKey #" & $i & ": " & $entry, $message) EndIf EndIf WEnd EndFunc Func searchUninstallStrings($uninstall_path) Local $var[4] $var[0] = "{9F89F857-ADEB-4916-9D7B-2859DAC597DF}" ;10.0.13477 $var[1] = "{2C24C6C3-41A0-4E19-8EAE-78E9C928433E}";10.0.3.1169 $var[2] = "{4B99E166-E028-4FC2-BF8D-FB40CE0A6FAE}" ;11.0.1.3674 $var[3] = "{E6BD5A9E-65E0-4139-A535-0D9FF61443FF}" ;12.1.13856 $i = 0 While True $i += 1 Local $entry = RegEnumKey($uninstall_path, $i) If @error <> 0 Then ExitLoop $regPath = $uninstall_path & "\" & $entry $DisplayName = RegRead($regPath, "DisplayName") If $DisplayName <> "" Then $message = $DisplayName & @CR $UninstallString = RegRead($regPath, "UninstallString") If $entry = "{9F89F857-ADEB-4916-9D7B-2859DAC597DF}" Then RunWait($UninstallString) ElseIf $entry = "{2C24C6C3-41A0-4E19-8EAE-78E9C928433E}" Then RunWait('msiexec /x "' & $var[1] & '"') ElseIf $entry = "{4B99E166-E028-4FC2-BF8D-FB40CE0A6FAE}" Then RunWait('msiexec /x "' & $var[2] & '"') ElseIf $entry = "{E6BD5A9E-65E0-4139-A535-0D9FF61443FF}" Then ;RunWait('msiexec /x "' & $var[3] & '"') RunWait($UninstallString) $CMD = EndIf If $UninstallString <> "" Then ;$message &= "Uninstall: '" & $UninstallString & "'" ;MsgBox(4096, "SubKey #" & $i & ": " & $entry, $message) EndIf EndIf WEnd EndFunc
    1 point
  11. Zedna

    Double Click on List View

    Here is fixed second part of your own ListView (display data in ListView): #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <GuiListView.au3> #include <Misc.au3> ;~ Opt("TrayIconDebug", 1) Dim $aArray[3] $aArray[0] = '01' $aArray[1] = '02' $aArray[2] = '03' Global $g_hListView Example() Func Example() Local $hGUI, $hImage $hGUI = GUICreate("Form1", 202, 614, 192, 124) Global $g_hListView = _GUICtrlListView_Create($hGUI, 'Column 1', 8, 8, 185, 591) _GUICtrlListView_SetExtendedListViewStyle($g_hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES)) ;~ _GUICtrlListView_InsertColumn($g_hListView, 0, "Column 1", 100) For $i = 0 To UBound($aArray) - 1 _GUICtrlListView_AddItem($g_hListView, $aArray[$i], 0) Next GUISetState(@SW_SHOW) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo ; Local $tBuffer $hWndListView = $g_hListView If Not IsHWnd($g_hListView) Then $hWndListView = GUICtrlGetHandle($g_hListView) $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) _DebugPrint("$NM_DBLCLK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func _DebugPrint($s_Text, $sLine = @ScriptLineNumber) ConsoleWrite( _ "!===========================================================" & @CRLF & _ "+======================================================" & @CRLF & _ "-->Line(" & StringFormat("%04d", $sLine) & "):" & @TAB & $s_Text & @CRLF & _ "+======================================================" & @CRLF) EndFunc ;==>_DebugPrint
    1 point
  12. Zedna

    Double Click on List View

    1) Try to add ControlFocus(...) before your Send("^c") to activate your target control 2) What ClassName is your target control (check it by Au3Info)? If it's SysListView32 then use standard AutoIt' ListView functions to get data from it instead of ClipBoard commands
    1 point
  13. Hey thanks a lot for all your help I was able to get the data I needed via Local $sText = ControlGetText($hWnd, "", "ThunderRT6TextBox84")
    1 point
  14. Jos

    A Non-Strict JSON UDF (JSMN)

    I have no idea as your provided scenario is very explicit. It probably all depends what kind of lexing you need to do with those text files when reading processing them. Just give it a try and simply test it would be the best advice as that will give you a conclusive answer. Jos
    1 point
  15. Melba23

    ScreenCapture

    jbuena1234, Welcome to the AutoIt forums. Take a look here: You specifically need the WinAPIConv file, but we suggest you copy all 6 files. A new release is coming soon, which will fix all these. M23
    1 point
  16. BatMan22

    AutoIt v3 Window Info

    Like Bilgus said, use the control commands where/when possible. ControlClick/ControlSetText/ControlGetText are a few examples, they don't have the usual problems that MouseClick does, for example, if you change the window size, unless you're set coordinates to Window mode and those are window coordinates, your mouse click will 'miss', Even with window mode enabled it will still miss something based on other factors. The way you have done it, with WinWait/WinActivate before and ControlClick after and your program will almost never fail. Good luck dude.
    1 point
  17. Bilgus

    AutoIt v3 Window Info

    Control Click is the way to go if you can find the button ControlClick ( "title", "text", controlID [, button = "left" [, clicks = 1 [, x [, y]]]] ) And the cool thing is that you can use the data under AdvancedMode to get the right control See: Controls in the help file it outlines it pretty well
    1 point
  18. There are two ToolbarWindow32 sub-classes in the Shell_TrayWnd class. We need the "User Promoted Notification Area" one. So use the following code $hSysTray_Handle = ControlGetHandle("[Class:Shell_TrayWnd]", "", "User Promoted Notification Area") Compile X64 version and use it in Windows 10 (works in Window 7 as well).
    1 point
  19. This is a UDF I created for myself, to handle file locking on an SQLite database that was being shared on a network. Since I did not want to run a process on the server to handle the file locking, I needed a way to avoid write conflicts from the clients themselves. ********** Thanks to an ISP problem, the ZIP download is not available. The most recent code will be maintained here. ********** Updated to work with 64-bit Win7 Minor performance enhancement as proposed by orbs (see >post #15) If you want to see it in action, before implementing it in your own production scripts, I have written up a little demo here: Make sure to set $logpath and $logfile to a proper location on your PC or network. Run the demo as many times as you like on a single machine to simulate multiple machines, or run on several machines. You will be able to see when each session gets its "lock" on the log file. You can also look at the log file itself to see what sessions/machines got access. NOTE: Because of the way Windows handles multitasking, you will probably see groupings of the same session getting its lock several times before the next one. This is because Windows does not do a very good job of sharing the processor between applications, so one session may make several iterations before Windows pulls processor time away for the next session. You will see a better distribution if you actually use multiple machines rather than simulated machines. For those who are wanting them, here are the "help" files that were included in the original ZIP file. Nothing spectacular. They are just a cut back demo designed to look like what would be in the help file if this were included.
    1 point
×
×
  • Create New...