With the below code, I'm using SendMode Event, and -- while typing everything out -- the script works as expected. It types all of text1, then pastes text2, then text3. HOWEVER, if it is set to SendMode Input, then, by the time text1 has finished typing, the Clipboard has already been set to %text3%. ...At least I think that's what's happening, because it types text1, then pastes text3 twice.
I prefer using SendMode Input, but I'm thinking that if I wish to mix pasting via clipboard assignment, with typing things out, I might have to force the use of SendMode Event. Any ideas how do get this to work as desired?
Code: Select all
#NoEnv
#SingleInstance force
#Persistent
SendMode Event ;Send is the same as SendEvent. It is more visual but prone to errors.
;SendMode Input ;SendInput is faster but you often can't see progress of typing.
!^+p::
text1 =
(
From Wikipedia, the free encyclopedia Jump to navigationJump to search For other uses, see Wiki (disambiguation). Editing display showing MediaWiki markup language Interview with Ward Cunningham, inventor of the wiki A wiki (/ˈwɪki/ (listen) WIK-ee) is a hypertext publication collaboratively edited and managed by its own audience directly. A typical wiki contains multiple pages for the subjects or scope of the project and could be either open to the public or limited to use within an organization for maintaining its internal knowledge base. Wikis are enabled by wiki software, otherwise known as wiki engines. A wiki engine, being a form of a content management system, differs from other web-based systems such as blog software, in that the content is created without any defined owner or leader, and wikis have little inherent structure, allowing blah.
)
text2 =
(
THIS IS TEXT 2
)
text3 =
(
THIS IS TEXT 3
)
send %text1%
Clipboard =
Clipboard = %text2%
send ^v
Clipboard =
Clipboard = %text3%
send ^v
return