atanik Posted November 27, 2018 Share Posted November 27, 2018 (edited) 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 December 3, 2018 by atanik Link to comment Share on other sites More sharing options...
faustf Posted November 29, 2018 Share Posted November 29, 2018 (edited) 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 Edited November 29, 2018 by faustf atanik 1 Link to comment Share on other sites More sharing options...
Zedna Posted November 29, 2018 Share Posted November 29, 2018 Look here https://www.autoitscript.com/autoit3/docs/functions/ControlCommand.htm Quote "SendCommandID", Command ID Simulates the WM_COMMAND message. Usually used for ToolbarWindow32 controls - use the ToolBar tab of Au3Info to get the Command ID. atanik 1 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
atanik Posted December 1, 2018 Author Share Posted December 1, 2018 (edited) 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 Thank you for reply. On 29.11.2018 at 3:32 PM, Zedna said: Look here https://www.autoitscript.com/autoit3/docs/functions/ControlCommand.htm 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 December 4, 2018 by atanik Link to comment Share on other sites More sharing options...
Zedna Posted December 1, 2018 Share Posted December 1, 2018 As written in my post/helpfile: use the ToolBar tab of Au3Info ... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
atanik Posted December 2, 2018 Author Share Posted December 2, 2018 (edited) 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 December 2, 2018 by atanik Link to comment Share on other sites More sharing options...
Zedna Posted December 2, 2018 Share Posted December 2, 2018 ControlCommand("", "", "ToolbarWindow321", "SendCommandID", "12345") ; ID=12345 And I think you should also specify title/text or window's handle to distinguish window BlackLumiere and atanik 2 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
atanik Posted December 2, 2018 Author Share Posted December 2, 2018 (edited) 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. Edited December 4, 2018 by atanik Link to comment Share on other sites More sharing options...
Zedna Posted December 2, 2018 Share Posted December 2, 2018 Start only with 1 open window and use title/text in ControlCommand() to see if it works with that 1 window. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
atanik Posted December 2, 2018 Author Share Posted December 2, 2018 (edited) 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 December 2, 2018 by atanik Link to comment Share on other sites More sharing options...
atanik Posted December 3, 2018 Author Share Posted December 3, 2018 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 More sharing options...
atanik Posted March 3, 2019 Author Share Posted March 3, 2019 i was using windows 7. it was working super. now i am using windows 10 pro. But i can not see anything in toolbar tab. do you have any idea related with this ? Link to comment Share on other sites More sharing options...
Zedna Posted May 24, 2019 Share Posted May 24, 2019 (edited) @JohnMcNamara Look here and here Edited May 24, 2019 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search 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