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 

View / Edit File Comment with AHK?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Martin



Joined: 03 Nov 2004
Posts: 29

PostPosted: Sat Mar 05, 2005 3:35 pm    Post subject: View / Edit File Comment with AHK? Reply with quote

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
View user's profile Send private message
BoBo
Guest





PostPosted: Sat Mar 05, 2005 4:00 pm    Post subject: Reply with quote

Yes. I would be interested in getting a file properties read/write option as well. Very Happy
Back to top
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Sat Mar 05, 2005 7:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sun Mar 06, 2005 1:06 pm    Post subject: Reply with quote

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.

Savage wrote:
For viewing and changing file permissions, look at this - ftp://ftp.microsoft.com/ResKit/win2000/xcacls.zip -- Command line viewing and changing of file access control lists. Looks pretty easy to use.
Back to top
View user's profile Send private message Send e-mail
Martin



Joined: 03 Nov 2004
Posts: 29

PostPosted: Tue Mar 08, 2005 6:48 am    Post subject: Reply with quote

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
View user's profile Send private message
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Tue Mar 08, 2005 1:39 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
BoBo²
Guest





PostPosted: Fri Oct 17, 2008 7:24 am    Post subject: Reply with quote

Anyone has provided/found a solution already eg. with a DllCall() ?
Back to top
Lexikos



Joined: 17 Oct 2006
Posts: 2739
Location: Australia, Qld

PostPosted: Fri Oct 17, 2008 10:51 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
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