Jump to content

Click Item


careca
 Share

Recommended Posts

 

Hi, so i have this code that im working on, to automate a file association

The problem is that once i get to the window in the screenshot, i can't click on it and move on.

#include <GuiListView.au3>
Local $ext='mp4'
ShellExecute(@WindowsDir&'\system32\control.exe', '/name Microsoft.DefaultPrograms /page pageFileAssoc')
WinWaitActive("Set Associations", 'Set Associations', 3)
$hWnd = WinGetHandle("[CLASS:CabinetWClass]", "Set Associations")
Do
$Vis = ControlCommand($hWnd, "", "[CLASS:Button; INSTANCE:1]", 'IsVisible')
Until $Vis = 1
$iCount = ControlListView($hWnd, "", "SysListView321", "GetItemCount")
For $i = 0 To $iCount-1
$sText1 = ControlListView($hWnd, "", "SysListView321", "GetText", $i, 0)
$sText2 = ControlListView($hWnd, "", "SysListView321", "GetText", $i, 2)
If $sText1 = '.'&$ext Then
    ControlListView($hWnd, "", "SysListView321", "Select", $i, $i)
    ConsoleWrite('============================================================================='&@CRLF)
    ConsoleWrite('Line - '& $i &' - '&$sText1&@CRLF)
    ConsoleWrite('============================================================================='&@CRLF)
    ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:1]")
EndIf
Next

Some of "inspect" info, full on the anex:

How found:  Mouse move (1151,711)
    hwnd=0x00000000003405D8 64bit class="DirectUIHWND" style=0x56000000 ex=0x0
Name:   "More apps"
ControlType:    UIA_HyperlinkControlTypeId (0xC355)
LocalizedControlType:   "link"
BoundingRectangle:  {l:1081 t:686 r:1471 b:736}
IsEnabled:  true
IsOffscreen:    false
IsKeyboardFocusable:    true
HasKeyboardFocus:   false
ProcessId:  7300
RuntimeId:  [1C84.54E14860.1A1]
AutomationId:   "OptionsButton"
FrameworkId:    "DirectUI"
ClassName:  "TouchHyperLink"
IsControlElement:   true
IsContentElement:   true
ProviderDescription:    "[pid:7300,providerId:0x0 Main(parent link):Unidentified Provider (unmanaged:DUI70.dll)]"

Can't do anything with au3info, because as soon as the window loses focus, it disappears.

Untitled.jpg

More apps.txt

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

7 minutes ago, junkew said:

Simplespy will help you. See faq31

Used inspect, isn't it similar? The results of inspect.exe are in the more apps.txt in anex.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...