Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Autopaste feature


  • Please log in to reply
22 replies to this topic
PBY
  • Members
  • 18 posts
  • Last active: Apr 21 2015 12:30 AM
  • Joined: 02 Apr 2012

Use AU3_Spy.exe to fund the ahk_class and contol ClassNN, then replace all notepad and edti1 elements and change to A_EventInfo!=0

 

I found the ahk_class and control ClassNN, and replaced notepad as follows:

 

#Persistent
Run C:\Program Files (x86)\TextShield Fusion\TextShield.exe
Return
OnClipBoardChange:
  If (!WinExist("ahk_class TextShield32") || A_EventInfo!=0)
    Return
  KeyWait, LCtrl
  KeyWait, RCtrl
  ControlFocus,Edit1,ahk_class TextShield32
  ControlSend,Edit1,{CtrlDown}v{CtrlUp},ahk_class TextShield32
Return

 

 

I did not know where control ClassNN went, and while this runs TextShield when the script is run, it does not copy anything to it. I am missing something (as usual!).



HotKeyIt
  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008

A_EventInfo is 1 if it is text and 2 if it is binary and we return if it is empty=0.

 If (!WinExist("ahk_class TextShield32") || A_EventInfo=0)


PBY
  • Members
  • 18 posts
  • Last active: Apr 21 2015 12:30 AM
  • Joined: 02 Apr 2012

 

A_EventInfo is 1 if it is text and 2 if it is binary and we return if it is empty=0.

 If (!WinExist("ahk_class TextShield32") || A_EventInfo=0)

Changing that still does not make result in autopasting in that application, as it does in notepad. It launches but does not paste what is copied.



HotKeyIt
  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008
#Persistent
Run C:\Program Files (x86)\TextShield Fusion\TextShield.exe
Return
OnClipBoardChange:
  If (!WinExist("ahk_class TextShield32") || A_EventInfo!=0)
    Return
  KeyWait, LCtrl
  KeyWait, RCtrl
  ControlFocus,,ahk_class TextShield32
  ControlSend,,{CtrlDown}v{CtrlUp},ahk_class TextShield32
Return

You will have to play around and try different things, e.g. try ControlSend on its own.

Clipboard:="Hello"
ControlSend,,{CtrlDown}v{CtrlUp},ahk_class TextShield32

Are you sure the ClassNN in TextShield32 is Edit1 too?



PBY
  • Members
  • 18 posts
  • Last active: Apr 21 2015 12:30 AM
  • Joined: 02 Apr 2012
#Persistent
Run C:\Program Files (x86)\TextShield Fusion\TextShield.exe
Return
OnClipBoardChange:
  If (!WinExist("ahk_class TextShield32") || A_EventInfo!=0)
    Return
  KeyWait, LCtrl
  KeyWait, RCtrl
  ControlFocus,,ahk_class TextShield32
  ControlSend,,{CtrlDown}v{CtrlUp},ahk_class TextShield32
Return

You will have to play around and try different things, e.g. try ControlSend on its own.

Clipboard:="Hello"
ControlSend,,{CtrlDown}v{CtrlUp},ahk_class TextShield32

Are you sure the ClassNN in TextShield32 is Edit1 too?

 

All i know is that AU3_Spy says ClassNN:    TTaeRichEdit2. Where that is sppsd to fit in the script i know not.



HotKeyIt
  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008

That is what the documentation is for :)

ControlSend,TTaeRichEdit2,{CtrlDown}v{CtrlUp},ahk_class TextShield32


PBY
  • Members
  • 18 posts
  • Last active: Apr 21 2015 12:30 AM
  • Joined: 02 Apr 2012

 

That is what the documentation is for :)

ControlSend,TTaeRichEdit2,{CtrlDown}v{CtrlUp},ahk_class TextShield32

That never worked either.



faqbot
  • Members
  • 997 posts
  • Last active:
  • Joined: 10 Apr 2012
I have LibreOffice Writer document open and I can paste text into a non active LibreOffice - I copy text from my browser and it is sent to the non active LibreOffice Writer document by using this simple code:
SetTitleMatchMode, 2
ControlSend, , ^v, LibreOffice Writer