Jump to content

Recommended Posts

Posted

how can I choose a control like "computer management" in start menu:
I mean I know that to reach to the start I have to write Send("^{ESC}")  but how can I press on any button in the menu:

thanks............

  • 3 weeks later...
Posted

Why not just run "compmgmt.msc"?

(also every topic you start is getting moved to new forum by the mods -> please open topics in the general help and support forums...)

Always carry a towel.

Posted (edited)

Or you may prefer this approach :lol:

#include <Constants.au3>
#include <GUIConstants.au3>
#include <GuiListView.au3>

Opt ("MustDeclareVars", 1)
Opt ("MouseCoordMode", 1)

if not @AutoItX64 and @OSArch = "X64" then Exit MsgBox (0,"Error","This script only works when run in 64bits")

Send('{LWIN}')
Sleep (500)

Global $hListView = ControlGetHandle("[CLASS:DV2ControlHost]", "", "[CLASS:SysListView32;INSTANCE:1]")
If @error Then Exit MsgBox(0, "Error..", "Unable to get Menu Start handle")

Global $pos = WinGetPos ($hListView)

Local $Item = _GUICtrlListView_FindText ($hListView, "Icon name")
if $Item = -1 then Exit MsgBox(0, "Error..", "Name of the icon doesn't exist")

Local $Rect = _GUICtrlListView_GetItemRect ($hListView,$Item,1)
Local $x = $Rect[0]+int(($Rect[2]-$Rect[0])/2) + $pos[0]
Local $y = $Rect[1]+int(($Rect[3]-$Rect[1])/2) + $pos[1]

ToolTip ("Here is the shortcut you want to click on",$x,$y,"FYI...",$TIP_INFOICON,$TIP_BALLOON+$TIP_FORCEVISIBLE)
Sleep (3000)
MouseMove ($x, $y)
Sleep (3000)
MouseClick ("left")
Sleep (1000)

 

Edited by Nine

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
  • Recently Browsing   0 members

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