AutoHotkey Community

It is currently May 27th, 2012, 10:36 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: March 5th, 2005, 4:35 pm 
Offline

Joined: November 3rd, 2004, 8:43 pm
Posts: 34
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2005, 5:00 pm 
Yes. I would be interested in getting a file properties read/write option as well. :D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2005, 8:13 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 6th, 2005, 2:06 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2005, 7:48 am 
Offline

Joined: November 3rd, 2004, 8:43 pm
Posts: 34
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2005, 2:39 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 17th, 2008, 8:24 am 
Anyone has provided/found a solution already eg. with a DllCall() ?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 17th, 2008, 11:51 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, chaosad, specter333 and 75 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group