Internet Explorer Save Open Cancel Popup

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
johnegracejr
Posts: 3
Joined: 09 May 2016, 10:58

Internet Explorer Save Open Cancel Popup

28 Dec 2016, 16:16

I am trying to control the yellow (or gold) and white "Save Open Cancel" popup of Internet Explorer (I "believe" it's also ActiveX but I'm not sure about that last part). I have a (clunky) script that works the first time but not more than once. I would prefer a way to select the popup that doesn't need tabs and down arrows but can't seem to isolate it.

Code: Select all

; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win7
; Author:         J.G. 12/22/2016 11:07AM
;
; Script Function:
;	Assist in backing up (exporting) HPNA Policies
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
; #SingleInstance Force                     ; At the moment I want the reload message

web := IEGet("HP Network Automation: Import/Export Policies")
; elements := web.document.getElementsByTagName("div")	; has innertext
elements := web.document.getElementsByTagName("input")	; has type = hidden/button/checkbox, id & value, name = "eid", title,
														; not label, class
names := ""
ids := ""
Loop % elements.length
{
	if elements[A_Index -1].type = "checkbox"
    {
		if web.document.GetElementbyID(elements[A_Index -1].id).checked = -1
		{
			names := names elements[A_Index -1].title "`n"
            ids := ids elements[A_Index -1].id "`n"
			web.document.GetElementbyID(elements[A_Index -1].id).click()
		}
    }
	if elements[A_Index -1].type = "button"
	{
      if elements[A_Index -1].title = "Export Policy"
      {
         exporter := elements[A_Index -1]
      }
	}
}

namearray := StrSplit(names,"`n")
idarray := StrSplit(ids,"`n")

Loop, % idarray.MaxIndex()-1
{
   web.document.GetElementbyID(idarray[A_Index]).click()
   
   ;<input type="button" name="Submit" title="Export Policy" value="Export" class="FormButton" onclick="submitExportForm('config_policy.exp')">

   thisname := namearray[A_Index]
   exporter.click()
   Sleep 1000
   WinActivate, HP Network Automation: Import/Export Policies
   WinWaitActive, HP Network Automation: Import/Export Policies
   ; Things I've tried but didn't work
   ; ControlFocus, DirectUIHWND2
   ; ControlSend, DirectUIHWND2, {Tab 2}{Down 2}{Enter}         ; Didn't work
   ; WinActivate, ahk_class DirectUIHWND2
   ; ControlFocus, ahk_class DirectUIHWND1              
   ; WinActivate, ahk_class DirectUIHWND1
   WinWaitActive, Save As
   ; SendInput {Home}               ; If we want to leave the config_policy.exp string unchanged
   SendInput %thisname%             ; {Space}  Only need the space if we're prepending the name and leaving config_policy.exp
   WinWaitClose, Save As
   WinActivate, HP Network Automation: Import/Export Policies
   WinWaitActive, HP Network Automation: Import/Export Policies

   if web.document.GetElementbyID(idarray[A_Index]).checked = -1 
      web.document.GetElementbyID(idarray[A_Index]).click()
}
; ----------------------------------------------------------------------------------------------------
IEGet(Name="")                                                              ; Retrieve pointer to existing IE window/tab
{
   IfEqual, Name,, WinGetTitle, Name, ahk_class IEFrame
      Name := ( Name="New Tab - Windows Internet Explorer" ) ? "about:Tabs"
      : RegExReplace( Name, " - (Windows|Microsoft) Internet Explorer" )
   For wb in ComObjCreate( "Shell.Application" ).Windows
   {
      wbLocName := wb.LocationName
      wbFullName := wb.FullName
      If ( wb.LocationName = Name ) && InStr( wb.FullName, "iexplore.exe" )
      {
         Return wb
      } ; If
   } ; For wb
} ;written by Jethrow
Thanks in advance
From: Jay Grace
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: Internet Explorer Save Open Cancel Popup

29 Dec 2016, 10:55

I've got a script where I faced the same issue. I couldn't use WinHttp.WinHttpRequest.5.1 because I needed the stored IE credentials, and because of a company proxy I couldn't get MSXML2.XMLHTTP working, so I was stuck with a InternetExplorer.Application GUI. From what I understood from other forums, is that MS deliberately made the download prompt hard to detect or interact with other than simply sending keystrokes as a security measure. So I think your best bet is looping a PixelSearch on the orange color before sending the proper keys.

For the reason your script only works once; is there a command the script hangs on (look in AHK's last lines)?
Guest

Re: Internet Explorer Save Open Cancel Popup

03 Jan 2017, 12:00

johnegracejr wrote:I am trying to control the yellow (or gold) and white "Save Open Cancel" popup of Internet Explorer (I "believe" it's also ActiveX but I'm not sure about that last part). I have a (clunky) script that works the first time but not more than once. I would prefer a way to select the popup that doesn't need tabs and down arrows but can't seem to isolate it.

Kudos to whoever wrote the ImageSearch function. (fast and efficient - niiiice).

Interestingly I had the same intermittent results when using it. There must be some interesting magic happening in either Internet Explore, ActiveX, and the "open save cancel" popup. Back to the drawing board. I've also had a chance to do a lot of testing (over the holidays) and the script always works if I only check one of the checkboxes but almost never works correctly afterwards. I've also added a few line that close the "open save cancel" popup in the hopes that reopening it would be like a reset - no joy. Also attempted several variation on selecting different elements of the webpage on the theory that starting from the same location would allow the same keystrokes to arrive in the same location - also no joy.

If I could activate the child window or directly controlsend on the control I think either of those would work. I'm currently researching SendMessage to see if I can make that work.

Thanks in advance for any other suggestions.

Code: Select all

; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win7
; Author:         J.G. 12/22/2016 11:07AM
;
; Script Function:
;	Assist in backing up (exporting) HPNA Policies
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
; #SingleInstance Force                     ; At the moment I want the reload message

web := IEGet("HP Network Automation: Import/Export Policies")
; elements := web.document.getElementsByTagName("div")	; has innertext
elements := web.document.getElementsByTagName("input")	; has type = hidden/button/checkbox, id & value, name = "eid", title,
														; not label, class
names := ""
ids := ""
Loop % elements.length
{
	if elements[A_Index -1].type = "checkbox"
    {
		if web.document.GetElementbyID(elements[A_Index -1].id).checked = -1
		{
			names := names elements[A_Index -1].title "`n"
            ids := ids elements[A_Index -1].id "`n"
			web.document.GetElementbyID(elements[A_Index -1].id).click()
		}
    }
	if elements[A_Index -1].type = "button"
	{
      if elements[A_Index -1].title = "Export Policy"
      {
         exporter := elements[A_Index -1]
      }
	}
}

namearray := StrSplit(names,"`n")
idarray := StrSplit(ids,"`n")

Loop, % idarray.MaxIndex()-1
{
   web.document.GetElementbyID(idarray[A_Index]).click()
   
   ;<input type="button" name="Submit" title="Export Policy" value="Export" class="FormButton" onclick="submitExportForm('config_policy.exp')">

   thisname := namearray[A_Index]
   exporter.click()
   Sleep 1000
   WinActivate, HP Network Automation: Import/Export Policies
   WinWaitActive, HP Network Automation: Import/Export Policies
   ; Things I've tried but didn't work
   ; ControlFocus, DirectUIHWND2
   ; ControlSend, DirectUIHWND2, {Tab 2}{Down 2}{Enter}         ; Didn't work
   ; WinActivate, ahk_class DirectUIHWND2
   ; ControlFocus, ahk_class DirectUIHWND1              
   ; WinActivate, ahk_class DirectUIHWND1
   WinWaitActive, Save As
   ; SendInput {Home}               ; If we want to leave the config_policy.exp string unchanged
   SendInput %thisname%             ; {Space}  Only need the space if we're prepending the name and leaving config_policy.exp
   WinWaitClose, Save As
   WinActivate, HP Network Automation: Import/Export Policies
   WinWaitActive, HP Network Automation: Import/Export Policies

   if web.document.GetElementbyID(idarray[A_Index]).checked = -1 
      web.document.GetElementbyID(idarray[A_Index]).click()
}
; ----------------------------------------------------------------------------------------------------
IEGet(Name="")                                                              ; Retrieve pointer to existing IE window/tab
{
   IfEqual, Name,, WinGetTitle, Name, ahk_class IEFrame
      Name := ( Name="New Tab - Windows Internet Explorer" ) ? "about:Tabs"
      : RegExReplace( Name, " - (Windows|Microsoft) Internet Explorer" )
   For wb in ComObjCreate( "Shell.Application" ).Windows
   {
      wbLocName := wb.LocationName
      wbFullName := wb.FullName
      If ( wb.LocationName = Name ) && InStr( wb.FullName, "iexplore.exe" )
      {
         Return wb
      } ; If
   } ; For wb
} ;written by Jethrow
Thanks in advance
From: Jay Grace
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Internet Explorer Save Open Cancel Popup

03 Jan 2017, 20:39

It seems to be called the 'notification bar'.
If I go to
AutoHotkey Downloads
https://autohotkey.com/download/
and left-click on Download AutoHotkey Installer.
I get the boxes Run, Save, Cancel.
Pressing alt, shows that r, s, c are hotkey triggers.
Alt+r and alt+s seem to work, but not alt+c to cancel (it brings up a toolbar on the right).
>> Pressing alt+n activates the bar, Esc then closes the bar.

Code: Select all

;to test whether it's visible
ControlGet, vIsVisible, Visible, , DirectUIHWND1, A

;to retrieve its accName to distinguish it from other DirectUIHWND controls
;just in case there are any
ControlGet, hCtl, Hwnd, , DirectUIHWND1, A
oAcc := Acc_ObjectFromWindow(hCtl)
MsgBox % vIsVisible " " oAcc.accName

;to close it (I would hope for a more direct method)
;AccViewer retrieved a lot of information,
;but I had trouble accessing the subelements of the control with Acc.ahk
;WinClose appeared to crash IE (which I tried just in case)
SendInput !n
Sleep 500
ControlSend, DirectUIHWND1, {Esc}, A
Return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Internet Explorer Save Open Cancel Popup

23 Jan 2017, 02:55

I've fixed my script and managed to get Acc to close the notification bar directly,
without sending any key presses.

Code: Select all

q:: ;internet explorer - notification bar interactions
;to test whether it's visible and retrieve its name (it should be 'Notification')
WinGet, hWnd, ID, A
ControlGet, hCtl, Hwnd,, DirectUIHWND1, % "ahk_id " hWnd
ControlGet, vIsVisible, Visible,, DirectUIHWND1, % "ahk_id " hWnd
oAcc := Acc_ObjectFromWindow(hCtl)
MsgBox, % vIsVisible " " oAcc.accName(0)

;to close the notification bar
oAcc := Acc_Get("Object", "4.5", 0, "ahk_id " hCtl)
oAcc.accDoDefaultAction(0)
return
Acc library (MSAA) and AccViewer download links - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=26201
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
bodosko
Posts: 19
Joined: 05 May 2017, 10:49

Re: Internet Explorer Save Open Cancel Popup

19 May 2017, 12:15

What if I want to click the "Save as" button, that is hidden inside the arrow button ?
I'm trying to get its object path with no success. :/
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Internet Explorer Save Open Cancel Popup

19 May 2017, 13:49

What you have to do is invoke the down arrow (e.g. via Acc), and then invoke the menu item (e.g. via Acc or via sending keypresses to it).

Note: doing alt+n, tab, down, showed that 'a' was an accelerator key to invoke the 'Save as' button. This could be different for other languages.

Code: Select all

;q:: ;internet explorer - notification bar interactions (click 'Save as')
;to test whether it's visible and retrieve its name (it should be 'Notification')
WinGet, hWnd, ID, A
ControlGet, hCtl, Hwnd,, DirectUIHWND1, % "ahk_id " hWnd
ControlGet, vIsVisible, Visible,, DirectUIHWND1, % "ahk_id " hWnd
oAcc := Acc_ObjectFromWindow(hCtl)
MsgBox, % vIsVisible " " oAcc.accName(0)

;to click the down arrow
oAcc := Acc_Get("Object", "4.3.1", 0, "ahk_id " hCtl)
oAcc.accDoDefaultAction(0)

WinWait, ahk_class #32768
;SendInput a ;worked
;ControlSend,, a, ahk_class #32768 ;didn't work
;ControlSend, ahk_parent, a, ahk_class #32768 ;didn't work
PostMessage, 0x102, % Ord("a"), 1,, % ahk_class #32768 ;WM_CHAR ;worked
return
==================================================

Another approach would to be invoke a menu item, which I tried to do but couldn't work out which PostMessage parameters to use (e.g. which hWnd).

See:
best utilities + best AutoHotkey scripts (+ useful tips) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=28149

which lists this (didn't work in this instance):
[HotkeyP][HotkeyP.zip contains spy.exe]
[spy.exe watches for WM_COMMAND messages, e.g. when you click menu items]

and which also lists this:
[a ToolTip appears showing menu item IDs for context menus]
Get Info from Context Menu - Scripts and Functions - AutoHotkey Community
https://autohotkey.com/board/topic/1975 ... text-menu/

I used the ToolTip script which showed me that the command ID for 'Save as' was: 53409.

Failed WM_COMMAND attempts:

Code: Select all

;q:: ;attempts to invoke notification bar 'Save as' (didn't work)
WinGet, hWnd, ID, A
ControlGet, hCtl, Hwnd,, DirectUIHWND1, A
hWndParent := DllCall("user32\GetParent", Ptr,hCtl, Ptr)
hWndParent2 := DllCall("user32\GetParent", Ptr,hWndParent, Ptr)
WinGetClass, vWinClass, % "ahk_id " hWndParent
WinGetClass, vWinClass2, % "ahk_id " hWndParent2

PostMessage, 0x111, 53409,,, % "ahk_id " hCtl ;WM_COMMAND
PostMessage, 0x111, 53409,,, % "ahk_id " hWndParent ;WM_COMMAND
PostMessage, 0x111, 53409,,, % "ahk_id " hWnd ;WM_COMMAND

MsgBox, % vWinClass " " vWinClass2
return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
bodosko
Posts: 19
Joined: 05 May 2017, 10:49

Re: Internet Explorer Save Open Cancel Popup

19 May 2017, 14:21

Thanks!
Using the following code worked here. :)

Code: Select all

PostMessage, 0x102, % Ord("a"), 1,, % ahk_class #32768
Does it also work if the window is not focused or is minimized?

I'm able to get the ContextMenu hWnd with

Code: Select all

WinGet, hWnd2, ID, ahk_class #32768
But I don't know what to do with it later.

I tried to use the aToolTip script and it didn't work. It displays command ID -1 for all the context menu items.
So I tried sending the ID you got using PostMessage on every possible way, but it didn't work too.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Internet Explorer Save Open Cancel Popup

19 May 2017, 14:48

I'm not really sure about hidden windows etc, because normally a menu appears as a visible window, you would have to test.

The question could be instead, how to set the default Save folder for Internet Explorer, to ask as a new question on the AHK forum, (and/or to ask about which window to send the WM_COMMAND message to in Internet Explorer).

I will check the ToolTip script, probably it's an old script, and you're using AHK x64.

[EDIT:] I fixed the ToolTip script:
Get Info from Context Menu (x64/x32 compatible) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=31971
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
bodosko
Posts: 19
Joined: 05 May 2017, 10:49

Re: Internet Explorer Save Open Cancel Popup

22 May 2017, 07:48

I think I'm gonna stick with your PostMessage solution, it fits what I need.
I don't want to set a default save location, because I need to change the filename and folder for each file depending on other variables.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Internet Explorer Save Open Cancel Popup

22 May 2017, 09:42

One thing you could do is download to a temporary folder, and then move/rename files as needed.

But then I don't currently know how to reliably set the download folder. Cheers.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
TheDewd
Posts: 1503
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Internet Explorer Save Open Cancel Popup

13 Feb 2019, 15:14

jeeswg wrote:What you have to do is invoke the down arrow (e.g. via Acc), and then invoke the menu item (e.g. via Acc or via sending keypresses to it).
I can't get it to click the "Save" drop down arrow consistently.

If I show the MsgBox before sending the click, it works fine.
MsgBox, % vIsVisible " " oAcc.accName(0)

It's only after I remove the MsgBox code that I begin having problems.

I even tried to add a Sleep between detecting if DirectUIHWND1 is visible and sending the click, but that is sometimes not reliable either.

Any ideas?

When I click the download link, a new tab is opened for a brief second, and then it's closed. That is when the Save/Open DirectUIHWND1 dialog is shown. I'm not sure if the new tab is somehow taking away focus from the control or something...
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Internet Explorer Save Open Cancel Popup

19 Feb 2019, 10:29

@TheDewd: You could do tests with MouseGetPos and looping through controls, i.e. you could try investigating the notification bar.

Code: Select all

;q:: ;get DirectUIHWND controls
WinGet, hWnd, ID, A
WinGet, vCtlList, ControlList, % "ahk_id " hWnd
vOutput := ""
Loop, Parse, vCtlList, `n
{
	vCtlClassNN := A_LoopField
	ControlGet, hCtl, Hwnd,, % vCtlClassNN, % "ahk_id " hWnd
	if (SubStr(vCtlClassNN, 1, 12) = "DirectUIHWND")
		vOutput .= vCtlClassNN "`r`n"
}

Clipboard := vOutput
MsgBox, % vOutput
return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: Internet Explorer Save Open Cancel Popup

12 Mar 2019, 10:00

I'm out of my element on this, but I made some tweaks and put it into a function. I did learn you can have the information bar automatically close by Hitting Control+J in IE , go to Options, and then un-select the "Notify when complete" option.

Below I'm using the WBGet function to have a pointer to the active IE window.

Code: Select all

pwb:=WBGet()

IE_Pop_Up_Save_Window(pwb,"save")
;*******************************************************
IE_Pop_Up_Save_Window(pwb,Button_to_Click,Close_InfoBar:=1){
	Button_Number:= (Button_to_Click="open")?("4.2"):(Button_to_Click="save")?("4.3"):(Button_to_Click="cancel")?("4.5"):("Error")
	If (Button_Number="Error"){
		MsgBox Please pass a proper button to Click.`n`n Valid options are: Open, Save, and Cancel
		Return
	}
	hwnd:=pwb.hwnd ;Get hwnd from Pointer
	ControlGet, hCtl, Hwnd,, DirectUIHWND1, % "ahk_id " hWnd ;Get windows handle of the control
	oAcc := Acc_ObjectFromWindow(hCtl) ;push the control into ACC
     oAcc := Acc_Get("Object", Button_Number, 0, "ahk_id " hCtl),oAcc.accDoDefaultAction(0) ;Focus on correct button and Do the default action of where you're focused
	
	Sleep, 100	
	if (Button_Number=4.3) ;IF saving you need to send an "S" as the click is clicking the dropdown icon, not the save button
		PostMessage, 0x102, % Asc("s"), 1,, % ahk_class #32768 ;Sends "s" for "save"		
	
	Sleep, 100
	If (Close_InfoBar=1){
		oAcc := Acc_Get("Object", 4.3, 0, "ahk_id " hCtl)
		if (oAcc.accName(0)="close")
			oAcc.accDoDefaultAction(0) ;Focus on close button and click it
	}
	;Closing can be negated by hitting Control+J in IE and changing Options to not being Notified when downloads are complete.  You can also change your default save folder
}
return

Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
torontoguy
Posts: 1
Joined: 03 May 2019, 11:10

Re: Internet Explorer Save Open Cancel Popup

03 May 2019, 13:15

thanks guys for all your help.

How would I be able to set the Save As filename, and then press save?
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Internet Explorer Save Open Cancel Popup

05 May 2019, 01:31

- Here is a working script to invoke 'Save as' and specify a custom filename.
- I needed to use CBN_EDITCHANGE, because although ControlSetText would change the text, the Save As prompt needed to be notified of the change.

Code: Select all

;[Acc functions]
;Acc library (MSAA) and AccViewer download links - AutoHotkey Community
;https://autohotkey.com/boards/viewtopic.php?f=6&t=26201

;navigate here:
;AutoHotkey Downloads
;https://autohotkey.com/download/
;and click 'Download AutoHotkey Installer',
;when the notification bar is visible, run the script

q:: ;download AHK exe, specifying a custom filename (a suffix containing A_Now is added)
WinGet, hWnd, ID, A
WinGetClass, vWinClass, % "ahk_id " hWnd
if !(vWinClass = "IEFrame")
{
	MsgBox, % "error"
	return
}
ControlGet, vIsVisible, Visible,, DirectUIHWND1, % "ahk_id " hWnd
if !vIsVisible
{
	MsgBox, % "error"
	return
}
ControlGet, hCtl, Hwnd,, DirectUIHWND1, % "ahk_id " hWnd
oAcc := Acc_ObjectFromWindow(hCtl)
if !(oAcc.accName(0) = "Notification")
{
	oAcc := ""
	MsgBox, % "error"
	return
}

;click the down arrow, wait for menu to appear, invoke 'Save as' menu item
oAcc := Acc_Get("Object", "4.3.1", 0, "ahk_id " hCtl)
oAcc.accDoDefaultAction(0)
oAcc := ""
WinWait, ahk_class #32768
hWnd := WinExist()
SendMessage, 0x102, % Ord("a"), 1,, % "ahk_id " hWnd ;WM_CHAR := 0x102

;wait for save as prompt to appear, set text
WinWait, Save As ahk_class #32770
hWnd := WinExist()
ControlGetText, vText, Edit1, % "ahk_id " hWnd
vText .= " (1)(" A_Now ")"
ControlSetText, Edit1, % vText, % "ahk_id " hWnd

;notify ComboBox that Edit control text has updated, send enter to close prompt
ControlGet, hCtl, Hwnd,, ComboBox1, % "ahk_id " hWnd
;GWL_ID := -12 ;CBN_EDITCHANGE := 5 ;source: WinUser.h
vCtlID := DllCall("user32\GetWindowLong" (A_PtrSize=8?"Ptr":""), "Ptr",hCtl, "Int",-12, "Ptr")
SendMessage, 0x111, % vCtlID|(5 << 16), % hCtl,, % "ahk_id " hWnd ;WM_COMMAND := 0x111
ControlSend, Button1, {Enter}, % "ahk_id " hWnd
return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
CarlV
Posts: 5
Joined: 15 Jan 2021, 03:11

Re: Internet Explorer Save Open Cancel Popup

24 Mar 2021, 08:42

Hi @jeeswg
I have a question for you regarding your last reply in this thread.

Thanks to your indications I can save and manipulate the files, I am asking myself how to change the destination path before making the final save.

I've tried different solutions all gone wrong, among them also the :

Code: Select all

ControlSetText, ToolbarWindow324, % vPath, % "ahk_id " hWnd
or

Code: Select all

ControlSetText, Edit2, % vPath, % "ahk_id " hWnd
where vPath is C:\blabla

Could you please help me to solve this issue?

I have not found other topics, if you have any to recommend I would be grateful.

Greetings

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], marypoppins_1 and 190 guests