RGS Posted March 31, 2014 Share Posted March 31, 2014 I have a custom webpage(Aspx) with a hyperlink to an AutoIt file(.au3) on my custom web site. When I click the hyperlink, Internet Explorer 10 brings up a small control at the bottom of the window asking "Do you want to download or run this file" with a "open" button, a "save" button, and "cancel" button. The AutoIt WindowInfo identifies the control(the entire box) but not the individual buttons. How can I effect the clicking on one of those buttons. I suppose I could control the mouse position but that changes with the size of the window-ugh. Any help would be appreciated, Thanks BobSpen Link to comment Share on other sites More sharing options...
LarsJ Posted April 1, 2014 Share Posted April 1, 2014 Take a look at the UI Automation framework and especially this post. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
RGS Posted April 2, 2014 Author Share Posted April 2, 2014 LarsJ, thanks for your speedy response. I reviewed the links you suggest---WOW; This is a bit beyond my skill level. I simply want to start a Autoit script from a webpage(with the AutoIt script on the website) and not have that nagging IE pop-up(Chrome does not have it!). Is there another, simpler way??? Thanks, BobSpen Link to comment Share on other sites More sharing options...
orbs Posted April 2, 2014 Share Posted April 2, 2014 (edited) hello RGS, welcome to AutoIt and to the forum! you want to automate the opening of a downloaded file by IE, without having an AutoIt script (or any automating utility) already running on the client to automate the entire process. in short - this can't be done with IE. since IE 9 Microsoft has completely disabled this possibility, for "security" reasons. go for Firefox. Edited April 2, 2014 by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
RGS Posted April 2, 2014 Author Share Posted April 2, 2014 hello RGS, welcome to AutoIt and to the forum! you want to automate the opening of a downloaded file by IE, without having an AutoIt script (or any automating utility) already running on the client to automate the entire process. in short - this can't be done with IE. since IE 9 Microsoft has completely disabled this possibility, for "security" reasons. go for Firefox. orbs, I'm not opposed to using autoit, I just want to be able to click a link on a custom webpage(a "web application") and run an application(an .exe or an .au3) on the client processor, without warning popups. Works on Chrome, but not on IE! Need IE also. I understand your security comment and I'm looking for a "workaround". Thanks, BobSpen Link to comment Share on other sites More sharing options...
orbs Posted April 3, 2014 Share Posted April 3, 2014 (edited) then you'll need a script already running on the client to automate this on IE. 1.a. write a script that launches the web application and clicks the download link - see the IE UDF. - or - 1.b. if you want the user to do the clicking, then write a script running in the background waiting for the download frame to appear. 2. next, your script should identify the download dialog, and then checks the IE window in which the frame appeared, to determine if it originated in your web application. this can be done by the unique identifier that AutoIt Window Info tool can detect. 3.a. handle what's inside that dialog with the UI Automation, as LarsJ suggested - or - 3.b. combine clicking F6, TAB, and Enter to focus and click the "open" button. yes i know it can be done natively with practically any browser other than IE. if you insist on IE, you need to do it yourself. you have my sympathies. Edited April 3, 2014 by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff 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