panyamap Posted February 24, 2013 Share Posted February 24, 2013 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 More sharing options...
JohnOne Posted February 24, 2013 Share Posted February 24, 2013 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 More sharing options...
panyamap Posted February 24, 2013 Author Share Posted February 24, 2013 How does Control click work and how should I put that in the code ? expandcollapse popupMouseMove(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 More sharing options...
JohnOne Posted February 24, 2013 Share Posted February 24, 2013 You need to get a control name/class along with window name. If you post whole content of summary tab from window info tool, you will have better success with help. 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 More sharing options...
panyamap Posted February 24, 2013 Author Share Posted February 24, 2013 I'm rather confused where to get this info from. is that in my editor or ? Link to comment Share on other sites More sharing options...
JohnOne Posted February 24, 2013 Share Posted February 24, 2013 It's in your autoit install folder. 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 More sharing options...
panyamap Posted February 24, 2013 Author Share Posted February 24, 2013 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. Link to comment Share on other sites More sharing options...
JohnOne Posted February 24, 2013 Share Posted February 24, 2013 Is there an applivation in your AutoIt install folder named "autoit window info.exe"? 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 More sharing options...
Moderators Melba23 Posted February 24, 2013 Moderators Share Posted February 24, 2013 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Developers Jos Posted February 24, 2013 Developers Share Posted February 24, 2013 Au3Info.exe or Au3Info_x64.exe in the AutoIt3 program directory. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
panyamap Posted February 24, 2013 Author Share Posted February 24, 2013 and with this tool I can find the info I need for the controls? because I'm trying for a program called BlueStacks. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 24, 2013 Moderators Share Posted February 24, 2013 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
panyamap Posted February 24, 2013 Author Share Posted February 24, 2013 >>>> 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 More sharing options...
panyamap Posted February 24, 2013 Author Share Posted February 24, 2013 what should I do with this? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 24, 2013 Moderators Share Posted February 24, 2013 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.window.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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
panyamap Posted February 24, 2013 Author Share Posted February 24, 2013 will this highlight the button when it's going to press them(just trying to understand all functions of autoit) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 24, 2013 Moderators Share Posted February 24, 2013 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
panyamap Posted February 24, 2013 Author Share Posted February 24, 2013 Ill try it in a bit first dinner, will report back in a bit^^ thanks for the help and pointers appriciate it! Link to comment Share on other sites More sharing options...
panyamap Posted February 24, 2013 Author Share Posted February 24, 2013 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 More sharing options...
Moderators Melba23 Posted February 24, 2013 Moderators Share Posted February 24, 2013 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts