Sign in to follow this  
Followers 0
panyamap

Mouseclick in program does not work

32 posts in this topic

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

I'm rather confused where to get this info from.

is that in my editor or ?

Share this post


Link to post
Share on other sites

sorry but can you be really specific here, I'm new to autoit and I don't know what you need in my install folder. this just isn't that clear.

Share this post


Link to post
Share on other sites

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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

and with this tool I can find the info I need for the controls? because I'm trying for a program called BlueStacks.

Share this post


Link to post
Share on other sites

panyamap,

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

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

what should I do with this?

Share this post


Link to post
Share on other sites

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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

will this highlight the button when it's going to press them(just trying to understand all functions of autoit)

Share this post


Link to post
Share on other sites

panyamap,

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

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

Ill try it in a bit first dinner, will report back in a bit^^ thanks for the help and pointers :) appriciate it!

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0