ayu_2403 Posted June 16, 2023 Share Posted June 16, 2023 Local $hWnd = WinWaitActive($SaveAsTitle, '&Save', 10) ControlClick($hWnd,"","ToolbarWindow324") ControlSetText($hWnd,"","Edit2",$sAddress) I want to open a save as dialog box navigate to a particular directory and then save the file. But these two commands ControlClick and Controlsettext does not seem to work. I have check control id many times. Please help. Link to comment Share on other sites More sharing options...
Andreik Posted June 16, 2023 Share Posted June 16, 2023 Yeah sure, we are going to rub the crystal globe to determine about what address bar are you talking about. Provide at least a decent amount of information when you ask for help. Musashi 1 When the words fail... music speaks. Link to comment Share on other sites More sharing options...
ayu_2403 Posted June 17, 2023 Author Share Posted June 17, 2023 10 hours ago, Andreik said: Yeah sure, we are going to rub the crystal globe to determine about what address bar are you talking about. Provide at least a decent amount of information when you ask for help. The toolbar in explorer where the address of current folder shows Link to comment Share on other sites More sharing options...
ioa747 Posted June 17, 2023 Share Posted June 17, 2023 (edited) what kind of file do you want to save? with which program? ControlClick($hWnd,"","ToolbarWindow324") where the click is directed? Example for notepad $hDlgWnd = WinWait("[TITLE:Save As; CLASS:#32770]") ControlCommand($hDlgWnd, "", "ToolbarWindow324", "SendCommandID", 1280) ;set folder ControlSetText($hDlgWnd, "", "Edit2", @ScriptDir) ControlSend($hDlgWnd, "", "Edit2", "{ENTER}") Sleep(10) ;set file name ControlSetText($hDlgWnd, "", "Edit1", @ScriptName & ".txt") ControlSend($hDlgWnd, "", "Edit1", "{ENTER}") Sleep(10) ;save ControlClick($hDlgWnd, "", "Button2") ;exit ConsoleWrite("! exit" & @CRLF) Edited June 17, 2023 by ioa747 I know that I know nothing Link to comment Share on other sites More sharing options...
ayu_2403 Posted June 17, 2023 Author Share Posted June 17, 2023 1 hour ago, ioa747 said: what kind of file do you want to save? with which program? ControlClick($hWnd,"","ToolbarWindow324") where the click is directed? Example for notepad $hDlgWnd = WinWait("[TITLE:Save As; CLASS:#32770]") ControlCommand($hDlgWnd, "", "ToolbarWindow324", "SendCommandID", 1280) ;set folder ControlSetText($hDlgWnd, "", "Edit2", @ScriptDir) ControlSend($hDlgWnd, "", "Edit2", "{ENTER}") Sleep(10) ;set file name ControlSetText($hDlgWnd, "", "Edit1", @ScriptName & ".txt") ControlSend($hDlgWnd, "", "Edit1", "{ENTER}") Sleep(10) ;save ControlClick($hDlgWnd, "", "Button2") ;exit ConsoleWrite("! exit" & @CRLF) Thanks, It worked one more thing, while saving the save button gets disabled. I think it is buffering, I want to check if it is enabled before clicking on it Link to comment Share on other sites More sharing options...
ahmet Posted June 17, 2023 Share Posted June 17, 2023 Try with ControlCommand. Link to comment Share on other sites More sharing options...
ioa747 Posted June 17, 2023 Share Posted June 17, 2023 @ayu_2403 because you didn't mention what kind of file you want to save? with which program? I assume you are referring to my example with notepad Try to give more time to sleep e.g. Sleep(100) I know that I know nothing Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now