Error in docs about "file creation date"

Jim Ault JimAultWins at yahoo.com
Mon May 21 11:59:05 EDT 2007


Improved version of the modification date handler in Rev.

This version will parse and deliver the dates and times in separate columns
to make it easier to do comparisons.  That's all the time I have for now, so
hopefully this will help soomeone track what's happening

--------replace the previous script
on mousedoubleup
  set the cursor to busy
  put fld "asScriptModDates" into cmd
  do cmd as applescript
  put the result into ans
  put char 2 to -2 of ans into ans
  put quote into q
  put comma into c
  
  replace comma with cr in ans
  filter ans without "*sunday"
  filter ans without "*monday"
  filter ans without "*tuesday"
  filter ans without "*wednesday"
  filter ans without "*thursday"
  filter ans without "*friday"
  filter ans without "*saturday"
  replace cr with comma in ans
  
  replace (q&"NewLine") with cr in ans
  replace (q&c) with tab in ans
  replace ("date "&q) with empty in ans
  replace (tab &" "&q) with empty in ans
  set the itemdel to tab
  repeat for each line LNN in ans
    put item 1 of LNN & tab after newAns
    put word 1 to 3 of item 2 of LNN & tab after newAns
    put word 4 to -1 of item 2 of LNN & tab after newAns
    put word 1 to 3 of item 3 of LNN & tab after newAns
    put word 4 to -1 of item 3 of LNN & tab after newAns
    put item 4 to -1 of LNN & cr after newAns
  end repeat
  
  put newAns into msg
  set the clipboarddata to newAns
  --now paste into Excel to see in columns
end mousedoubleup
-----------------------------------


On 5/20/07 9:39 PM, "Jim Ault" <JimAultWins at yahoo.com> wrote:

> I have little experience with virus systems or other defenses against
> macros, but could it be possible that files may be 'quarantined' or marked
> or symbolized in such a way that a security system might interfere with file
> info?
> 
> Wilhelm: if you run an Applescript that gets the same info during the same
> handler, does this return the matching value?
> 
> I wrote these in about 30 minutes so you might want to refine them to do a
> better job (they work on my OSX)
> 
> You need to have the front window in the Finder showing the folder of files
> you want.  This list will include folders and show the flag as the last col.
> 
> ----- start copy here > paste into a Rev field "asScriptModDates"
> try
>     tell application "Finder" to set the source_folder to (folder of the
> front window) as alias
> on error -- no open folder windows
>     set the source_folder to path to desktop folder as alias
> end try
> 
> set the item_list to list folder source_folder without invisibles
> set source_folder to source_folder as string --conversion
> set outputList to {}
> repeat with i from 1 to number of items in the item_list
>     set this_item to item i of the item_list
>     set this_item to (source_folder & this_item) as alias
>     set this_info to info for this_item
>     
>     copy "NewLine" to end of outputList
>     copy the name of this_info to end of outputList
>     copy the creation date of this_info to end of outputList
>     copy the modification date of this_info to end of outputList
>     copy the folder of this_info to end of outputList
>     
> end repeat
> return outputList
> -------------------- end copy of Applescript
> 
> run this handler to get the dates into columns
> ------ start copy here > paste into stack script
> on mousedoubleup
>   set the cursor to busy
>   put fld "asScriptModDates" into cmd
>   do cmd as applescript
>   put the result into ans
>   put char 2 to -2 of ans into ans
>   put quote into q
>   put comma into c
>   replace (q&"NewLine") with cr in ans
>   replace (q&c) with tab in ans
>   replace ("date "&q) with empty in ans
>   replace (tab &" "&q) with empty in ans
> 
>   put ans into msg
>   set the clipboarddata to ans
>   --now paste into Excel to see in columns
> end mousedoubleup
> ---------- end copy
> 
> Hope this helps dial in on the inaccuracies.
> 
> Jim Ault
> Las Vegas
> 
> On 5/20/07 7:04 PM, "J. Landman Gay" <jacque at hyperactivesw.com> wrote:
> 
>> Wilhelm Sanke wrote:
>> 
>>> 
>>> The results I get here using your script are exactly the same as with my
>>> slightly different script
>> 
>> I think we need to find out why we're getting different results. A
>> search in bugzilla gives two related bugs, both now fixed:
>> 
>> 4293 The detailed files doesn't return correct creation date f...
>> 4474 Detailed Files Always Returns 0 for Last Modified and 000...
>> 
>> The first one involves only files with long file names on OS X. The
>> second doesn't match your results (you aren't getting 0, you are getting
>> real dates.) But maybe you could read these two and see if either apply
>> to your situation.
>> 
>> My own results are correct in both XP and OS X, so I don't know what
>> else to say. It would be great if others could do some checking. Maybe
>> that would give us a clue what the differences are between your results
>> and mine. There isn't much to go on so far.
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list