-
Posts
10 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
jdegraff's Achievements

Seeker (1/7)
0
Reputation
-
The three line method works perfectly in AutoItX. Thanks.
-
The code in the link does not apply since I am using AutoItX which uses a different syntax. The suggestion that appeared below which I coded as autoit.aut.ControlSend("", "", "", "text", 0) had no effect. The CTRL key was still stuck.
-
I'm using AutoItX 3.3.16.1 from python 3.11 to perform a sequence of actions from my browser (Brave). Specifically: 1. set focus to the address bar 2. select all 3. copy to clipboard To account for any lagging in the browser I put a half second delay between steps so I end up with autoit.aut.send('!d') # focus to address autoit.aut.sleep(500) autoit.aut.send('^a') # select entire address autoit.aut.sleep(500) autoit.aut.send('^c') # copy address Following that I take the address from the clipboard, massage it, close the current tab, then browse to the massaged address autoit.aut.send('^w') webbrowser.open(url) I find that occasionally the CTRL key gets stuck in that if I use the mouse wheel to scroll I instead get zoom in/out as if I was doing CTRL+SCROLL. If I press CTRL manually I can then scroll. 1. is this a bug in autoitx? 2. is there a way, from within autoitx, to undo the "pressed" status of the CTRL key?
-
I'm trying to get the names if the items in a TreeView control. I have the control ID (200864) and I can get the item count but I can't get at the actual items. The best I've been able to manage is to get the item reference. As you can see I am able to determine that items #0 through #3 exist. But when I try to get the text I get nothing. Similarly, when I select an item and try to fetch it I get only the item reference. How can I get at the actual text items? Screen snaps are attached. Code ==== import os import win32com.client aut_MatchFromStart = 1 id = 200864 win = "Batch" aut = win32com.client.Dispatch("AutoItX3.Control") aut.Opt("WinTitleMatchMode", aut_MatchFromStart) print("ItemCount=",aut.ControlTreeView(win,"",id,"GetItemCount","","")) for i in range(0,5): item = "#" + str(i) print("item",i,"exists=",aut.ControlTreeView(win,"",id,"Exists",item,"")) print("GetText #0 = <%s>" % aut.ControlTreeView(win,"",id,"GetText","#0","")) print("Select result=",aut.ControlTreeView(win,"",id,"Select",0,"")) print("GetSelected= <%s>" % aut.ControlTreeView(win,"",id,"GetSelected",0,"")) print("GetSelected= <%s>" % aut.ControlTreeView(win,"",id,"GetSelected",0,1)) Output ====== ItemCount= 4 item 0 exists= 1 item 1 exists= 1 item 2 exists= 1 item 3 exists= 1 item 4 exists= 0 GetText #0 = <> Select result= 1 GetSelected= <#0> GetSelected= <#0>
-
I have AutoHotkey set to run a vbscript file on a hotkey. The script is as follows: Set aut = CreateObject("AutoItX3.Control") aut.AutoItSetOption "WinTitleMatchMode",2 list = aut.WinList("Google Chrome","") if ubound(list,2) = 1 Then title = list(0,1) : Wscript.Echo title aut.WinActivate title,"" aut.WinWaitActive title,"",5 aut.Send "{!}d",0 aut.Sleep 100 aut.Send "{^}c",0 url = aut.clipget : Wscript.Echo url else Wscript.Echo "Chrome not active" end if The value of `title` indicates that the correct window is being identified. I would expect the first `send` (alt-d) to select the text in the address bar and the second `send` (ctrl-c) to copy that text to the clipboard. It does not do that and I have no idea why. What gets displayed is whatever was in the clipboard (if anything) prior to running the script. Any suggestions would be appreciated.
-
I created a quick script to set/clear the topmost status of a window. It works like top <title> /on | /off I want the title match to be case insensitive and to work on partial strings. For example, if the window of note is titled "APLX for Windows" I want top apl /on to work. The AutoIt manual says that for WinTitleMatchMode Mode -1 to -4 Force lower case match according to other type of match. so I assumed that by aut.Opt "WinTitleMatchMode",-1 I would be doing a lower case match on existing windows. As long as I lcase(title) for the comparison it should match on "APLX for Windows" but it does not Is this a bug or am I misreading the docs?
-
Can't get text items from ControlTreeView
jdegraff replied to jdegraff's topic in AutoItX Help and Support
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.- 5 replies
-
- controltreeview
- vbscript
-
(and 1 more)
Tagged with:
-
Can't get text items from ControlTreeView
jdegraff replied to jdegraff's topic in AutoItX Help and Support
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.- 5 replies
-
- controltreeview
- vbscript
-
(and 1 more)
Tagged with:
-
jdegraff changed their profile photo
-
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 ?
- 5 replies
-
- controltreeview
- vbscript
-
(and 1 more)
Tagged with:
-
Can anyone recommend how to change the size of the treeview (leftmost) panel in the FastStone Viewer main display? I've tried altering the size but the display does not change to reflect the new size (even though the command reports success). Here is what I have tried (I'm using a very simple shell I wrote for running vbScript interactively) :title = "FastStone" :cname = "TJamShellTree1" :cid = 1576174 :?aut.ControlGetPosWidth(title,"",cname) 254 :?aut.ControlMove(title,"",cname,0,50,400) 1 :?aut.ControlGetPosWidth(title,"",cname) 254 As you can see the size of the control was not changed.