var=clipboard error

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
chegel
Posts: 3
Joined: 28 Jan 2014, 10:47

var=clipboard error

28 Jan 2014, 11:07

Hello:
I just joined and posting my first question for help.
I get an intermittent error at the line cl=%clipboard%, usually after running several times. Also get multiple instances of this script running after repeated errors.
Any help would be appreciated, thanks.


#SingleInstance force
DetectHiddenWindows, On

WinActivate, new - Notepad,
sleep, 25
click, 60,274

loop, 2
{
clipboard=
Sendinput, {CTRLDOWN}{home}a{CTRLUP}
sleep, 22
Sendinput, {CTRLDOWN}c{CTRLUP}
sleep, 77
clipWait, 1
ifNotEqual,clipboard,,break
ifequal,vv1,1,break
vv1=1
}

cl=%clipboard%
sleep,2000

.....

end:
sendinput, {esc}
Esc::ExitApp
nimda
Posts: 34
Joined: 18 Dec 2013, 14:06

Re: var=clipboard error

28 Jan 2014, 22:24

Can you post the text of the error?
jpginc
Posts: 124
Joined: 29 Sep 2013, 22:35

Re: var=clipboard error

28 Jan 2014, 22:38

Here is an alternative using controlGetText (http://ahkscript.org/docs/commands/ControlGet.htm)

Code: Select all

ControlGetText, theText, Edit1, ahk_class Notepad
Clipboard := theText
chegel
Posts: 3
Joined: 28 Jan 2014, 10:47

Re: var=clipboard error

29 Jan 2014, 13:59

Error message is:
Error: Can't open clipboard for reading.... The current thread will exit.


ControlGetText didn't copy anything to theText. I don't quite get the meaning of the control, Edit1.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: hiahkforum and 386 guests