Jump to content
Sign in to follow this  
GordonFreeman

WTL_LISTVIEW Problem Right Click Item

Recommended Posts

GordonFreeman

[CLASS:WTL_LISTVIEW; INSTANCE:2]

Hi, i need right click on item of a listview -> Select 3 (third) in "Menu of a item of a listview"

#RequireAdmin
$Total = ControlListView("Window1", "", "[CLASS:WTL_LISTVIEW; INSTANCE:2]", "GetItemCount")

For $i = 1 to $Total
ControlListView("Window1", "", "[CLASS:WTL_LISTVIEW; INSTANCE:2]", "Select", $i)
ControlClick("Window1", "", "[CLASS:WTL_LISTVIEW; INSTANCE:2]", "right", 1)
Next

But ControlClick only Open the Menu for me. Not click. Some other method?

Share this post


Link to post
Share on other sites
FireFox

Hi,

You can use the _GUICtrlListView_* functions with the listview handle retrieved.

#include <GUIListView.au3>

Global $hLw = ControlGetHandle("Window1", "", "[CLASS:WTL_LISTVIEW; INSTANCE:2]")

_GUICtrlListView_ClickItem($hLw, 2) ;index based 0

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
GordonFreeman

Ty man, but i already try it. Not work. The handle is correct but nothing happens. I think it is a more complex listview.

With click works but only can open the menu and not click on the third menu item

Any idea?

I retest and the same thing happened the original script. He opens the "menu item", but not click on anything

Edited by GordonFreeman

Share this post


Link to post
Share on other sites
FireFox

Then it's a menu, not a listview. Test with the _GUICtrlMenu* functions.

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
GordonFreeman

Then it's a menu, not a listview. Test with the _GUICtrlMenu* functions.

Br, FireFox.

Really, but is a menu of list view (When right click on item listview the menu appears). I try Autoit Windows info in Menu and Get:

Posted Image

Share this post


Link to post
Share on other sites
FireFox

Try this :

Global $hUltraISOWnd, $aPos, $aRet

$hUltraISOWnd = WinGetHandle("UltraISO")

$aPos = WinGetPos($hUltraISOWnd)

$aRet = DllCall("user32.dll", "int", "WindowFromPoint", "long", $aPos[0] + $aPos[2] - 15, "long", $aPos[1] + 140)
ControlClick($hUltraISOWnd, "", $aRet[0], "right", 1, 10, 21 + 10)

ControlSend($hUltraISOWnd, "", "", "{DOWN 3}{ENTER}")

Br, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
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
Sign in to follow this  

×