sendkeys

PowerShell SendKeys to InternetExplorer ComObject

纵然是瞬间 提交于 2021-02-10 15:56:47
问题 Here's one method I found which brings the IE ComObject window to the foreground and uses SendKeys. How would I send a sequence of key presses using this method? $ie = New-Object -ComObject InternetExplorer.Application $ie.navigate("www.google.com") do {sleep 1} until (-not ($ie.Busy)) Add-Type -AssemblyName System.Windows.Forms Add-Type @" using System; using System.Runtime.InteropServices; public class StartActivateProgramClass { [DllImport("user32.dll")] [return: MarshalAs(UnmanagedType

send_keys to hidden elements

对着背影说爱祢 提交于 2021-02-10 14:01:28
问题 I want to send a text to a text box of a page. Here is hidden element on page: <textarea class="chatterTopicsEnabled groupAtMentionsEnabled publishertextarea" id="publishereditablearea" name="publishereditablearea" role="textbox" tabindex="0" title="Topics" type="text" wrap="soft" data-uidsfdc="112" style="height: 208px;">Topics</textarea> <input type="hidden" id="publisherprompttext" name="publisherprompttext" value="Topics"> My code by which i can click the text box but can do nothing to

Send Keys is Disabling NumLock

。_饼干妹妹 提交于 2021-02-08 11:43:44
问题 Issue: Upon me using SendKeys to copy data from an Excel application to another (non-Microsoft) application, my Num Lock becomes disabled. Sub Test() Range("A1:B71").Select SendKeys "^C" 'Copies Selected Text AppActivate "AccuTerm 2K2" SendKeys "2", True 'Enters to notes screen SendKeys "^M", True 'Confirms above (Enter key) SendKeys "^V", True 'Pastes into client application Application.Wait (Now + TimeValue("0:00:05")) 'Providing time for client application to finish 'pasting... SendKeys "

Copy/Paste file path in already open file dialog window (3rd party) with VBA

谁说胖子不能爱 提交于 2021-02-08 10:16:48
问题 My native language isn't English and I am relativly new to VBA, so I apologize in advance. My problem is the following: A part of my VBA code trys to copy and paste a file path from the clipboard that was defined in a string variable before. I do have a solution but that consists of using "Sendkeys" - not quite content with that one even if it works Is there an alternative way to Sendkeys ? Like for example to find and activate the already open file dialog, specifically the input field within

how to send a “Ctrl+Break” to a subprocess via pid or handler

爱⌒轻易说出口 提交于 2021-02-08 06:21:38
问题 import subprocess proc = subprocess.Popen(['c:\windows\system32\ping.exe','127.0.0.1', '-t'],stdout=subprocess.PIPE) while True: line = proc.stdout.readline() print "ping result:", line.rstrip() #sendkey("Ctrl+Break", proc) # i need this here, this is not for terminate the process but to print a statistics result for the ping result. If someone know how to do it, please share with me, thanks! 回答1: Windows? Try this: import signal proc.send_signal(signal.SIGBREAK) If you meant a signal

Excel VBA Sendkeys without delay

前提是你 提交于 2021-02-07 11:11:51
问题 I'm trying to copy some cells from excel to another Windows application so fast as possible using Sendkeys. If I don't use "wait", Sendkeys fails. And if use it, Sendkeys run slowly and I need it in full speed, realtime if possible. Anyone can help me? Sorry for my English, I'm a brazilian student. Thank you Public Const MOUSEEVENTF_RIGHTUP As Long = &H10 Private Sub SingleClick() mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 End Sub Private Sub

Excel VBA Sendkeys without delay

这一生的挚爱 提交于 2021-02-07 11:04:22
问题 I'm trying to copy some cells from excel to another Windows application so fast as possible using Sendkeys. If I don't use "wait", Sendkeys fails. And if use it, Sendkeys run slowly and I need it in full speed, realtime if possible. Anyone can help me? Sorry for my English, I'm a brazilian student. Thank you Public Const MOUSEEVENTF_RIGHTUP As Long = &H10 Private Sub SingleClick() mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 End Sub Private Sub

SendKeys to inactive application

爷,独闯天下 提交于 2021-02-04 18:24:11
问题 I am trying to figure out how I can make my C# application to send keys to another application window, without focusing on it. I have a list of words and 3 notepads files. Imagine I have all 3 notepad windows opened in order, and my program would take the first word in the listbox and write it in the first Notepad window. The second word in the second Notepad window and third one in the third Notepad window. Then start over and continue. So I want it to post 1 word in each and continue like

Python Selenium - AttributeError : WebElement object has no attribute sendKeys in textarea

試著忘記壹切 提交于 2021-02-02 09:39:25
问题 My code : from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.by import By driver=webdriver.Firefox() driver.get("http://www.58yumi.com/") driver.find_element_by_id("UserName").send_keys("XXXXXXX") driver.find_element_by_id("Password").send_keys( "XXXXXX") driver.find_element_by_xpath("//*[contains(@type,'submit')]").click() driver.get("http://www.58yumi.com/user_jiexi.htm") driver.find_element_by_id("cznr").sendKeys(

How to copy-paste from DOS application to Excel using SendKeys?

风格不统一 提交于 2021-01-27 19:44:53
问题 I'm trying to simulate this action: activate another application, send keystroke ctrl+c, go back to Excel, send key stroke ctrl+v and have that value in a cell. It's a DOS window style application, so keystroke is the only way to manage it. I managed to activate and to input keystrokes such as ENTER into that DOS style application, but when I try ctrl + C it is not seen to do anything. I tried simulating it in Excel VBA with: Range("E7").Select SendKeys "^c" Range("G7").Select SendKeys "^v"