Script open IE, press "okay" on cert selection, "open" file, close IE window

Im trying to create a script to Open an internet explorer window to a link, which i've worked out. But then i need it to click "OKAY" when a windows security certificate pops
up, then click "open" when it asks to download the file (link points to a file, rather than a page), and then close the IE instance that it had just opened. Im unsure if the "open" with the file download works, as i cannot get past the
cert slection beforehand.
Open IE link:
$IE = New-Object -comObject InternetExplorer.Application.1 ; $IE.visible = $True
$IE.Navigate("https://website.com/file.exe")
I've also found this code that will press okay for the certificate selection if i know the button ID, but i can't seem to find the button ID for the cert selection window:
while ($IE.busy) {
sleep -milliseconds 50
sleep -milliseconds 500
$doc = $IE.document
sleep -milliseconds 500
$btn = $doc.getElementByID("button ID you can see in the source of the page")
$btn.Click()
Click "open" on the file download:
Select-Window iexplore | Select-Control -Class "Frame Notification Bar" | Send-Keys "%S"
Close IE window. This currently closes all IE instances, is there a way to just close the one it had opened to begin with?
Get-Process iexplore | Foreach-Object { $_.CloseMainWindow() }


Close IE window. This currently closes all IE instances, is there a way to just close the one it had opened to begin with?
Get-Process iexplore | Foreach-Object { $_.CloseMainWindow() }
$IE.Quit() will do that.

Similar Messages

  • Selecting shared computer closes Finder window

    I have two Airs on OS 10.9.4 that have file sharing enabled and are on my wireless network. The second Air shows up in the sidebar of the Finder window under Shared as expected, but when I click on it I immediately switch back to whatever other application is open instead of that window showing "Connect as..." in the next column. Going the other direction (from the second to the first) is fine. What am I doing wrong?

    To clarify (now that I've looked at it), it actually appears to relaunch the Finder since the menu bar disappears then reappears.

  • Selecting any file as 'Open With' crashes the Finder and worse than this...

    This is happening w/ ANY file on my system & quite a pain if I want to open something in quicktime 7 instead of x.... can't do it. So then I open QT 7 & try to open it that way & doing it that way only crashes QT instead of the Finder.
    I just ran DiskUtility this morning..
    So, I open up TextEdit & then try and select 'open file' and again.... TextEdit crash (*further detail below). Apparently, the only way to open my files is to double-click the doc. themselves.
    *When the 'Open' pane comes up, it automatically has the Desktop place selected & then GarageBand & iTunes in the top half (GarageBand selected) & down below it says 'Loading GarageBand songs...' so, it appears to be stuck and I have no choice to select anything else.
    Ideas on what to do?

    coffeemugger wrote:
    how do you move fonts to the desktop... they only 'copy' & it won't let you delete it from 'library'.
    The fonts your looking to drag to the Desktop are in your Home directory. Are you sure you chose /Users/yourname/Library/Fonts?
    coffeemugger wrote:
    if it's corrupt & pinpointing is hard....is there a way to do something to open up permissions for all my software so i can just bail and go w/ the new administrative account w/ out having to do license keys all over again?
    You can do that without worry about licenses or permissions on apps by dragging all the folders within your present Home separately to your new Home folder. i.e. Desktop, Documents, Downloads, Library, etc.
    a friend said in the past people have had crazy stuff w/ more than 1 quicktime version on their puter & they had to rename one of them... but this is affecting more than 1 program & crashing the finder ... but thought i'd throw that in for the heck of it.
    You can rename or delete QT 7. The only problem is that it will probably re-appear on the next update. I'm not sure if it will help though.
    -mj

  • Script/Automator Get Filenames in Folder and Move Each File into Folder based on Filename?

    I have searched for an answer to this and I have searched through multiple file renaming apps on the app store too but alas I cannot find anything that does what I want so I ended up looking into Automator as my saviour but I am a total NOOB.
    What I want to do is point automator to a folder of my choosing
    Automator then takes each file in that folder and creates a folder with the same name as the file and then move the file into that subfolder.
    Sounds easy enough eh
    I'm totally stumped, anyone have any guidance ???

    This is a PITA to do in automator - automator does not handle loops the way it should - but in applescript it looks like so (open this in the applescript editor, select the file you want to run it on in the Finder, then run the script):
    tell application "Finder"
              set mainFolders to the selection
      -- selection returns as a list, so even if there's only one folder a loop is used
              repeat with thisFolder in mainFolders
      --get the folder's contents
                        set containedItems to every item of thisFolder
                        repeat with thisItem in containedItems
      -- get name of file, add 'ƒ' to avoid name conflicts
                                  set newFolderName to (displayed name of thisItem) & " ƒ"
      --make folder, move item
                                  set newFolder to make new folder at thisFolder with properties {name:newFolderName}
      move thisItem to newFolder
                        end repeat
              end repeat
    end tell

  • How to select multiple files with Trackpad

    I am new to Mac and to the Trackpad. I apologize if this has been posted.
    When I work on a Windows PC, if I want to select multiple consecutive files I can click on the first file, press and hold SHIFT and then select the last file and all files in between are selected.
    I tried that using the Trackpad and it doesn't seem to work the same way. Is there another key combination? I can select multiple files by either using SHIFT (on Picasa website for example) and then tap or by holding COMMAND and then tap each individual file. But how do I select multiple files similar to Windows, clicking first file pressing a key and clicking the last file.
    Thanks in advance for any input on this.

    If you choose 'view as list', you can use the shift-key. Select an item, press the shift-key while you press an item below and all the items between are selected.

  • File close using script prompt message

    Hi Experts,
    I want to close my active docment forcefully wirthout save it.
    when I close it manually then it prompt a message :
    Save changes to the Adobe InDesign document "Abc.indd" before closing ?
    Don't Save                                                                    Cancel          Save
    I press Don't Save button and file close.
    I want to do this process using script.
    I use
    #target indesign
    var myDocument=app.activeDocument;
    myDocument.close(1852776480);
    where 1852776480 is "Save Option-No" value.
    But it do not close my active document.
    How close it ?
    Thanks.

    Thanks Beginner_X for reply
    I try :
    var myDocument=app.activeDocument;
    myDocument.close(1852776480);
    SaveOptions.no value is 1852776480.
    I think that there is no difference in
    app.activeDocument.close(SaveOptions.no)
    and
    var myDocument=app.activeDocument;
    myDocument.close(1852776480);
    In prompted message :
    Save changes to the Adobe InDesign document "Abc.indd" before closing ?
    Don't Save                                                                     Cancel          Save
    I want to say Don't Save using script.
    I want to close my modified active document without save using script.
    How close this ?
    Thanks

  • My safari is not working. Every time i click on it says to reopen or dont reopen. i press reopen i gives me this long screen and it says reopen or press okay. when i press ok it closes the box and doesnt open. when i press reopen the long screen stay

    . Every time i click on it says to reopen or dont reopen. i press reopen i gives me this long screen and it says reopen or press okay. when i press ok it closes the box and doesnt open. when i press reopen the long screen and stays like that.

    If Safari crashes on launch and you don't have another web browser, you should be able to launch Safari by starting up in safe mode.
    You may have installed the "Genieo" or "InstallMac" ad-injection malware. Follow the instructions on this Apple Support page to remove it.
    Back up all data before making any changes.
    Besides the files listed in the linked support article, you may also need to remove this file in the same way:
    ~/Library/LaunchAgents/com.genieo.completer.ltvbit.plist
    If there are other items with a name that includes "Genieo" or "genieo" alongside any of those you find, remove them as well.
    One of the steps in the article is to remove malicious Safari extensions. Do the equivalent in the Chrome and Firefox browsers, if you use either of those.
    After removing the malware, remember to reset your home page in all the web browsers affected, if it was changed.
    If you don't find any of the files or extensions listed, or if removing them doesn't stop the ad injection, then you may have one of the other kinds of adware covered by the support article. Follow the rest of the instructions in the article.
    Make sure you don't repeat the mistake that led you to install the malware. Chances are you got it from an Internet cesspit such as "Softonic" or "CNET Download." Never visit either of those sites again. You might also have downloaded it from an ad in a page on some other site. The ad would probably have included a large green button labeled "Download" or "Download Now" in white letters. The button is designed to confuse people who intend to download something else on the same page. If you ever download a file that isn't obviously what you expected, delete it immediately.
    In the Security & Privacy pane of System Preferences, select the General tab. The radio button marked Anywhere  should not be selected. If it is, click the lock icon to unlock the settings, then select one of the other buttons. After that, don't ignore a warning that you are about to run or install an application from an unknown developer.
    Still in System Preferences, open the App Store or Software Update pane and check the box marked
              Install system data files and security updates (OS X 10.10 or later)
    or
              Download updates automatically (OS X 10.9 or earlier)
    if it's not already checked.

  • Select project file (to open editor), Run Script - XCode Organizer

    Hi,
    I'm new to AppleScript, but I'm trying to automate a number of login processes. I have most of my needs worked out, but there are still a couple of loose ends which will save me substantial time if I can get them running. I'm not finding documentation of such processes, so maybe I'm barking up an empty tree. Is this possible; and were can I find the necessary documentation:
    1.
    I have a Ruby project maintained in the XCode Organizer. I'm striking out on blind tries. What I need to do is equivalent to selecting a document *in the organizer*. It has to have the same effect as manually negotiating the file/directory tree, because selection of the file further enables running an Action Script in the Organizer, the name of which is "START MONGREL SERVER."
    I have opened the target document, application_controller.rb, in the conventional manner you might open a document, but this has only opened the document in a separate editor window. This doesn't suffice, because it is the selection of a project document which makes the related Action Script available for further running.
    How then might I do this?
    2.
    After this file is selected, I need to run the action script, "START MONGREL SERVER." How likewise can I do this?
    3.
    Thirdly, is it possible to wait until threads invoked by previous script statements are finished? If so, how? Otherwise, can we insert a "wait" statement of some kind to delay execution of further instructions? If so, how?
    Much thanks in advance,
    m

    Hi,
    ODP doesnt have anything built in to run sql scripts. You'd likely need to parse the script yourself and execute the commands one by one, or you could shell out and run the script via sqlplus.
    Hope it helps,
    Greg

  • I am trying to free up some room on my touch and am unable to delete any songs or books from the listing.  With iTumes open and my touch listed I open the touch.  I then select the items I want to delete from the touch and press the delete button.

    I am trying to free up some room on my touch and am unable to delete any songs or books from the listing.  With iTumes open and my touch listed I open the touch.  I then select the items I want to delete from the touch and press the delete button.  Nothing happens.  I have also tried to right click on the item, but a delete option is not listed.  What do I need to do to get rid of some books?

    Open itunes, connect ipod, go to each tab, select what you want to be on the ipod, sync

  • FDM import script with selectable source file

    Hi All,
    I would like to build an import script attached to an import format that imports a text file with multiple value columns.
    Source file:
    Entity, Detail, Account 1, Account 2
    E_abc, D_abc, 100, 200
    In FDM this needs to be:
    Entity, Detail, Account, Amount
    E_abc, D_abc, Account 1, 100
    E_abc, D_abc, Account 2, 200
    So i need to loop through the file.
    My biggest challenge is that when i attach a script to an import format in the import process i cannot select a file from inbox anymore, it has to be a pre-defined file.
    Has someone an example or solution how to make a script-import format and enable the select file from inbox?
    And if possible has someone an example script of the issue stated above?
    Thanks in advance,
    Marc

    Hi Wayne..
    Thanks for your reply (and sorry for the delay in mine).
    Could you tell me what script to use to open the file in the befImport script, or how to rename the file in memory to a new one?
    So i write a script that rewrites the file to a new file in the inbox but i need to tell FDM that it needs to process this new file.
    Thanks,
    Marc

  • How to prompt user to select multiple files in file dialog using scripts

    Hi, is there a way to allow user to select multiple files inside the file dialog using scripts? So not just something like "*.ai" or "*.eps" but where the user can actually use their shift key to select a batch of files inside the file dialog and then the script would process each one.
    Thanks!

    // Main Code [Execution of script begins here]
    here's what I have so far. it would also be nice to not have illustrator stop at errors.. right now, it skips dialogs but on errors, it still stops.
    // uncomment to suppress Illustrator warning dialogs
    app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
    var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, pdfSaveOpts, folderName;
    var fullPath = "";
    var finalSlash;
    // Select the source folder.
    sourceFolder = Folder.selectDialog( 'Select the folder with Illustrator .ai files you want to convert to PDF');
    f = find_files(sourceFolder);
    function find_files (dir)
        return find_files_sub (dir, []);
    function find_files_sub (dir, array)
        var f = Folder (dir).getFiles ("*.*");
        for (var i = 0; i < f.length; i++)
            if (f[i] instanceof Folder)
                find_files_sub (f[i], array);
            else
                if (f[i].name.slice (-3).toLowerCase() == ".ai"          || f[i].name.slice (-4).toLowerCase() == ".eps")
                        //convert the array-listing to a string so we can manipulate it
                        fullPath = String(f[i]);
                        //find the position of the last / to indicate where the filename starts
                        finalSlash = fullPath.lastIndexOf("/");
                        //get the foldername by "slicing" from start to where finalSlash is located
                        folderName = fullPath.slice(0, finalSlash).toLowerCase();                   
                        sourceDoc = app.open(f[i]); // returns the document object
                        // Call function getNewName to get the name and file to save the pdf          
                                                      targetFile_PNG = getNewName(".png");
                                                      if(targetFile_PNG.exists) {
                                                      } else {
                                                                pngExportOpts = getPNGOptions();
                                                                sourceDoc.exportFile(targetFile_PNG, ExportType.PNG24, pngExportOpts );
                        targetFile_PDF = getNewName(".pdf");
                        pdfSaveOpts = getPDFOptions();
                                                      sourceDoc.saveAs(targetFile_PDF, pdfSaveOpts );
                                                      targetFile_SVG = getNewName(".svg");
                                                      svgSaveOpts = getSVGOptions();
                                                      sourceDoc.exportFile(targetFile_SVG, ExportType.SVG, svgSaveOpts );
                        sourceDoc.close();
                        array.push (f[i]);
    getNewName: Function to get the new file name. The primary
    name is the same as the source file.
    function getNewName(ext)
        var ext, docName, newName, saveInFile, docName, finalDot
        var loop = 0;
        docName = sourceDoc.name;
        ext = ext; // new extension for pdf file
        newName = "";
        finalDot = sourceDoc.name.lastIndexOf(".");
        while(loop < finalDot)
            newName += docName[loop];
            loop = loop + 1;
        newName += ext; // full pdf name of the file
              newName = newName.replace(" [Converted]","");
        // Create a file object to save the pdf
        saveInFile = new File( folderName + '/' + newName );
        return saveInFile;
    getPDFOptions: Function to set the PDF saving options of the
    files using the PDFSaveOptions object.
    function getPDFOptions()
        // Create the PDFSaveOptions object to set the PDF options
        var pdfSaveOpts = new PDFSaveOptions();
        // Setting PDFSaveOptions properties. Please see the JavaScript Reference
        // for a description of these properties.
        // Add more properties here if you like
        pdfSaveOpts.acrobatLayers = false;
        pdfSaveOpts.colorBars = false;
        pdfSaveOpts.colorCompression = CompressionQuality.AUTOMATICJPEGHIGH;
        pdfSaveOpts.compressArt = true; //default
        pdfSaveOpts.embedICCProfile = false;
        pdfSaveOpts.enablePlainText = false;
        pdfSaveOpts.generateThumbnails = false; // default
        pdfSaveOpts.optimization = true;
        pdfSaveOpts.pageInformation = false;
        pdfSaveOpts.preserveEditability = true;
        return pdfSaveOpts;
    function getSVGOptions()
              var svgSaveOpts = new ExportOptionsSVG();
              //just using defaults aside from what's written below
      //see http://cssdk.host.adobe.com/sdk/1.0/docs/WebHelp/references/csawlib/com/adobe/illustrator/ ExportOptionsSVG.html
      svgSaveOpts.embedRasterImages = true;
      svgSaveOpts.sVGTextOnPath = true;
              return svgSaveOpts;
    function getPNGOptions()
              // Create the PDFSaveOptions object to set the PDF options
              var pngExportOpts = new ExportOptionsPNG24();
              // Setting PNGExportOptions properties. Please see the JavaScript Reference
              // for a description of these properties.
              // Add more properties here if you like
              pngExportOpts.antiAliasing = true;
              pngExportOpts.artBoardClipping = false;
              pngExportOpts.horizontalScale = 100; // scaling to 350%
              pngExportOpts.saveAsHTML = false;
              pngExportOpts.transparency = true;
              pngExportOpts.verticalScale = 100; // scaling to 350%
              return pngExportOpts;

  • Why does right clinking on link and selecting open in new tab does not work?

    Why does right clinking on link and selecting open in new tab does not work?
    It opens up a blank page. The only way to make the link work is to click on the navigation bar in the new tab and press enter to reload the link.

    Do you have that problem when running in the Firefox SafeMode?<br/> ''A troubleshooting mode.''<br />
    1.You can open the Firefox 4.0 SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut. <br />
    2. Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut to open it again.''
    If not, see this: <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • Pressing the wheel on mouse, open certain bookmarks in new pages from a bookmarks folder WITHOUT the folder closes. Now you can open just one bookmark each time

    Boring when you have bookmarks folders into other bookmarks folders.
    Pressing the wheel, or choosing 'open in new tab', the new tab is automatically visualized on screen, even if this option isn't checked on generic firefox tool's options (the one on menu bar).

    Try using the bookmarks sidebar - '''{Ctrl + B}''' - it will stay open so that you can select multiple bookmarks.

  • By default, the 3d interface & dialog opens when the 3d option is selected. i forgot the question HA

    by default, the 3d interface & dialog opens when the 3d option is selected. (ya know, the grid on the artboard; 3d tools...etc...) I must have checked the box for it to never appear, because it doesn't appear and I'm not skilled enough with CC to operate Photoshop without it. My question is how would i enable this manually?

    I've noticed on FF29 that the "Save and Quit" "Quit" "Cancel" Option has disappeared. The normal changing of preferences in Firefox about:config below won't work.
    Type about:config into the address bar and press enter
    Accept the warning message that appears, you will be taken to a list of preferences
    Locate the preference browser.tabs.warnOnClose , if its value is set to false, double-click on it to change its value to true
    Repeat this for these 3 preferences ''browser.warnOnQuit'', ''browser.warnOnRestart'' and '''browser.showQuitWarning''
    To get the Save and Quit warning box back you have to Type about:config into the address bar and press enter
    Accept the warning message that appears, you will be taken to a list of preferences
    Right click on an open space in the preferences settings field and select a new Boolean and enter ''browser.showQuitWarning'' and click on OK, then make sure that it's set to true

  • By default, the 3d interface & dialog opens when the 3d option is selected. (ya know, the grid on th

    by default, the 3d interface & dialog opens when the 3d option is selected. (ya know, the grid on the artboard; 3d tools...etc...) I must have checked the box for it to never appear, because it doesn't appear and I'm not skilled enough with CC to operate Photoshop without it.

    I've noticed on FF29 that the "Save and Quit" "Quit" "Cancel" Option has disappeared. The normal changing of preferences in Firefox about:config below won't work.
    Type about:config into the address bar and press enter
    Accept the warning message that appears, you will be taken to a list of preferences
    Locate the preference browser.tabs.warnOnClose , if its value is set to false, double-click on it to change its value to true
    Repeat this for these 3 preferences ''browser.warnOnQuit'', ''browser.warnOnRestart'' and '''browser.showQuitWarning''
    To get the Save and Quit warning box back you have to Type about:config into the address bar and press enter
    Accept the warning message that appears, you will be taken to a list of preferences
    Right click on an open space in the preferences settings field and select a new Boolean and enter ''browser.showQuitWarning'' and click on OK, then make sure that it's set to true

Maybe you are looking for

  • How to keep mac at its best condition

    My mac have been overheating quite easily and battery is running out quicker than before so im wondering if anyone can tell me how to keep my mac at its best condition. My mac is 2010 mid mac book pro

  • A note on AirPlay and Third-Party Apps on the 2G iPod Touch

    I've been experimenting to see what third-party audio apps work with AirPlay and an Airport Express on my second-generation iPod Touch. Anything that has a play/volume control--Pandora, Public Radio--is just the same as iPod. The trickier thing is ap

  • Youtube spacebar play/stop function

    Ive noticed that you can use the spacebar and the left/right arrows to control the playback on youtube.com But this only works when i have taken my mouse to click the actual youtube video box or play button... Otherwise the spacebar will scroll down

  • Hi, I just had a session with an apple support staff and now my Macbook Air won't start up. What shall I do?

    I contacted Apple support because I couldn't download apps on iTunes. I got called back by Apple who redirected me to a technician. The technician had access to my macbook air screen and via her directing me on the screen and via telephone she had me

  • Perfect number assistance

    Hello, I'm currently enrolled in a JAVA course and doing very horrible. This course is required for my degree. I have been reviewing the forums and got this far on a program that will ask the user to enter a number and this program will find all the