
Here is my code [code=autohotkey file=Untitled.ahk[#Persistent
SetTimer CheckWindow, 250
CheckWindow:
IfWinNotExist, placeholder
Return
else
WinActivate, placeholder
sleep,100
loop,2
{
send, {tab}
}
Send, ^a
sleep, 200
Gosub, copy
sleep, 300
WinWaitClose,placeholder
Return
copy:
clip5 =
ClipSaved := ClipboardAll
clipboard := ""
Send, ^c
ClipWait, 1
if (!ErrorLevel)
clip5 = %clipboard%
Sleep, 100
clipboard := ClipSaved
ClipSaved := ""
Pause
return
WinWaitClose,Wimi förifyllnad
return
F11:: ; save clip2
clip5 =
ClipSaved := ClipboardAll
clipboard := ""
Send, ^c
ClipWait, 1
if (!ErrorLevel)
clip5 = %clipboard%
Sleep, 100
clipboard := ClipSaved
ClipSaved := ""
return
f12::
ClipSaved := ClipboardAll
clipboard := ""
clipboard = %clip5%
ClipWait, 1
if (!ErrorLevel)
Send, ^v
Sleep, 100
clipboard := ClipSaved
ClipSaved := ""
return[/code]
As you all can see I want to copy paste something in to clip5 and later be able to paste it on using the code below F12. If I use the code below F11 and F12 it works, but as soon as I try using paste with the code under presistant it fail to copy.