roberttz Posted July 13, 2010 Share Posted July 13, 2010 Hi folks,I am newbieIn regard to my previous post http://www.autoitscript.com/forum/index.php?showtopic=116834 I started new thread (sorry I didn't get further answer that I anticipated and I thought no one would check in anymore).Here's the problem:In the program LANView I need to press the "Start" button (to start measure traffic from WiFi adapter in my WLAN) using AutoIt script. Below I attach two screens from the software:Screen1. Overview program Screen2. left field menu where the buttons are placed. I tried to use AU3Info to grab information about Control ID's, classes etc. (AU3Info borders everything same as in Screen2), but It seems there are no controlID button to which I can refer. Just see this code:expandcollapse popup>>>> Window <<<< Title: LANView 3.1.0 - TSRh Team Class: TfrmMain Position: -8, -8 Size: 1296, 786 Style: 0x17CF0000 ExStyle: 0x00010100 Handle: 0x00070800 >>>> Control <<<< Class: TJvOutlookBar Instance: 1 ClassnameNN: TJvOutlookBar1 Name: Advanced (Class): [CLASS:TJvOutlookBar; INSTANCE:1] ID: 329370 Text: Position: 0, 64 Size: 129, 660 ControlClick Coords: 36, 258 Style: 0x54000000 ExStyle: 0x00000000 Handle: 0x0005069A >>>> Mouse <<<< Position: 36, 342 Cursor ID: 0 Color: 0xA6CAF0 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< 192.168.1.3 (255.255.255.248) ActionMainMenuBar1 Traffic Monitor: Done TabSheet6 >>>> Hidden Text <<<< Search 300 7 1 168 192 0 1 168 192 Adapter 10 TabSheet9 TabSheet8 TabSheet7 TabSheet5 StatisticThe only available control uses TJvOutlookBar class. I googled TJvOutlookBar and checked this is some Delphi libary from JVCL package, commonly used to create left menu same as eg. Outlook. To me it means nothing, I am no programmer. ;]Anyway...meanwhile I was checking different tags from AU3Info "Control" section I noticed that only changes ControlClick Coords values. I do not know if this might be helpful?Once again I kindly ask for your help, because I don't know what to do. Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 13, 2010 Share Posted July 13, 2010 I don't think you are going to get handles or ControlID to the individual icon/buttons on that toolbar. You would have to ControlClick() to the appropriate coordinates, or maybe use shortcuts. Can you 'start' via the keyboard with something like Alt-f, Alt-s? If so, you could ControlSend() those keystrokes. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
roberttz Posted July 13, 2010 Author Share Posted July 13, 2010 P.S Someone suggested me to use ImageSearch libary (I tried to search something about it on the forum,but returned 10 pages makes me fell confused),which recognize buttons as pictures and tries to find them on the screen and click it.But I don't know if this will work out, especially when I want run script on different computers with different: screen resolution, settings etc. Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 13, 2010 Share Posted July 13, 2010 Did you investigate the keyboard short cuts? That would ultimately be much more reliable, if available. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
roberttz Posted July 13, 2010 Author Share Posted July 13, 2010 No, actually the program does not support hot keys ;/ thats a problem Link to comment Share on other sites More sharing options...
bo8ster Posted July 14, 2010 Share Posted July 14, 2010 So here is the issue. You are trying to get a button within a control - the 'button' may not be registered within windows so you may not be able to get it. Its like trying to get the control handle of an element within a list control, you just can't do that in that way. I would believe the AutoIt Info tool is correct in what it returns and if it does not see the difference between them its going to be heard. A simple solution might be using MouseMove and MouseClick. Also have a look at MouseCoordMode option. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now