Sign in to follow this  
Followers 0
bb01

Help with A Problem... Cant Think Of The Wording.. lol

5 posts in this topic

#1 ·  Posted (edited)

Ok, heres my problem.. & i cannot for the sake of it, think of the correct wording etc...

What i'm trying to do is... Get the script to show only *.Doc|*.Docx|*.TXT|*.RTF in the GUI (Window)

Now whats the word for that... lol

Told you, i'm having one of those brain fart days...

Heres the script:-

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=File_Viewer.ico
#AutoIt3Wrapper_Outfile=File_Viewer.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=n#AutoIt3Wrapper_Res_Fileversion=1.1.0.5
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=Y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
;
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <file.au3>

Opt('MustDeclareVars', 1)

_Start_GUI()

Func _Start_GUI()
    GUIDelete()
    Local $oIE, $GUIActiveX, $GUI_Button_USBFROM, $GUI_Button_Exit, $GUI_Button_USBTO, $GUI_Button_COPY, $GUI_Button_PASTE
    Local $GUI_Button_Home, $GUI_Button_Delete, $msg, $GUI_Button_Back, $Types

    $oIE = ObjCreate("Shell.Explorer.2")

    ; Create a simple GUI for our output
    GUICreate("Cover Letters", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
    $GUIActiveX = GUICtrlCreateObj ($oIE, -215, 0, 855, 530)
    $GUI_Button_Delete    = GUICtrlCreateButton("Delete", 10, 530, 100, 20)
    $GUI_Button_COPY = GUICtrlCreateButton("Copy", 115, 530, 100, 20)
    $GUI_Button_PASTE = GUICtrlCreateButton("Paste", 225, 530, 100, 20)

    $GUI_Button_USBFROM = GUICtrlCreateButton("Goto USB", 10, 555, 100, 20)
    $GUI_Button_USBTO = GUICtrlCreateButton("Copy To USB", 115, 555, 100, 20)

    $GUI_Button_Home = GUICtrlCreateButton("Back to Main Dir", 535, 530, 100, 20)
    $GUI_Button_Exit = GUICtrlCreateButton("Exit", 545, 555, 75, 20)

    GUISetState()       ;Show GUI

    $oIE.navigate(@ScriptDir & "\My Documents\")

    ; Waiting for user to close the window
    While 1

        $msg = GUIGetMsg()

        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop

            Case $msg = $GUI_Button_Home
            $oIE.navigate(@ScriptDir & "\My Documents\")

            Case $msg = $GUI_Button_Delete
              Send("{DELETE}")

            Case $msg = $GUI_Button_COPY
              Send("^c")

                Case $msg = $GUI_Button_PASTE
                 Send("^v")

            Case $msg = $GUI_Button_USBTO
                Send("^c")
          $oIE.navigate("U:\")
               Send("^v")

            Case $msg = $GUI_Button_USBFROM
          $oIE.navigate("U:\")

               Case $msg = $GUI_Button_Exit
               ExitLoop
        EndSelect

    WEnd

    GUIDelete()
EndFunc   ;==>Example
Exit

Thanks in advance Guys..

Edited by bb01

Share this post


Link to post
Share on other sites



Ok, heres my problem.. & i cannot for the sake of it, think of the correct wording etc...

What i'm trying to do is... Get the script to show only *.Doc|*.Docx|*.TXT|*.RTF in the GUI (Window)

Now whats the word for that... lol

Told you, i'm having one of those brain fart days...

Heres the script:-

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=File_Viewer.ico
#AutoIt3Wrapper_Outfile=File_Viewer.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=n#AutoIt3Wrapper_Res_Fileversion=1.1.0.5
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=Y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
;
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <file.au3>

Opt('MustDeclareVars', 1)

_Start_GUI()

Func _Start_GUI()
    GUIDelete()
    Local $oIE, $GUIActiveX, $GUI_Button_USBFROM, $GUI_Button_Exit, $GUI_Button_USBTO, $GUI_Button_COPY, $GUI_Button_PASTE
    Local $GUI_Button_Home, $GUI_Button_Delete, $msg, $GUI_Button_Back, $Types

    $oIE = ObjCreate("Shell.Explorer.2")

    ; Create a simple GUI for our output
    GUICreate("Cover Letters", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
    $GUIActiveX = GUICtrlCreateObj ($oIE, -215, 0, 855, 530)
    $GUI_Button_Delete    = GUICtrlCreateButton("Delete", 10, 530, 100, 20)
    $GUI_Button_COPY = GUICtrlCreateButton("Copy", 115, 530, 100, 20)
    $GUI_Button_PASTE = GUICtrlCreateButton("Paste", 225, 530, 100, 20)

    $GUI_Button_USBFROM = GUICtrlCreateButton("Goto USB", 10, 555, 100, 20)
    $GUI_Button_USBTO = GUICtrlCreateButton("Copy To USB", 115, 555, 100, 20)

    $GUI_Button_Home = GUICtrlCreateButton("Back to Main Dir", 535, 530, 100, 20)
    $GUI_Button_Exit = GUICtrlCreateButton("Exit", 545, 555, 75, 20)

    GUISetState()       ;Show GUI

    $oIE.navigate(@ScriptDir & "\My Documents\")

    ; Waiting for user to close the window
    While 1

        $msg = GUIGetMsg()

        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop

            Case $msg = $GUI_Button_Home
            $oIE.navigate(@ScriptDir & "\My Documents\")

            Case $msg = $GUI_Button_Delete
              Send("{DELETE}")

            Case $msg = $GUI_Button_COPY
              Send("^c")

                Case $msg = $GUI_Button_PASTE
                 Send("^v")

            Case $msg = $GUI_Button_USBTO
                Send("^c")
          $oIE.navigate("U:\")
               Send("^v")

            Case $msg = $GUI_Button_USBFROM
          $oIE.navigate("U:\")

               Case $msg = $GUI_Button_Exit
               ExitLoop
        EndSelect

    WEnd

    GUIDelete()
EndFunc   ;==>Example
Exit

Thanks in advance Guys..

i don't think you going to be able to do what you want just using the standard windows explorer. FileOpenDialog offers filtering like that but i'm not sure if you can embed that like eplorer my guess is probably not.

Share this post


Link to post
Share on other sites

Yes it is possible, i had done it once before & for the life of me i cannot remember how, nor can i find my own backup script of it...

Share this post


Link to post
Share on other sites

Yes it is possible, i had done it once before & for the life of me i cannot remember how, nor can i find my own backup script of it...

well if you do find it i'd like to see it :)

the only thing i could think of would be exploring to a pre defined search string but i don't know the syntax that windows uses for searches.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0