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"
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
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
if I go strictly by the help file, but it returns nothing.
So it appears that item 3 exists, but
does not have any text???
and it also appears item 9 exists (it does not)
causes the first item to be selected, as does
Here is the output from the Window Info tool
>>>> Window <<<<
Title: Batch Image Convert / Rename
Position: 501, 83
Size: 760, 520
>>>> Control <<<<
Advanced (Class): [CLASS:TTntTreeView.UnicodeClass; INSTANCE:1]
Position: 354, 79
Size: 378, 188
ControlClick Coords: 108, 86
>>>> Mouse <<<<
Position: 970, 279
Cursor ID: 0
>>>> StatusBar <<<<
>>>> ToolsBar <<<<
>>>> Visible Text <<<<
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
I'm struggling to launch a VBS file via autoit using RunWait. Due to the nature of the deployment tool I am using for said script, I only know that the .vbs files will be in the same directory as my AutoIt-generated .exe, but not what that path will be. The path will look something like this:
This is generated during deployment and I have no way of predicting the path - therefore, I am not sure how to call back to "same directory" in order to successfully launch the .vbs.
This line is as close as I have gotten - this fires off the cmd window, but it closes immediately with out information, and the .vbs is not launched.
RunWait (@ComSpec & " /c" & 'cscript.exe WORKPLEASE.vbs ALL /Q /NoCancel') I thought /c might be the problem, but leaving out the /c element causes me not to even see the momentary CMD window flash by. Any help will be greatly appreciated, and thanks in advance.
I am maintaining all the reusable code in a separate file as library.au3.
In that file I have referenced some dependent files using fileinstall, so that they will be extracted when necessary.
Problem is, if I use a function in the library.au3 in another script which doesn't require this dependent file, as I am including the whole file using include tag, it is embedding that file also.
Is there any way to exclude that.
I recently tried to use ControlClick method to send a mouse click command to a button in a application, but I noticed that it is not working when I give first parameter as a window handle (HWND). But, when I give class name or window title, it works fine. I used AutoItX3 and VBScript.
Following are the commands I tried in VBScript:
Dim WINAPI: Set WINAPI = WScript.CreateObject("WinAPIWrapper.WINAPI") Dim AutoItX3: Set AutoItX3 = WScript.CreateObject("AutoItX3.Control") Dim WindowHandle: WindowHandle = WINAPI.WinAPI_FindWindow("my window title", "my window class") 'Window handle obtains fine by my wrapper function 'Above window handle is obtained as a hexadecimal string. (I.E. - 0x00000000) I tried it like: WScript.Echo CStr(AutoItX3.ControlClick(WindowHandle, "", "[CLASS:Button; INSTANCE:1]")) // DOES NOT WORK WScript.Echo CStr(AutoItX3.ControlClick(CLng("&h" + Replace(WindowHandle, "0x", "")), "", "[CLASS:Button; INSTANCE:1]")) // DOES NOT WORK WScript.Echo CStr(AutoItX3.ControlClick(000000, "", "[CLASS:Button; INSTANCE:1]")) // DOES NOT WORK WScript.Echo CStr(AutoItX3.ControlClick(0x00000000, "", "[CLASS:Button; INSTANCE:1]")) // DOES NOT WORK Only following commands work: WScript.Echo CStr(AutoItX3.ControlClick("[CLASS:my window class]", "", "[CLASS:Button; INSTANCE:1]")) // WORKS FINE WScript.Echo CStr(AutoItX3.ControlClick("My window title", "", "[CLASS:Button; INSTANCE:1]")) // WORKS FINE
If any of your suggestions don't work, I will have to write a wrapper function myself to send mouse click commands. I chosen AutoIt V3 because it is good specially when comes to send keystrokes to applications. Please tell me why this won't work when I give window handle as first parameter.
Thanks in advance.
Trying to add below code in my main script but this is not functioning can you advise what else i need to do?
Dim fn As String Const myDir As String = "C:\AR\" '<- alter here Const newFolder As String = "C:\AR1\" '<- alter here fn = Dir(myDir & "AR_*.xlsm") Do While fn <> "" FileCopy myDir & fn, newFolder & Replace(fn, "AR", "AI") fn = Dir Loop