| View previous topic :: View next topic |
| Author |
Message |
MacroBoy
Joined: 07 Jul 2009 Posts: 3
|
Posted: Tue Jul 07, 2009 1:36 pm Post subject: New Clipboard Challenge |
|
|
I'm working with an application that disables ^c and ^v functionality. I assume it is in effort to prevent the use of macros. However, the application does allow me to enter data using the Send command.
Is there a way to set a variable within AHK to equal the data on the Clipboard, then to Send %var% the data into the uncooperative application?
I have read and reread nearly every post on the boards involving clipboard issues, but they all seem to use the window paste from the clipboard in the end. After many hours of researching, I've become desperate enough to ask for help, something I do not take lightly. Any help would be greatly appreciated. |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5044 Location: the tunnel(?=light)
|
|
| Back to top |
|
 |
RTFM. Guest
|
Posted: Tue Jul 07, 2009 2:20 pm Post subject: |
|
|
You wanna tell us that you checked the AHK help for ClipBoard ??
| Code: | !F1::ClipBoard := "Listen son, you should RTFM!"
!F2::Send, %ClipBoard% |
|
|
| Back to top |
|
 |
DevX
Joined: 07 Jan 2009 Posts: 43
|
Posted: Tue Jul 07, 2009 4:35 pm Post subject: |
|
|
| Code: | F1::var := Clipboard
F2::Send, %var% |
Not as fast as a paste, but it works |
|
| Back to top |
|
 |
DevX
Joined: 07 Jan 2009 Posts: 43
|
Posted: Tue Jul 07, 2009 4:36 pm Post subject: |
|
|
| This is one of the main uses I have for AHK. You can do anything with ahk that a normal user can do. For mangly CMS systems, take a screenshot, cut up some images. and do image search's to find coordinates to use mousemove's to click on the input fields, then use the send %var% to put the data into them. |
|
| Back to top |
|
 |
MacroBoy
Joined: 07 Jul 2009 Posts: 3
|
Posted: Tue Jul 07, 2009 5:17 pm Post subject: |
|
|
RTFM: Yes, I have read the manual...those 15 lines assume ^v and ^c work for you in you app. If you read my question, you'd see your flame is pointless.
DevX: Thanks for the info. I tried your method to no avail. I'm obviously new to using AHK. Most of my experience has been C++, but this is what I've been asked to make work. Looks like it will be much easier when I get my hands around it.
I like your image search idea.
I may end up pasting information into a cell on excel and using the COM functions. They are more inline with the C++ syntax I'm used to. But, I hate to give up. I think these is easy and I'm just missing something.
Like I said earlier...the application accents data via the AHK Send command, it ignores all MS Clipboard commands.
Thanks for the help. Very appreciate.! |
|
| Back to top |
|
 |
MacroBoy
Joined: 07 Jul 2009 Posts: 3
|
Posted: Tue Jul 07, 2009 5:27 pm Post subject: |
|
|
DevX!
Got it working! Thank you very much!
EDIT: I've gone back and reread the Clipboard Help now that I got it working to see if I missed anything. Nothing in the help file tells you how to set a variable to the contents of what is already on the clipboard.
Last edited by MacroBoy on Tue Jul 07, 2009 5:36 pm; edited 1 time in total |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5044 Location: the tunnel(?=light)
|
Posted: Tue Jul 07, 2009 5:28 pm Post subject: |
|
|
What type of application are you working with? It's possible that one of the Control commands might work in lieu of copy/paste/Clipboard (ControlSend, ControlClick, ControlGetText, ControlSetText, etc.). _________________ Try Quick Search for Autohotkey or see the tutorial for newbies. |
|
| Back to top |
|
 |
|