Jump to content

Recommended Posts

Posted

Hello,

Hope my question is not that complicated as i see it. 

 

Picture.png

 

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'

 

 🙉

 

image.png

Posted (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 by RelaaX

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...