Jump to content
Sign in to follow this  
232showtime

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

Recommended Posts

232showtime

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.

Share this post


Link to post
Share on other sites
JLogan3o13

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 ;)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
232showtime

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.

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  

×