AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Binary data on the clipboard
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Hülyesamu



Joined: 24 Sep 2004
Posts: 17

PostPosted: Fri Sep 24, 2004 4:22 pm    Post subject: Binary data on the clipboard Reply with quote

Is it possible to use the %Clipboard% variable for referencing binary data on the clipboard?? As written in the manual, this variable can contain only text data, but I want to have more clipboards, and I need to copy the contents of the clipboard into a variable. Do you think there are some alternative solluions for this problem? (Eg. writing the clipboard content into a scrap file, and someow read it back if needed...)
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Fri Sep 24, 2004 5:16 pm    Post subject: Reply with quote

This is a good idea for a future enhancement so I've added it to the to-do list (thanks). Since realistically it will be at least two months before it gets worked on (unless someone else does it), you should consider other utility software that specializes in saving and restoring the contents of the clipboard. I believe there are quite a few to choose from.
Back to top
View user's profile Send private message Send e-mail
Hülyesamu



Joined: 24 Sep 2004
Posts: 17

PostPosted: Fri Sep 24, 2004 10:27 pm    Post subject: Reply with quote

I think 2 months is a quite short period of time, an I can say you that I was thinking approximately 1-2 weeks before I changed to AutoHotkey from the 6-7 year old (also open source) Hotkeys, AutoHotey's predecessor, which contained the 'multiple clipboards' option.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sat Sep 25, 2004 12:46 am    Post subject: Reply with quote

Do you have a URL or link to this other software? The multi-clipboard feature sounds interesting.
Back to top
View user's profile Send private message Send e-mail
Hülyesamu



Joined: 24 Sep 2004
Posts: 17

PostPosted: Sat Sep 25, 2004 11:42 am    Post subject: Reply with quote

It's a distinct proggy, and was not edited for approximately 5 years (but until the exploration the AutoHotkey, It's the best), I only found a link to a forum related to it

http://www.network54.com/Forum/23544

the proggy homepage itself is dicontinued and deleted:

http://www.broeze.com/hotkeys/

But, forunately, I have the proggy and I think the source, in pascal or delphi, if I remember well, and it's well under 1 MB, so I can send it to you in e-mail.

There is an other question:

I am hungarian, and there is a stupid problem on the hungarian and I think some other native keyboards: there is th key Right Alt, which is called "Alt Gr", and there are some important characters accessible only through pressing an "Alt Gr" combination, eg. | and \. The problem is that pressing this key (Alt Gr = Right Alt) has the completely same meaning as pressing Ctrl+Alt. If I map an event onto a Control+Alt combination, and I press the Alt gr+the same key, the effect will be the same (for example Right alt+w = Ctrl+Alt+w).
Isn't it possible to divide theese two key combinations? Because there are many important chars on the left side (q,w for example), and It's my best place to push combo buttons (close to te shift, alt, etc).
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sat Sep 25, 2004 1:04 pm    Post subject: Reply with quote

Quote:
I have the proggy and I think the source, in pascal or delphi, if I remember well, and it's well under 1 MB, so I can send it to you in e-mail.
Thanks, please send it to support@autohotkey.com

Quote:
If I map an event onto a Control+Alt combination, and I press the Alt gr+the same key, the effect will be the same (for example Right alt+w = Ctrl+Alt+w).
Isn't it possible to divide theese two key combinations?
Unfortunately I don't think so. I believe AltGr key is functionally identical to pressing Ctrl+Alt together, so there is no way to reliably differentiate between the two. On second thought, it might be possible to do so if the timing of two key-down events generated by AltGr is always the same. By checking the timing, you could probably tell with 99% certainty that AltGr was the source of the Ctrl+Alt keystrokes.

Since I do not have an AltGr key on my keyboard, I cannot test this. In addition, the timing might vary among various keyboards, drivers, and locales. Does anyone else have an interest in this? If so, I could collect timings from volunteers. If they are all almost the same, I might be able to add a feature to detect AltGr.

In the meantime, you might be able to detect AltGr yourself by relying on split-second timing. For example, if AltGr causes LControl to be pressed down immediately after LAlt (with no noticeable delay between them), you could make a hotkey to detect AltGr:
Code:
~LAlt::
; This hotkey relies on the fact that it won't be triggered if LControl
; is already being held down.  That's because such a hotkey would
; be defined either as *~LAlt (wildcard) or ~^LAlt (Ctrl+Alt)
GetKeyState, LControlState, LControl
if LControlState = D
{
    AltGrIsDown = y
    KeyWait, LControl, L  ; Wait for LControl to be logically released.
    AltGrIsDown = n
}
return

^!a::
if AltGrIsDown = y
{
    MsgBox Ctrl-Alt-A was activated via AltGr.
}
else
{
    MsgBox Ctrl-Alt-A was activated via Ctrl+Alt.
}
return
The above is purely hypothetical since I don't have an AltGr key to test with.
Back to top
View user's profile Send private message Send e-mail
Pallie



Joined: 05 Jul 2004
Posts: 57
Location: London

PostPosted: Sat Sep 25, 2004 1:26 pm    Post subject: Reply with quote

Chris wrote:
Quote:
I have the proggy and I think the source, in pascal or delphi, if I remember well, and it's well under 1 MB, so I can send it to you in e-mail.
Thanks, please send it to support@autohotkey.com.

I would be interested in being able to use the AHK clipboard for images too. If the program proves useful could you forward it to me too please Chris? Thanks.

I tried to above links and could not find the program.

Mike
Back to top
View user's profile Send private message
Hülyesamu



Joined: 24 Sep 2004
Posts: 17

PostPosted: Sat Sep 25, 2004 1:37 pm    Post subject: Reply with quote

The mail is sent, and fortunately the source was found.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sat Sep 25, 2004 2:28 pm    Post subject: Reply with quote

Thanks.

Pallie wrote:
If the program proves useful could you forward it to me too please Chris? Thanks.
It might be a while before I try it. If you want to use the program or look at the source code, I've posted it here:
http://www.autohotkey.com/misc/Hotkeys.zip
http://www.autohotkey.com/misc/Hotkeys_source.zip
Back to top
View user's profile Send private message Send e-mail
Pallie



Joined: 05 Jul 2004
Posts: 57
Location: London

PostPosted: Sun Sep 26, 2004 3:46 pm    Post subject: Reply with quote

Thanks both

It looks like an ancestor of AHK's - wish I'd know about it 5 years ago. It didn't seem to work with XP though. Whether the source code will help Chris develop the function in AHK I cannot say.

I was hoping that it might allow me to be able to use images from the clipboard in AHK, but I don't think it helps me. It does allow you to have multiple clipboards, but there is no command line equivalent which (I think) I need to be able to manipulate images via the clipboard. I've looked around for something but without much joy.

I have a noddy script that saves the contents of the clipboard and allows you to paste them back at a later date, but without being able to get at images it is not as useful as one of the many free clipboard utility programs. I use clipboard buddy by http://www.iQuesoft-Online.com with some success but it would be nice to be able to develop something in AHK and extend it to cover other functions.

I agree that 2 months to wait is no big deal.

Thanks again

Mike
Back to top
View user's profile Send private message
Hülyesamu



Joined: 24 Sep 2004
Posts: 17

PostPosted: Sun Sep 26, 2004 4:59 pm    Post subject: Reply with quote

I wonder that you couldn't use it - I've been using this tool from the Win95 through 98 and 2000 to the current XP without any problems. The help of the source itself is limited certeanly, since Chris develops in C++ and the source itself is in Pascal, whicih is a whole different world, but it could help to "reverse engineer" the program itself.

I've been thinking about an 'interim' sollution, to paste the clipboard content as a scrap to a file, and to copy the scrap file itself back to the clipboard if needed, and paste it, but I tried it, and it did not work at all.
Back to top
View user's profile Send private message
Pallie



Joined: 05 Jul 2004
Posts: 57
Location: London

PostPosted: Sun Sep 26, 2004 7:46 pm    Post subject: Reply with quote

Hülyesamu wrote:
I wonder that you couldn't use it.
I didn't persevere too much, even without it working I got a reasonable idea of what it did from the screens etc. Maybe I messed up the hotkey setting.

I have also tried workarounds for putting images on clipboards. What I think we need is some command line program that will copy whatever is on the clipboard to a given file, including images. It sound like something that should be out there but I have spent a while searching without success. If you find anything let me know.

The GUI functionality open so many doors for creating scripts that I can wait for the changes Chris mentioned.

Mike
Back to top
View user's profile Send private message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Mon Sep 27, 2004 5:19 am    Post subject: Reply with quote

If u guyz essentially want an ahk solution then don't read ahead...but if a very good clipboard utility (i've tried many and found this to be the best) will do, then read on:

- All clipboard formats are supported. ( text / images / files / folders / binary data)
- Menu can be customized.
- Picture is displayed on a menu.
- Tool tip is displayed on a menu.
- The format to leave and the format to save can be set up.
- The ignored window can be set up.
- The paste key for every window can be set up.
- Function is extensible with plug-in.
- freeware

its CLCL at www.nakka.com
its the reason i never coded something similar in ahk and when Jon coded a nice script for clipboard mgmt i didn't use it much as it can just support text on clipboard.
_________________
Back to top
View user's profile Send private message
Pallie



Joined: 05 Jul 2004
Posts: 57
Location: London

PostPosted: Tue Sep 28, 2004 12:55 pm    Post subject: Reply with quote

Thanks Rajat, it beats the program I was using by far.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Fri Oct 01, 2004 1:35 pm    Post subject: Reply with quote

Quote:
If I map an event onto a Control+Alt combination, and I press the Alt gr+the same key, the effect will be the same (for example Right alt+w = Ctrl+Alt+w).
Isn't it possible to divide theese two key combinations?
I started a new topic about this in case it's of interest to anyone: http://www.autohotkey.com/forum/viewtopic.php?p=5406#5406
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group