jdegraff Posted March 3, 2018 Posted March 3, 2018 (edited) I'm trying to add a bit of functionality to the FastStone File Rename dialog. I can access every control that I need to except the one that contains the files to be renamed. If I do some exploring in a vbScript shell I get :c = "TTntTreeView.UnicodeClass1" :?aut.ControlTreeView(win,"",c,"GetItemCount","","") 5 You can see that the treeview control reports having five items, which is the number displayed. If I manually select (mouse) item #3 I can see the result by :?aut.ControlTreeView(win,"",c,"GetSelected","1","") #3 But I do not know how to get the text for the selected item. If "#3" is the item reference then I should be able to :?aut.ControlTreeView(win,"",c,"GetText","1","#3") or :?aut.ControlTreeView(win,"",c,"GetText","1","#3") if I go strictly by the help file, but it returns nothing. :?aut.ControlTreeView(win,"",c,"Exists","","3") 1 So it appears that item 3 exists, but :?aut.ControlTreeView(win,"",c,"GetText","","3") does not have any text??? :?aut.ControlTreeView(win,"",c,"Exists","","9") 1 and it also appears item 9 exists (it does not) :?aut.ControlTreeView(win,"",c,"Select","","") 1 causes the first item to be selected, as does :?aut.ControlTreeView(win,"",c,"Select","","3") 1 Here is the output from the Window Info tool >>>> Window <<<< Title: Batch Image Convert / Rename Class: TBatchConvert Position: 501, 83 Size: 760, 520 Style: 0x16CD0000 ExStyle: 0x00010100 Handle: 0x0000000001950796 >>>> Control <<<< Class: TTntTreeView.UnicodeClass Instance: 1 ClassnameNN: TTntTreeView.UnicodeClass1 Name: Advanced (Class): [CLASS:TTntTreeView.UnicodeClass; INSTANCE:1] ID: 37030040 Text: Position: 354, 79 Size: 378, 188 ControlClick Coords: 108, 86 Style: 0x54010039 ExStyle: 0x00000200 Handle: 0x0000000002350898 >>>> Mouse <<<< Position: 970, 279 Cursor ID: 0 Color: 0xE1E1E1 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< Batch Rename ... D:\temp\picsave\ Images + Videos (*.jpg;*.jpe;*.jpeg;*.bmp;*.gif;*.tif;*.tiff;*.cur;*.ico;*.png;*.pcx;*.jp2;*.j2k;*.tga;*.ppm;*.wmf;*.psd;*.crw;*.nef;*.cr2;*.orf;*.raf;*.dng;*.mrw;*.pef;*.srf;*.arw;*.rw2;*.x3f;*.sr2;*.srw;*.nrw;*.rwl;*.eps;*.avi;*.mpeg;*.mpg;*.wmv;*.mov;*.mp4;*.mts;*.mkv;*.m4v) Search and Replace Use Filename Template No Sort Clear Remove Add All Add Preview Close Rename No Change ? Edited March 3, 2018 by jdegraff removed extraneous text
jdegraff Posted March 5, 2018 Author Posted March 5, 2018 Barring an explanation, can someone just provide me with the correct documentation for ControlTreeView. The example given in the documentation is Set oAutoIt = WScript.CreateObject("AutoItX3.Control") oAutoIt.ControlListView "C:\", "", "SysTreeView321", "SelectAll", "", "" oAutoIt.ControlListView "C:\", "", "SysTreeView321", "Deselect", "2", "5" which uses a ListView rather than a TreeView.
Earthshine Posted March 6, 2018 Posted March 6, 2018 (edited) the image you posted is not a standard ControlTreeView help states Quote ControlTreeView Sends a command to a TreeView32 control. Edited March 6, 2018 by Earthshine My resources are limited. You must ask the right questions
Earthshine Posted March 6, 2018 Posted March 6, 2018 that is a Delphi control. Standard AutoIt probably will not work. junkew had some stuff that dealt with Delphi I think... search the form for Delphi control I guess My resources are limited. You must ask the right questions
Earthshine Posted March 6, 2018 Posted March 6, 2018 I found this. it might help if it still works.. fingers crossed My resources are limited. You must ask the right questions
jdegraff Posted March 6, 2018 Author Posted March 6, 2018 Well, that explains a lot. I had no idea that it was a custom control. I think I have a workaround for what I want to do. It's not pretty but it will get the job done. Thanks.
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