Jump to content

Mouseclick in program does not work


panyamap
 Share

Recommended Posts

Hey there community,

I'm still new to this autoit scripting so bare with me. I've tried to make a script to work with the program called: BlueStacks.

In this script I want it to click on some locations with a sleep timer in between, now the annoying part is that it sometimes clicks and sometimes it just doesn't or delayed whilest there is no delay typed out in the script in the clicking.

So my question to you all is why does the click function work or does not from time to time. Because this basically breaks my script and makes it useless.

Hope to hear from you soon!

~panyamap

Link to comment
Share on other sites

I would hazard a guess that it might have something to do with how the window handles it's messages, and might be down to whatever language it has been developed in.

First thing I'd try is ControlClick()

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

How does Control click work and how should I put that in the code ?

MouseMove(815, 750, 10)
MouseClickDrag("left", 815, 750, 815, 280, 50)
MouseClickDrag("left", 815, 750, 815, 280, 50)

MouseMove(960, 380, 10)
Sleep (2000)
MouseClick("left", 960, 380)

Sleep (6000)
MouseClick("left")

MouseMove(690, 875, 10)
Sleep (2000)
MouseClick("left", 690, 875)

MouseMove(990, 230, 15)
Sleep (2000)
MouseClick("left", 990, 230, 2)
Sleep (2000)

MouseMove(985, 365, 15)
Sleep (2000)
MouseClick("left", 985, 365, 2)
Sleep (2000)

MouseMove(690, 875, 15)
Sleep (2000)
MouseClick("left", 690, 875, 2)

MouseMove(950, 875, 15)
Sleep (3000)
MouseClick("left", 950, 875)

MouseMove(990, 310, 15)
Sleep (3000)
MouseClick("left", 990, 310)

MouseMove(985, 565, 15)
Sleep (3000)
MouseClick("left", 985, 565, 2)

MouseMove(690, 875, 15)
Sleep (2000)
MouseClick("left", 690, 875, 2)

should it replace mouseclick or added after mouseclick or before as a precaution

Link to comment
Share on other sites

  • Moderators

panyamap,

Firstly, I have lifted the 5 post limitation on new members - so no worries about that from now on. :)

Secondly, the Window Info tool JohnOne is referrring to is found at C:Program FilesAutoIt3Au3Info.exe if you did a standard install. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

panyamap,

So run your BlueStacks app and then move the "gunsight" over the GUI - the info you require should appear in the tool. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

>>>> Window <<<<

Title: BlueStacks App Player for Windows (beta-1)

Class: WindowsForms10.window.8.app.0.33c0d9d

Position: 20, 20

Size: 1606, 976

Style: 0x16CA0000

ExStyle: 0x00050100

Handle: 0x00150522

>>>> Control <<<<

Class: BlueStacksApp

Instance: 1

ClassnameNN: BlueStacksApp1

Name:

Advanced (Class): [CLASS:BlueStacksApp; INSTANCE:1]

ID:

Text: _ctl.Window

Position: 547, 0

Size: 506, 900

ControlClick Coords: 400, 384

Style: 0x58000000

ExStyle: 0x00000000

Handle: 0x0002065E

>>>> Mouse <<<<

Position: 970, 429

Cursor ID: 0

Color: 0xFDFFFE

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<

_ctl.Window

Link to comment
Share on other sites

  • Moderators

panyamap,

You place the data you have now obtained into a ControlClick command and see if it works. ;)

I would suggest trying something like:

ControlClick("[CLASS:WindowsForms10.wind&#111;w.8.app.0.33c0d9d]", "", "[CLASS:BlueStacksApp]")

and see if that actions the control you highlighted (highlit?) with the Window Info tool. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

panyamap,

It will (hopefully) click the button - which should highlight it automatically. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

forgot to ask, where should I put that code in my code?

MouseMove(815, 750, 10)

MouseClickDrag("left", 815, 750, 815, 280, 50)

MouseClickDrag("left", 815, 750, 815, 280, 50)

MouseMove(960, 380, 10)

Sleep (2000)

MouseClick("left", 960, 380)

Sleep (6000)

MouseClick("left")

MouseMove(690, 875, 10)

Sleep (2000)

MouseClick("left", 690, 875)

MouseMove(990, 230, 15)

Sleep (2000)

MouseClick("left", 990, 230, 2)

Sleep (2000)

MouseMove(985, 365, 15)

Sleep (2000)

MouseClick("left", 985, 365, 2)

Sleep (2000)

MouseMove(690, 875, 15)

Sleep (2000)

MouseClick("left", 690, 875, 2)

MouseMove(950, 875, 15)

Sleep (3000)

MouseClick("left", 950, 875)

MouseMove(990, 310, 15)

Sleep (3000)

MouseClick("left", 990, 310)

MouseMove(985, 565, 15)

Sleep (3000)

MouseClick("left", 985, 565, 2)

MouseMove(690, 875, 15)

Sleep (2000)

MouseClick("left", 690, 875, 2)

Link to comment
Share on other sites

  • Moderators

panyamap,

How am I supposed to know? You put it at the place in that script where you need to click the button, but as I have no idea what that collection of Mouseclicks are supposed to do I cannot say where that is. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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