Diana (Cda) Posted April 18 Posted April 18 Often enough I have a series of nested folders for applications that it would be nice not to have to manually open, which is what I've done for years (decades ...? / yes, I have a ton of Windows app ...) Example of scenario, I'm going to try out some apps to see which might do a new, important task. The root folder I'd input is, where the OK_click would have the syntax to open all those sub-subfolders, if I can call them that: Root folder: D:\BIRTHDAY\ Level 1 type of subfolder: D:\BIRTHDAY\CDAY Calendar Almanac v0.5.1\ 2nd level of actual folders I need to open: D:\BIRTHDAY\CDAY Calendar Almanac v0.5.1\APP- CDAY Calendar Almanac v0.5.1\ So I'd input the root folder, and hopefully the script will open all subfolders beginning with "APP- ", as in the example above. How would one do that, please? ---------------------------------------------------------------------------------------------------------------------------- I do have the script started here that prompts for the root folder (i.e., the "BIRTHDAY" one above): expandcollapse popup;=====-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----===== Opt("GUIOnEventMode", 1) $Form1_1 = GUICreate("Open all ''APP- '' subfolders within the subfolders here below ...", 591, 117, 428, 350) $Label1 = GUICtrlCreateLabel("Root folder:", 16, 8, 84, 22) GUISetIcon($IconsMine, 2) ; this changes the GUI icon in upper left-hand corner + GUI taskbar icon to your chosen one) GUICtrlSetFont(-1, 12, 400, 0, "Arial") GUICtrlSetTip(-1, "i.e., ''D:\CASE\Primitive Case Changer v2.00''") ; button tooltip ;=====-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----===== $Input1 = GUICtrlCreateInput("", 16, 32, 561, 21) $Button1 = GUICtrlCreateButton("OK", 16, 70, 291, 25, 0) ;------------------------------------------------------------------- GUICtrlSetOnEvent(-1, "CancelClick") $Button2 = GUICtrlCreateButton("Cancel", 335, 70, 75, 25, 0) ;------------------------------------------------------------------- GUICtrlSetOnEvent(-1, "Clear_click") $Clear = GUICtrlCreateButton("Clear", 515, 63, 57, 41, $BS_ICON) ;------------------------------------------------------------------- ;TraySetIcon($IconsMine, 163) ; changes the icon displayed in the systray GUICtrlSetImage(-1, "C:\Documents and Settings\Administrator\Desktop\Script\Clear.ico", 0) GUICtrlSetOnEvent(-1, "ClearClick") GUICtrlSetTip(-1, "Clear the contents of the two input boxes ...") ; --------------------------- GUISetState(@SW_SHOW) ;============================ GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ; ----------------- While 1 Sleep(100) WEnd ; ----------------- Func CancelClick() Exit ; finished EndFunc ; ----------------- Func ClearClick() GUICtrlSetData($Input1,"") GUICtrlSetState($Input1, $GUI_FOCUS) ; from GUIConstants UDF; referenced in "Global Const $GUI_FOCUS = 256" above. EndFunc ; ----------------- Func OK_click() EndFunc ; ----------------- Thank you!
junkew Posted April 18 Posted April 18 https://www.autoitscript.com/autoit3/docs/libfunctions/_FileListToArrayRec.htm FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
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