| View previous topic :: View next topic |
| Author |
Message |
Martin
Joined: 03 Nov 2004 Posts: 29
|
Posted: Sat Mar 05, 2005 3:35 pm Post subject: View / Edit File Comment with AHK? |
|
|
How can I use AHK to view and edit file comments that are displayed in the Window file properties dialogue box?
I use Windows fax and I want to set the comment to "Printed dd/mm/yy" when I have printed a file.
Many thanks,
Martin |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Sat Mar 05, 2005 4:00 pm Post subject: |
|
|
Yes. I would be interested in getting a file properties read/write option as well.  |
|
| Back to top |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Sat Mar 05, 2005 7:13 pm Post subject: |
|
|
Hi,
the comments are only available at NTFS and are stored in the ADS. You can access these data-streams by FILENAME.EXT:streamname. To access the comment-stream try this: FILENAME.EXT:SummaryInformation
The Box is ASCII 005. Because the Informations are binary it's not possible to have access to them within AutoHotkey by FileRead.
Tekl |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Sun Mar 06, 2005 1:06 pm Post subject: |
|
|
Thanks for the info.
This feature was previously requested and is on the to-do list as "New command FileGet/Set or FileGetProperties to retrieve and set things from a file's property sheet (title, author, permissions, etc.)" See also: http://www.autohotkey.com/forum/viewtopic.php?t=1229
If anyone knows the basics of how to implement this, please let me know since I haven't researched it yet.
Related info from the past:
| Tekl wrote: | | It would be also nice to get the access-rights and the file-owner. |
|
|
| Back to top |
|
 |
Martin
Joined: 03 Nov 2004 Posts: 29
|
Posted: Tue Mar 08, 2005 6:48 am Post subject: |
|
|
| Tekl wrote: | Hi,
You can access these data-streams by FILENAME.EXT:streamname. To access the comment-stream try this: FILENAME.EXT:SummaryInformation
Tekl |
How do you use this?
I have tried :
| Code: |
clipboard = F:\Temp\Temp2.txt:SummaryInformation
MsgBox, 0, , %clipboard%
|
but this does not work.
I have found an easy way of accessing the comment field in Xplorer2 by using the ALT+Z key combination and I am setting up AHK to automate the printing and commenting of the printed files.
Many thanks,
Martin |
|
| Back to top |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Tue Mar 08, 2005 1:39 pm Post subject: |
|
|
Hi Martin,
remember, in front of SummaryInformation there must be the ASCII-Char 005. Without this Char you'll access a different in most cases non existent Stream. But even then you'll have no success because AHK stops reading the stream if the first zero-byte (ASC 000) occurs, so you won't see anything.
BTW, you can create your own Streams by:
Notepad F:\Temp\Temp2.txt:NewStream.txt
and with this code you have Access (your code was wrong):
| Code: | fileread, clipboard, C:\Temp\Temp2.txt:NewStream.txt
MsgBox, 0, , %clipboard% |
Tekl |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Fri Oct 17, 2008 7:24 am Post subject: |
|
|
| Anyone has provided/found a solution already eg. with a DllCall() ? |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2739 Location: Australia, Qld
|
Posted: Fri Oct 17, 2008 10:51 am Post subject: |
|
|
| FileRead is capable of reading binary data from files, as it reads the entire file at once. It should work just as well with alternate streams. |
|
| Back to top |
|
 |
|