Sign in to follow this  
Followers 0
iCrypto

Click Toolbar Button and open other File Format

6 posts in this topic

Hello,

im trying to automate the TMCL-IDE, its a Step Motor Development Program.

I want to click 3 Buttons, later I will post the infos I got by AutoIT Window info Tool

Here a Screenshot:

Here are the Infos of the Buttons:

First one: Play Script

Spoiler

>>>> Window <<<<
Title:    TMCL Integrated Development Environment - [New File 1]
Class:    TFEditor
Position:    175, 168
Size:    1077, 993
Style:    0x16CF0000
ExStyle:    0x00010100
Handle:    0x00070428

>>>> Control <<<<
Class:    TToolBar
Instance:    1
ClassnameNN:    TToolBar1
Name:    
Advanced (Class):    [CLASS:TToolBar; INSTANCE:1]
ID:    525372
Text:    
Position:    0, 0
Size:    1061, 31
ControlClick Coords:    197, 15
Style:    0x5600884E
ExStyle:    0x00010000
Handle:    0x0008043C

>>>> Mouse <<<<
Position:    380, 233
Cursor ID:    0
Color:    0x000000

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
[New File 1]
    


>>>> Hidden Text <<<<

Button 2: Stop

Spoiler

>>>> Window <<<<
Title:    TMCL Integrated Development Environment - [New File 1]
Class:    TFEditor
Position:    175, 168
Size:    1077, 993
Style:    0x16CF0000
ExStyle:    0x00010100
Handle:    0x00070428

>>>> Control <<<<
Class:    TToolBar
Instance:    1
ClassnameNN:    TToolBar1
Name:    
Advanced (Class):    [CLASS:TToolBar; INSTANCE:1]
ID:    525372
Text:    
Position:    0, 0
Size:    1061, 31
ControlClick Coords:    220, 15
Style:    0x5600884E
ExStyle:    0x00010000
Handle:    0x0008043C

>>>> Mouse <<<<
Position:    403, 233
Cursor ID:    0
Color:    0x000000
 

Button 3: Continue

Spoiler

>>>> Window <<<<
Title:    TMCL Integrated Development Environment - [New File 1]
Class:    TFEditor
Position:    175, 168
Size:    1077, 993
Style:    0x16CF0000
ExStyle:    0x00010100
Handle:    0x00070428

>>>> Control <<<<
Class:    TToolBar
Instance:    1
ClassnameNN:    TToolBar1
Name:    
Advanced (Class):    [CLASS:TToolBar; INSTANCE:1]
ID:    525372
Text:    
Position:    0, 0
Size:    1061, 31
ControlClick Coords:    242, 15
Style:    0x5600884E
ExStyle:    0x00010000
Handle:    0x0008043C

>>>> Mouse <<<<
Position:    425, 233
Cursor ID:    0
Color:    0x000000

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
[New File 1]
    


>>>> Hidden Text <<<<
 

 

autoitscript.JPG

Share this post


Link to post
Share on other sites



Read in Helpfile about ControlCommand.

 

Share this post


Link to post
Share on other sites
3 minutes ago, AutoBert said:

Read in Helpfile about ControlCommand.

 

Reading it, so I understood this:

ControlCommand($hWnd,"","  [CLASS:TToolBar; INSTANCE:1]","dontknow")

What is the last Parameter? I didnt really understand it, I think  you send a command to the Program, but how can I know what Function is getting executed when you press the play button??

Share this post


Link to post
Share on other sites

Try this:

ControlCommand($hWnd,"","  [CLASS:TToolBar; INSTANCE:1]","SendCommandID","1")   ; test with 0 to no of Toolbarbuttons instead of 1

I am downloading the TCML-IDE, after last race of MotoGP is finished, i will have a look myself. Da du aber auch im dt. Forum ein Thema eröffnest hast werde ich dann dort antworten.

Share this post


Link to post
Share on other sites

Nope doesnt work, tried up to 10 

Share this post


Link to post
Share on other sites

I know it's not the best, but:

ControlClick($hWnd, "", "[CLASS:TToolBar; INSTANCE:1]", "left", 1, 380, 233); Play Script
ControlClick($hWnd, "", "[CLASS:TToolBar; INSTANCE:1]", "left", 1, 220, 15); Stop
ControlClick($hWnd, "", "[CLASS:TToolBar; INSTANCE:1]", "left", 1, 242, 15); Continue

I don't know if your mouse position matches the controls you want to click, so you might want to re-check those before run.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0