bballjoe12 Posted September 11, 2017 Share Posted September 11, 2017 I have the following code which I found on internet: #include <GuiConstantsEx.au3> #include <File.au3> #include <Array.au3> ;GUI GUICreate("Automation", 300, 500) $sourceFolder = GUICtrlCreateInput("Source Folder", 10, 10, 280, 20) $add = GUICtrlCreateButton("Add", 10, 35, 75, 20) $mylist = GUICtrlCreateList("", 10, 60, 280, 300) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $add $sFolder = ControlGetText("Automation", "", "Edit1") Local $FileList = _FileListToArray($sFolder, "*.*") If @error = 1 Then MsgBox(0, "", "No Folders Found.") Exit EndIf If @error = 4 Then MsgBox(0, "", "No Files Found.") Exit EndIf For $i = 1 To $FileList[0] GUICtrlSetData($mylist, $FileList[$i]) Next Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd 1. How do I edit this so it automatically lists the Documents folder contents on the given computer? 2. If the Documents folder contains .ahk scripts, what do I need to add, if the window, let's say, displays a filename of "Testscript.ahk" to be able to double click on the .ahk file and actually load it? Thank you! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 11, 2017 Moderators Share Posted September 11, 2017 bballjoe12, If you want to open .ahk files, why not code the script itself in AHK? Why use AutoIt at all? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
bballjoe12 Posted September 11, 2017 Author Share Posted September 11, 2017 Well I have a seperate GUI that I created with AHK that automatically sends code to notepad based on some text boxes and button clicking. This allows a user that has no coding ability to make their own script. I'm hoping the other AHK script will save the script inside of the user's Documents folder. I want users to have a GUI to easily select their already created scripts for people who have no computer ability ( I work at a hospital Help Desk....yes, we have people with minimal ability that work there lol). Basically the GUI would be for ease of access. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 11, 2017 Moderators Share Posted September 11, 2017 You're not answering the question though, why are you making things more complicated by mixing languages, when they will both - by themselves - accomplish everything you're after? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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