What am I doing wrong here.
I am trying to get a list of names in the clip that look like
I have tried
ClipPut("Bob" & @CRLF & "Greg" & @CRLF & "James" & @CRLF & "Kevin" & @CRLF & "Tim" & @CRLF & "Kelly" & @CRLF & _ "Susan"_& @CRLF & "Bill" & @CRLF & "Maggie" & @CRLF & "Amanda" & @CRLF & "Matt" & @CRLF & "Robert" & @CRLF & "Sara" & @CRLF & _ "Zach" & @CRLF) and
ClipPut("Bob" & @CRLF & "Greg" & @CRLF & "James" & @CRLF & "Kevin" & @CRLF & "Tim" & @CRLF & "Kelly" & @CRLF & _ & "Susan"_& @CRLF & "Bill" & @CRLF & "Maggie" & @CRLF & "Amanda" & @CRLF & "Matt" & @CRLF & "Robert" & @CRLF & "Sara" & @CRLF & _ & "Zach" & @CRLF)
from other postings here as a start I'm quite Close to my Goal of putting formatted text to the clipboard:
#include-once #include <GUIConstantsEx.au3> #include <GuiRichEdit.au3> #include <WindowsConstants.au3> Global $g_idLblMsg, $g_hRichEdit Example("The first text will be formatted ""as is""" & @CRLF & _ "(Default Font and font size)", "This text is formatted differently") MsgBox(0, "Rich Text copied", "Formatted Text put to clipboard") Func Example($TextDefault, $TextCourier) Local $hGui, $iMsg, $idBtnNext, $iStep = 0 $hGui = GUICreate("Example (" & StringTrimRight(@ScriptName, StringLen(".exe")) & ")", 320, 350, -1, -1) $g_hRichEdit = _GUICtrlRichEdit_Create($hGui, $TextDefault, 10, 10, 300, 220, BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) $g_idLblMsg = GUICtrlCreateLabel("", 10, 235, 300, 60) GUISetState(@SW_SHOW) _GUICtrlRichEdit_SetSel($g_hRichEdit, -1, -1) ; set selection behind last CHAR in RTF_EDIT _GUICtrlRichEdit_SetFont($g_hRichEdit, 8, "Courier New") ; change font to 8pt, Courier New _GUICtrlRichEdit_AppendText($g_hRichEdit, @CRLF & $TextCourier) _GUICtrlRichEdit_SetSel($g_hRichEdit, 0, -1) ; select all the content of the RTF_EDIT _GUICtrlRichEdit_Copy($g_hRichEdit) ; put the selection to the clipboard EndFunc ;==>Example
Finally the clipboard content has to hold pre-formatted data to be pasted into an email body. for the 2nd part I'd like to add a frame around the text, like I did manually before taking this screenshot.
Any suggestions, or maybe some absolutely different Approach?
I would like to create an auto login program using mouseclicks, controlclicks only, or whatever is required to send characters from Windows 10 On-Screen Keyboard to a User/Password login form. I thought I would start with OSK to NotePad. Using mouseclicks to enter ID/Password seems more secure than typing plain text. Seems like if I can get that to work I should be able to send the characters to any login form. I have tried many things but cannot send a character(s) from OSK to Notepad. Of course manually works great. Here is some code I have tried:
ControlGetFocus ("Untitled - Notepad")
; go to Notepad window
MouseMove(649, 206 , 0) ;move to Notepad, then click below
ControlGetFocus ("On-Screen Keyboard")
; go to OSK window then click on a character key
MouseMove(642, 807 , 0) ;letter - t
ControlClick("On-Screen Keyboard","","[CLASS:OSKMainClass]","left","",642, 807)
The above move to the correct position and appear to click but focus is lost to Notepad. Any help would be appreciated.
Hello all! I'm stuck at a seemingly simple part of my script. Using IE, I'm filling out a web form that involves clicking a "Browse" button and selecting a file. Once the file explorer dialog opens, however, I am unable to control it.
I have a string, which is the name of the file I want, and I'm trying to insert it into the 'File name:' text box in the dialog (which already has focus), but it doesn't get inserted. I've tried ClipPut and Send.
What's even more concerning is, when I close the dialog, the string is then pasted into the very next window that has focus, which is often SciTE. It's like that Browse's file open dialog halts all processes. Once it's closed, the script continues.
;~ Open a IE window and navigate to the login page. Global $oIE = _IECreate($urlBBLogin) _IELoadWait($oIE) ;~ Recognize the form on this page (login input boxes). Local $oForm = _IEFormGetObjByName($oIE, "login") Local $oTextLogin = _IEFormElementGetObjByName($oForm, "user_id") Local $oTextPass = _IEFormElementGetObjByName($oForm, "password") ;~ Enter the Automation user credentials into the form. _IEFormElementSetValue($oTextLogin, $bbUsername) _IEFormElementSetValue($oTextPass, $bbPassword) ;~ Click the Login button. _IEFormSubmit($oForm) _IELoadWait($oIE) ;~ Navigate to the feedfile upload page. _IENavigate($oIE, $urlUpload) _IELoadWait($oIE) ;~ Click the Browse button Local $Browse = _IEGetObjById($oIE, "feedFile_chooseLocalFile") _IEAction($Browse, "Click") Local $Browse = WinWait("Choose File to Upload") ;~ Open the file we created. WinActivate($Browse) Send($finalFile) Has anyone else experienced this problem? Any ideas to get around it? Am I approaching this the wrong way?
Any support is greatly appreciated.
1. How do I make a multiple minimized windows at once believe I am holding down a key for like 5 seconds?
I know I can send minimized windows a key press with ControlSend.
What hat would be the way to simulate a 'humanly' held down key to a few minimized windows?
2. How come: if I compare a handle's hexa value and the actual handler, I get false
For example: when the Notepad's handler value is 0x00000000000CFFFF, I always get the message box.
if(NOT(0x00000000000C0664 == WinGetHandle("Untitled - Notepad"))) Then MsgBox(0,"swi","0x00000000000CFFFF" & @CRLF & "lmao" & @CRLF & WinGetHandle("Untitled - Notepad")) EndIf
Why does that happen? also I can't use hexadecimal value as a handler when I use the ControlSend function.