Jump to content

How do make mouse click the selected item?


Recommended Posts

Ok,

Posted Image

See, i have tabbed to the checkbox, now i just need the mouse to click once on the checkbox,

How can i do this without using co-ordinates?

I cant use {ENTER} because or else it just goes to a new page with an error saying i didnt select anything.

# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

  • Moderators

Ok,

Posted Image

See, i have tabbed to the checkbox, now i just need the mouse to click once on the checkbox,

How can i do this without using co-ordinates?

I cant use {ENTER} because or else it just goes to a new page with an error saying i didnt select anything.

Look at ControlCommand() in the help file.

Edit: By the way thats a radio button, not a checkbox

Edited by big_daddy
Link to comment
Share on other sites

HI,everybody!! :D

I be a member of this forum today!!(My English is very poor!! :"> )

Post #2,big_daddy!!HI,I also have a problem of this!!But my problem is I couldn't uncheck the checkbox while the checkbox was checked.I used a lot of methods for this,but failed!!

First method,I used the key word "send":send("{TAB}{SPACE}") .In this instance,I use the para "{space}" make the checked checkbox be unchecked,but.... :(

Second, I use ControlCommand() ,but also failed.

so,I need you help!!How could I make it uncheck!!Thank you!! :)

"This is not on a wedpage"!!

Link to comment
Share on other sites

PS:

use C:\PROGRA~1\AUTOIT3\AU3INFO.EXE for your REAL names & control ID's

open AU3INFO.EXE and open Q2055 ecc activate it (mouse click) and see the

result in AU3INFO

ControlCommand

---------------------------------------------------------------------------­-----

Sends a command to a control.

ControlCommand ( "title", "text", controlID, "command" [, "option"] )

Command, Option Return Value

"IsChecked", "" Returns 1 if Button is checked, 0 otherwise

"Check", "" Checks radio or check Button

"UnCheck", "" Unchecks radio or check Button

; generic sample in a form named Aform1 with 1 checkbox named Button1

AutoItSetOption("WinTitleMatchMode", 4) 
WinActivate("AForm1") 
  WinWaitActive( "AForm1", "", 5 ) 
 WinActivate("AForm1") 
$a = ControlCommand ( "AForm1", "ACheckbox1", "Button1", "IsChecked", "") 
MsgBox(262144, "", $a) 
Sleep(2000) 
ControlCommand ( "AForm1", "ACheckbox1", "Button1", "Check", "") 
$a = ControlCommand ( "AForm1", "ACheckbox1", "Button1", "IsChecked", "") 
MsgBox(262144, "", $a) 
Sleep(2000) 
ControlCommand ( "AForm1", "ACheckbox1", "Button1", "UnCheck", "") 
$a = ControlCommand ( "AForm1", "ACheckbox1", "Button1", "IsChecked", "") 
MsgBox(262144, "", $a) 
oÝ÷ ÚmÚÊyú+ú+Wè®×¬¶)àjëh×6
#include <GUIConstants.au3> 
; == GUI generated with Koda ==); 
$Form1 = GUICreate("AForm1", 527, 324, 194, 127) 
$Checkbox1 = GUICtrlCreateCheckbox("ACheckbox1", 184, 64, 97, 17) 
GUISetState(@SW_SHOW) 
While 1 
 $msg = GuiGetMsg() 
 Select 
 Case $msg = $GUI_EVENT_CLOSE 
  ExitLoop 
 Case Else 
  ;;;;;;; 
 EndSelect 
WEnd
Edited by Lapo
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...