Jump to content

[solved] ToolbarWindow32 one button click


atanik
 Share

Recommended Posts

Hello Friends,

İ have a program and inside of program i am opening 9 windows in same time. All windows has same buttons.  İ want to click "refresh" button in sometimes. Normally it is difficult to do it manually.So i want to use autoit and click for me with some delay. 

 

Windows 1 Detials.

>>>> Control <<<<
Class:    ToolbarWindow32
Instance:    1
ClassnameNN:    ToolbarWindow321
Name:    
Advanced (Class):    [CLASS:ToolbarWindow32; INSTANCE:1]
ID:    5604

.........................................................................................

Windows 9 Detials.

>>>> Control <<<<
Class:    ToolbarWindow32
Instance:    9
ClassnameNN:    ToolbarWindow329
Name:    
Advanced (Class):    [CLASS:ToolbarWindow32; INSTANCE:9]
ID:    5604

 

i tried with controlclick. But i was not success. Can you help me with this problem solving please? İ marked as RED. And all windows has such dynamic differencess.

NOTE: Sorry for my english. English is not my mother language. İf i could not explain well. please ask me detials. 

Thank you.

 

 

 

 

Edited by atanik
Link to comment
Share on other sites

Code:

While 1
If ProcessExists('MsWin.exe') Then
If WinWait("[CLASS:MetaStockMainWnd]", "", 2) Then ;
    $hWin = WinGetHandle("[CLASS:MetaStockMainWnd]") ; 

    ControlClick("", "", "[ClassnameNN:ToolbarWindow321; INSTANCE:1; ID:5604]")
    ControlClick("", "", "[ClassnameNN:ToolbarWindow322; INSTANCE:2; ID:5604]")
    ControlClick("", "", "[ClassnameNN:ToolbarWindow323; INSTANCE:3; ID:5604]")
    ControlClick("", "", "[ClassnameNN:ToolbarWindow324; INSTANCE:4; ID:5604]")
    ControlClick("", "", "[ClassnameNN:ToolbarWindow325; INSTANCE:5; ID:5604]")
    ControlClick("", "", "[ClassnameNN:ToolbarWindow326; INSTANCE:6; ID:5604]")
    ControlClick("", "", "[ClassnameNN:ToolbarWindow327; INSTANCE:7; ID:5604]")
    ControlClick("", "", "[ClassnameNN:ToolbarWindow328; INSTANCE:8; ID:5604]")
    ControlClick("", "", "[ClassnameNN:ToolbarWindow329; INSTANCE:9; ID:5604]")



    EndIf
Else
    MsgBox(48, " Hata", "Su an çalışmıyor!")
EndIf

Sleep(3000) ;
WEnd

 

On 29.11.2018 at 2:46 PM, faustf said:

for  have help  ,  you must  send , a  code and application want automate , in forum many people  have  a super skill level , but  for the moment not read a mind  :D

Thank you for reply.

On 29.11.2018 at 3:32 PM, Zedna said:

Thank you Zedna, İ had read this page which you send me. But i am new in this program language. I think i have a problem with syntax of language and below code line.

ControlClick("", "", "[ClassnameNN:ToolbarWindow32x; INSTANCE:x; ID:5604]")

Edited by atanik
Link to comment
Share on other sites

15 hours ago, Zedna said:

As written in my post/helpfile: use the ToolBar tab of Au3Info ...

if you mean ; 

ControlCommand ( "", "", [CLASSNAMENN:ToolbarWindow328; Instance:8; ID:5604])

  i tried it is not working. Can you explain me again please,if possible can you write me single line of control command line Please?

 

I have in my hand unique value of ClassnameNN ,instance and id for each button which i wanted to clicked.

Edited by atanik
Link to comment
Share on other sites

On 02.12.2018 at 5:50 PM, Zedna said:
ControlCommand("", "", "ToolbarWindow321", "SendCommandID", "12345") ; ID=12345

And I think you should also specify title/text or window's handle to distinguish window 

thank you for your help Zedna, But i have a bad news. it is not working such. i am going to attached screenshot and you may see the window information 

 

All refresh buttons have not text but have  different  ClassnameNN ,instance and id  such 1,2,3,4,5,6,7,8,9  I hope i could explain well. if you need any information please write me and i will add.

 

 

 

ss.PNG

Edited by atanik
Link to comment
Share on other sites

2 hours ago, Zedna said:

Start only with 1 open window and use title/text in ControlCommand() to see if it works with that 1 window.

i tried with one window.but that time ClassnameNN:ToolbarWindow32  istead of  ClassnameNN:    ToolbarWindow321 ,2,3,4,5,6,7,8,9

so i should open more then one window. when i open more then one windows it is adding 1,2,3,4,5,6,7,8,9 to end of ToolbarWindow32X

Edited by atanik
Link to comment
Share on other sites

thank you very much friends. I tried some codes and i found the solution for my needs. 

First need to find the button CommandID. (you may found with autoit window info under the Toolbar tab.)

ControlCommand("", "", "ToolbarWindow32X", "SendCommandID", "5782")

 

I had 9 windows and i wrote for each of them same code. just i changed x to 1,2,3,4,5,6,7,8,9

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...