Jump to content

Mouseclick in program does not work


panyamap
 Share

Recommended Posts

I've tried placing it before the mouseclick event, tried it after the mouseclick event even without mouseclick but nothing seem to work. it even seem delayed. When it should press it seems paused and then suddenly resumes with the rest of the script while the screen isn't there yet.

also nothing was being highlighted.

Link to comment
Share on other sites

  • Moderators

panyamap,

We are getting nowhere here because none of us know what this app is, which controls you are trying to activate, and what is supposed to happen when you do. So I suggest we go back and start again from the very beginning. :)

Open the app you wish to automate and use the Window Info tool to get the identity of the control you wish to action. I know you have already posted that data, but run the tool again and make absolutely sure that you have the correct control highlighted on the app. Then create a single line ControlClick script along the lines of the one I gave you above and see if that will action that single control when run. If it does action the control then we can continue to develop a longer script to automate your app. If it does not (and this is quite likely as many apps do not use the standard Windows API to create their controls) we are in a more difficult place and will have to resort to other methods of locating the controls so that MouseClick stands a chance of hitting the right spot on the GUI. :)

But give the single line script a go first and see if that works - keep your fngers crossed! ;)

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

Tried again what you have asked me to do check everything and yet it won't click anything with a single line of code.

To be more informative, BlueStacks is an Android Emulator, and I'm trying to interact with a applicating within that, as I've seen videos of others doing it but not sharing there code so I have to try on my own.

Hope that might help. I also tried hovering over several locations to see if some information would change, just to be sure I got the right part selected, yet nothing happens.

Link to comment
Share on other sites

As M23 told me to I've done what he has asked me to, I use the code I have posted and the line he has posted as it's the only line I can conclude from the summary window. I have no idea how to give more information as I've written above.

I tried the following:

- the code m23 gave as a single line

- movemouse (coords) then the code m23 gave

- movemouse (coords) then the click action and then the code m23 gave

- all of the above in reverse orders and solo, none has worked nor was something highlighted.

Also searched in the Help file and tried adding coords to the ControlClick, which didn't make it work at all. So JohnOne if you have any other idea of how I can provide more information please elaborate on this and let me know how so I can do so. I'm trying as much as I can understand from it all.

Link to comment
Share on other sites

Study this code

Run('calc.exe')
WinWait("Calculator")
WinActivate("Calculator")
WinWaitActive("Calculator")
ControlClick("Calculator","","[CLASS:Button; INSTANCE:10]")

Now use wininfo tool on calculator window 5 button and look again at code, then back at winifo ....

Until you see what is going on.

That is at it's most basic use.

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

The BlueStacks program doesn't have normal windows controls, so using ControlClick isn't going to work. You're going to need to click by mouse coordinates.

BTW, what program in BlueStacks are you trying to automate? It might be easier to figure out what you need if we knew that.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

  • Moderators

panyamap,

Read the Forum rules (there is also a link at bottom right of each page) - particularly the bit about not discussing game automation - before you post again. Thread locked. :naughty:

A pity you did not read them earlier - then you would not have wasted so much of everyone's time. :mad:

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...