Jump to content

How to read and select file in combobox, Windows opendialog box


Recommended Posts

Good Day,

I want to read and select specific file from windows open dialog combobox, is it possible? like for example, i will send data, Fileno1(filename) to opendialogbox editbox, then it will show 3 files, same name with different extension ,

Fileno1.xlsx

Fileno1.pdf

Fileno1.zip 

Local $iGet = ControlGetText("DMS", "", "[CLASS:TEdit; INSTANCE:1]")

If ControlClick("[CLASS:TFrmRevSpecific]", "", "[CLASS:TBitBtn; INSTANCE:3]") Then ;Click Load
ControlClick("Open", "", "[CLASS:Edit; INSTANCE:1]") ;Click Open button
Sleep(400)
Send($iGet) ;I used send because ControlSend not working and ControlSetText
Send("{Down}")
Sleep(400)
Send("{Enter}")
Endif

my script is selecting the first file which is Fileno1.xlsx... I want to select Fileno1.zip only... how can i read and select fileno1.zip???

Edited by 232showtime

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Link to comment
Share on other sites

  • Moderators

232showtime, this is the part where we begin the back and forth asking for more information. How about showing a complete, runnable reproducer to help us help you ;)

"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

its the whole script:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

_LoadData()

Func _LoadData()

$Form11 = GUICreate("LoadData", 220, 73, 192, 124, -1, $WS_EX_TOPMOST)
$Button1 = GUICtrlCreateButton("Start", 32, 24, 155, 25)
GUISetState(@SW_SHOW)

While 1
$nMsg = GUIGetMsg()
Local $iGet = ControlGetText("DMS","","[CLASS:TEdit;INSTANCE:1]") ;Document mngt sys
 Switch $nMsg
  Case $GUI_EVENT_CLOSE
        Exit
  Case $Button1
       If ControlClick("[CLASS:TFrmRevSpecific]", "", "[CLASS:TBitBtn; INSTANCE:3]") Then  ;Click Load
          ControlClick("Open", "", "[CLASS:Edit; INSTANCE:1]")  ;Windows OpenDialogBox,Click Edit box in Combobox
        Sleep(400)
        Send($iGet)  ;I used send because ControlSend not working and ControlSetText
        Send("{Down}")
        Sleep(400)
        Send("{Enter}")
        EndIf
 EndSwitch
WEnd
EndFunc   ;==>_LoadData

 

Edited by 232showtime

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Link to comment
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
 Share

  • Recently Browsing   0 members

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