Code: Select all
#InstallKeybdHook
!r::Reload
Insert::Suspend
numpaddiv::
{
send, #m
Suspend
}
return
NumpadClear::Send, {LButton}
numpadend::PGUP
Up::RShift
RShift::Up
return
#ifWinActive, ahk_exe chrome.exe ; switch tab
$tab::
GetKeyState, outputvar, NumLock, t
if outputvar = u
{
if WinActive("Facebook")
{
Send, {tab}
}
else
{
Send ^+{tab}
}
}
return
`::MButton
NumpadRight::Send, +{Right}
#if
;=========clipboard experiment
$^c::
Clipboard =
sleep 200
send, ^c
ClipWait
MsgBox, % clipboard
return
Anyway, the main issue is with the last part which is with the clipboard.
You see, I read a novel in a foreign language and there will be times when I have to check the definition of a word (using Google Translate). Weird thing is there are times when I do a copy (ctrl+c), but when I try to paste, either nothing happens or an older copied text comes up. That's why I made the snippet that would tell me that I copied something. Unfortunately (and weird enough), that part of my script will sometimes stop working and I have to refresh the script for it to work again. What could possibly be the problem? Also, can someone help me add a snippet that would trim the msgbox content, let's say, when the copied text is more than 5 lines? I'm not good with functions.
BTW, this machine is running on Windows 10 Home, and AHK is version 1.1.25.01