| View previous topic :: View next topic |
| Author |
Message |
ste Guest
|
Posted: Tue May 23, 2006 1:46 pm Post subject: variable problems in first run |
|
|
Hi there,
I work with autohotkey to dump excel infos to a web based database. I'm doing this with an automated copy & paste
Send, {CTRLDOWN}c{CTRLUP}
variable := clipboard
...
The strange thing is: Almost anytime when I use the tool for the first time of a day, assigning the "copy"-value to the variable doesn't seem to work. Or there's often any value in the variable, which I copied before using the tool. When I exist the script and start it again, it always works. Any proposals??
cheers, ste |
|
| Back to top |
|
 |
Greg
Joined: 22 Dec 2005 Posts: 246
|
Posted: Tue May 23, 2006 1:57 pm Post subject: |
|
|
At the start of the script add:
|
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Tue May 23, 2006 2:04 pm Post subject: |
|
|
As you wrote, it is strange...
Do you have a clipboard manager? Doesn't latest Office versions manage the clipboard themselves?
Anyway, you can start by clearing the clipboard before starting the copy: Clipboard =
Perhaps check if the clipboard is empty or not after sending the Ctrl+C. _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
ste Guest
|
Posted: Tue May 23, 2006 2:18 pm Post subject: |
|
|
Ok, I'll try it with Clipboard =
but it may also be related with this Office clipboard manager (I don't trust it, even if it's deactivated). Thanks for you replies. I'll be back... |
|
| Back to top |
|
 |
evl
Joined: 24 Aug 2005 Posts: 1239
|
Posted: Tue May 23, 2006 2:37 pm Post subject: |
|
|
You could try adding a delay for the initial case, like:
As I recall the microsoft clipboard thing is rather slow to pop up on first use, so it could be the cause if it's still semi-active. |
|
| Back to top |
|
 |
Rabiator
Joined: 17 Apr 2005 Posts: 271 Location: Sauerland
|
Posted: Tue May 23, 2006 2:45 pm Post subject: |
|
|
Did you try | Code: | Send, ^c
variable := clipboard |
|
|
| Back to top |
|
 |
|