automation

Saving a web page from IE using Powershell

半世苍凉 提交于 2019-12-19 09:13:31
问题 I use the automation interface of Internet Explorer from Powershell to open a web page in a supported format. I want to save this page back to disk in one of the formats supported by IE. Opening the page is easy: $ie = New-Object -ComObject "InternetExplorer.Application" $ie.Navigate("C:\MyFile.mht") How do I save it back in another format? I need a solution that does not prompt the user since the idea is to automate this in a script running through multiple files. 回答1: You want to call

Get the word under the mouse cursor in Windows

风格不统一 提交于 2019-12-19 09:08:03
问题 Greetings everyone, A friend and I are discussing the possibility of a new project: A translation program that will pop up a translation whenever you hover over any word in any control, even static, non-editable ones. I know there are many browser plugins to do this sort of thing on webpages; we're thinking about how we would do it system-wide (on Windows). Of course, the key difficulty is figuring out the word the user is hovering over. I'm aware of MSAA and Automation, but as far as I can

How to change 3rd monitor programmatically

[亡魂溺海] 提交于 2019-12-19 08:49:21
问题 When I'm using my laptop, I use 3 displays: The laptop display A second monitor (connected through VGA) A TV (connected through HDMI) My videocard doesn't support 3 monitors, so I'm constantly switching from 2 to 3: when I'm on the computer, I use the 2nd monitor, and when I want to watch some movies, etc. I use the 3rd. I currently have to go to Screen Resolution , select the monitor that is not in use, and choose Extend desktop to this display . Is there a way I can automate it? Is there

Compiling C++Builder project on command line

别来无恙 提交于 2019-12-19 06:02:55
问题 Is there a way to compile a C++Builder project (a specific build configuration) from the command line? Something like: CommandToBuild ProjectNameToBuild BuildConfiguration ... 回答1: Use: msbuild project.cbproj /p:config=[build configuration] More specifics can be found in Building a Project Using an MSBuild Command . 回答2: There are different ways for automating your builds in C++Builder (as of my experience, I'm speaking about old C++Builder versions like 5 and 6). You can manually call

Fill and submit textarea programmatically in javascript

我们两清 提交于 2019-12-19 04:25:24
问题 I'm trying to automate the submission of replies to my Steemit posts using plain JS or Jquery. I used the javascript code below but the button remains disabled and therefore does not allow to post the reply/comment. How can I correctly trigger keydown / keypress / keyup events on the textarea in order to simulate the user "classic" interaction to send a reply? Thanks Target example: https://steemit.com/usa/@gaottantacinque/happy-4th-of-july In the Dev Tools console: function nap (durationMs)

VBA Hide User form but retain data entered into it

痴心易碎 提交于 2019-12-19 04:21:37
问题 I'm back again with what I hope is a fairly easy question. I'm attempting to create a user form in VBA. The user will enter certain bits of information into the form, and then close the form. I'd like the user form to retain the data entered after it is closed by the user. I'm treating it as a class module, since techinically they are, or at least that is how I understand it. Here is the code I'm using: In the main sub that displays the user form: Sub NonACATMemo() Dim UserInput As

Simulate “Windows” key and “+” key to zoom in

笑着哭i 提交于 2019-12-19 04:05:08
问题 Windows 7 (finally) has built-in zoom feature for the screen. Hold down the "Windows" key and you can then use the "+" key to zoom in and the "-" key to zoom out. As a result I have been trying to simulate this combination. With AutoIt I have tried: 1) Send("{LWINDOWN}" & "+" & "{LWINUP}") 2) $x = Chr(43) Send("{LWINDOWN}" & $x & "{LWINUP}") 3) Send("#{+}") ;//works but it also sends "+" key 4) Send("{LWINDOWN}") Sleep(10) Send("+",1) Sleep(10) Send("{LWINUP}") None of those 4 steps work... I

Outlook automation - Change Sender Account

旧巷老猫 提交于 2019-12-19 03:58:34
问题 I'm automating Outlook and I need to control who the email appears to be from. The users will have two or more Accounts set up in Outlook and I need to be able to select which account to send the email from. Any ideas? Needs to be supported on Outlook 2003 and above. I'm using Delphi 2006 to code this, but that doesn't really matter. 回答1: A person named Sue Mosher wrote up a pretty summary on this issue in microsoft.public.office.developer.outlook.vba. In short, it boils down to either of

Google Chrome unable to navigate to specified URL when triggered from Selenium

拈花ヽ惹草 提交于 2019-12-19 03:45:39
问题 I have an automation framework developed around Selenium-WebDriver which launches Chrome and navigates to specified URL and performs specified automation. When I commissioned the framework to perform a long task and left it overnight to run (Run was not successful). The following day when I tried to re-run a new set of Tests, Selenium was able to fire Chrome but the Browser would not navigate to the specified URL. The following is the detailed stack trace. Starting ChromeDriver (v2.7.236900)

InternetExplorer.Application object and cookie container

泪湿孤枕 提交于 2019-12-19 03:20:31
问题 I have the following console application written in VB.NET: Sub Main() Dim ie As Object = CreateObject("InternetExplorer.Application") ie.Visible = True ie.Navigate2("http://localhost:4631/Default.aspx") End Sub This program uses the InternetExplorer.Application automation object to launch an IE window and navigate a given url. The problem that I encountered is that even if I launch multiple instances of my application, the IE windows that are created with this method all share the same