multi Posted July 20, 2010 Share Posted July 20, 2010 hi @ all, i have a problem with the controlclick. i want to create a script for a automated installation of a software. I usually use for this function something like this: ControlClick("MOVITOOLS®-MotionStudio 5.50","text","[CLASS:TPanel; INSTANCE:5]") but with this software the first click doesn't work. if I make the first click itself the others work. now I try the same function with coordinates: >>>> Window <<<< Title: MOVITOOLS®-MotionStudio 5.50 Class: TMainForm Position: 396, 295 Size: 608, 459 Style: 0x16C80000 ExStyle: 0x00010100 Handle: 0x0015024C >>>> Control <<<< Class: TPanel Instance: 5 ClassnameNN: TPanel5 Advanced (Class): [CLASS:TPanel; INSTANCE:5] ID: 852884 Text: Position: 488, 395 Size: 97, 28 ControlClick Coords: 26, 15 Style: 0x56010000 ExStyle: 0x00010000 Handle: 0x000D0394 >>>> Mouse <<<< Position: 913, 727 Cursor ID: 2 Color: 0xB2C5D1 i tried the following: ControlClick("MOVITOOLS®-MotionStudio 5.50", "text", 852884 [, "[CLASS:TPanel;Instance5]" [, 1 [, 26 [, 15]]]] ) .. nothing.. what am i doing wrong? or is it because of the software? thanks multi Link to comment Share on other sites More sharing options...
Yoriz Posted July 20, 2010 Share Posted July 20, 2010 Hi, welcome to the forum. You may or my not of noticed this in the remarks of ControlClick Some controls will resist clicking unless they are the active window. Use the WinActivate() function to force the control's window to the top before using ControlClick().give that a try if you never realised. Note that you dont use the [] when a function is showing optional parameters just omit them. GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF. Link to comment Share on other sites More sharing options...
JohnOne Posted July 20, 2010 Share Posted July 20, 2010 If you "usually use for this function" then you should know that almost everything is wrong with this. ControlClick("MOVITOOLS®-MotionStudio 5.50", "text", 852884 [, "[CLASS:TPanel;Instance5]" [, 1 [, 26 [, 15]]]] ) 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...
Bert Posted July 20, 2010 Share Posted July 20, 2010 you can also look to see if the install file has command line support. Many install programs have this and you can simplify the install to one line of code. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
multi Posted July 21, 2010 Author Share Posted July 21, 2010 @ yoriz I have used the function WinActivate. @JohnOne I've written many scripts and it always worked. @Volly I talked to someone from the support. He said that there works no automatic installation so far. Link to comment Share on other sites More sharing options...
multi Posted July 23, 2010 Author Share Posted July 23, 2010 any other ideas? Thanks multi Link to comment Share on other sites More sharing options...
bo8ster Posted July 23, 2010 Share Posted July 23, 2010 @JohnOneI've written many scripts and it always worked.Well mate you best check again. That is by no means correct for many reasons.I suggest you search the forum for examples of how it is meant to be done. I also suggest you get the window handle first (WinGetHande()) then use that in the ControlClick() for simplicity. 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