Jump to content

How to change the Path of Basic window info Title, "Open"


Recommended Posts

How to change the path of this Basic window info

Title: Open

Class: #32770

or How to change the path of this Basic Control Info

Class: ComboBox

Instance: 1

or How to set path to combo box in non autoit window

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

hi one question, where can i get _GUICtrlComboBox.au3??? I already used google and this forum and still cant find it, could you give me a link please???

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

Well, you can find it in the native AutoIt installation. Use #include <GuiComboBox.au3> and let's go. Look at the helpfile in the User Defined Function Reference > GUI Reference > GuiComboBox Management section

Link to comment
Share on other sites

thought it was new UDF, thanks.

hi again, search helpfile i found User Defined Function Reference but couldnt find GUI Reference > GuiComboBox Management,

sorry got confused I found it...

 

EDIT:I'm kinda confused and stuck here. dont know what to call this window, so I inserted a picture, this open dialog box is opened by another application(non-autoit program)

 

 

OpenDialogbox.jpg

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

this is an Open File Dialog Box and will (depending on the program) normally default back to whatever folder was used last.

I couldn't find ( on the fly ) how to change this part of the settings, although it is more than likely a registry setting...

But if you have a look here it will show you how to change the Links on the left side (Places Bar)

Bill

 

 

Edited by l3ill
spelling
Link to comment
Share on other sites

@232showtime : please, explain us what you're trying to do...

 It seems you want to open a PDF file with Adobe Reader : right ? In this case, maybe you can use the command line acroread.exe myFile.pdf or something like this...

Link to comment
Share on other sites

@jguinch

 

I changed the picture im using Documentation management software, and I want to change the path of open dialog box which is opened by DMS. I already tried ControlSend, ControlSetText, _GUICtrlComboBox_AddString, ControlGetHandle, didnt work at all.

 

OpenDialogBox1.jpg

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

In your start menu under AutoIt v3 is a tool called AutoIt Window Info and it will give you the name of the window and info on the control you are trying to automate.

 

To open a file I usually take the Edit Control (File Name area)and add a pathname or filename and send an enter.

If you want to display a specific directory then [ControlSend] sending the edit (file name area) a string of "c:\" & @cr will set the displayed directory to c:\

Link to comment
Share on other sites

this is an Open File Dialog Box and will (depending on the program) normally default back to whatever folder was used last.

I couldn't find ( on the fly ) how to change this part of the settings, although it is more than likely a registry setting...

But if you have a look here it will show you how to change the Links on the left side (Places Bar)

Bill

 

 

​hi

i tried some script

#include <MsgBoxConstants.au3>
Opt("SendKeyDelay", 20)
Opt("SendKeyDownDelay", 20)
WinActivate("Open")
$sVar = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\comdlg32\Placesbar", "Place4")
MsgBox(0, "", $sVar) ;its working fine 
 ;but if I change from msgbox to ControlSend or ControlClick its not working
ControlSend("Open", "", "[CLASS:ToolbarWindow32; INSTANCE:2]", $sVar);not working
or
ControlClick("Open", "", "[CLASS:ToolbarWindow32; INSTANCE:2]", $sVar);not working

what am i doing wrong???

tried it again same script its working but most of the time its malfunctioning, clicking on the wrong folder, or it will not work again...

is this some kind of a bug??

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,

While not a direct solution to your problem, my ChooseFileFolder UDF is a bit more user-friendly and allows you to set the start path for the folder tree very easily.  Why not take a look - the link is in my sig.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I haven't been able to find a way to send text to this control but you can send your path to the File Name control at get the same effect.

It must be the full path including file to work though.

Example (win7):

Run("notepad")
Sleep(700)
$hWnd = WinGetHandle("[CLASS:Notepad]")
Send("^o")
Sleep(1000)
ControlSend("Open", "", "[CLASS:Edit; INSTANCE:1]", "C:\Downloads\test.txt")
Send("{ENTER}")

 

 

Link to comment
Share on other sites

@232showtime : generally, you can just enter the full file name in the File name control and press OK. Use AutoIt Window Info tool to find infos for the file name control and for the Open button, then use ControlSetText and ControlClick.

For example :

$hOpen  = WinGetHandle("Open")
ControlSetText($hOpen, "", "[CLASS:Edit; INSTANCE:1]", "c:\path\of\the\file.pdf")
ControlClick($hOpen, "", "[CLASS:Button; INSTANCE:2]")

 

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...