RelaaX Posted March 20, 2023 Posted March 20, 2023 Hello, Hope my question is not that complicated as i see it. In Images folder i keep 10 different files. For the use of the Script i pull out the picture I'm looking for and tag it with 1.png my question: how to build a simple GUI that can be put at the beginning of the script and would looks like 1. Start Script. 2.(GUI) What are we looking for? -> (Pictures from Images folder list.) 3. After selecting 1 from 10 files, script copying the picture to the main direction and tag it as 1.png' 🙉
mistersquirrle Posted March 20, 2023 Posted March 20, 2023 I think that this is probably simpler than making your own GUI, if you just want to choose a couple of files and load them into an array to use in the script: https://www.autoitscript.com/autoit3/docs/functions/FileOpenDialog.htm We ought not to misbehave, but we should look as though we could.
RelaaX Posted March 23, 2023 Author Posted March 23, 2023 (edited) #include <FileConstants.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local Const $sMessage = "Select a single file of any type." Local $sFileOpenDialog = FileOpenDialog($sMessage, "Images\" & "\", "All (*.png)", $FD_FILEMUSTEXIST) If @error Then MsgBox($MB_SYSTEMMODAL, "", "No file was selected.") FileChangeDir(@ScriptDir) Else FileChangeDir(@ScriptDir) ; Replace instances of "|" with @CRLF in the string returned by FileOpenDialog. $sFileOpenDialog = StringReplace($sFileOpenDialog, "|", @CRLF) MsgBox($MB_SYSTEMMODAL, "", "You chose the following file:" & @CRLF & $sFileOpenDialog) EndIf EndFunc $picture = $sFileOpenDialog Okey after many blinds shots already got it. For those who don't know Edited March 23, 2023 by RelaaX
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