sree161

Any command to copy text from clipboard to notepad without opening it

11 posts in this topic

#1 ·  Posted

Hi all,

I am new here and i am searching for some command or script which can copy text on clip board to note pad without opening it (i am planning to copy by just clicking on notepad). Can u help on the same by giving me some idea.

Thanks in advance,

Sree161.

 

Share this post


Link to post
Share on other sites



#2 ·  Posted

I don't know about not opening notepad.   But here is what I use to copy from clipboard to notepad:

#include <Date.au3>
#include <file.au3>

Run('"C:\Windows\System32\notepad.exe"')
Sleep (4000)
WinActive("Untitled - Notepad")
Send("!EP")
Sleep (8000)
Send("!FA")
Sleep (2000)
WinActive("Save As")
Send("YourPath_and_FileName.txt")
Sleep (2000)
ControlClick("Save As", "", "&Save", "Left")
Sleep (3000)
ProcessClose('notepad.exe')

I use this coding daily.  Works great for my needs.  Some others most likely will have a better solution.

Share this post


Link to post
Share on other sites

#3 ·  Posted

Thanks for the help..but i want to copy it to a existing notepad....i changed some part of the scripts and script seems to be ok...but i am looking for better solutions.

Share this post


Link to post
Share on other sites

#4 ·  Posted

Confused, you want to copy the clipboard to the notepad that's already open?

Use ControlSetText. The example for ControlSetText does exactly what you want, just take out the Run("notepad.exe")

Share this post


Link to post
Share on other sites

#5 ·  Posted

6 minutes ago, InunoTaishou said:

Confused, you want to copy the clipboard to the notepad that's already open?

Use ControlSetText. The example for ControlSetText does exactly what you want, just take out the Run("notepad.exe")

Exactly what I was going to suggest.  It's like the example was made to order.

Share this post


Link to post
Share on other sites

#7 ·  Posted

Hi all,

I just wanted to copy text from command prompt to note pad (which is already created on desktop) without opening note pad. i mean to say i want to copy text which is in clip board just by selecting the targeted notepad. If i select it should paste text automatically into that notepad.

Share this post


Link to post
Share on other sites

#9 ·  Posted

10 hours ago, sree161 said:

Hi all,

I just wanted to copy text from command prompt to note pad (which is already created on desktop) without opening note pad. i mean to say i want to copy text which is in clip board just by selecting the targeted notepad. If i select it should paste text automatically into that notepad.

Create a hotkey, set it to copy text, then have it append to your text file.

1 person likes this

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

#10 ·  Posted

On 7/21/2017 at 2:49 AM, nitekram said:

Create a hotkey, set it to copy text, then have it append to your text file.

created hotkey and it worked fine....thanks for ur help

 

Share this post


Link to post
Share on other sites

#11 ·  Posted

try this

$tempvar=""

do
    $a=ClipGet()
    if $a<>$tempvar Then
        FileWrite("log.txt",$a&@CRLF)
        $tempvar=$a
        EndIf
    sleep(500)

    until 1=0

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now