Invisible File Generator V1
Invisible File Generator V1
- Subject: Invisible File Generator V1
- From: Gil Dawson <email@hidden>
- Date: Sat, 02 Mar 2019 18:36:12 -0800
Hi--
I recoded my "invisible file generator" to eliminate the POSIX stuff and set it
up so that it might work on your machine:
set QIFnListsFolder to path to desktop
set QifFileName to "Invisible File Issue"
set TxtFilePath to (QIFnListsFolder & QifFileName & ".txt") as text
try
close access file TxtFilePath
end try
open for access file TxtFilePath with write permission
write "Test Line" & return to file TxtFilePath starting at eof as text
close access file TxtFilePath
(I thought it odd I had to add "as text". The error message showed a list of
three strings.)
This V1 version has the same anomaly. The file it creates does not appear in
Finder windows, but passes the alias-exists test and can be seen in Open... and
Save As... dialogs by TextWrangler.
If you execute the above several times, it will add lines to the file. If the
file is showing in a TextWrangler window, you can see each line as it is added.
The file does appear on the actual desktop [fn-F11].
But the file does not appear in Finder windows, not in any of the four
selectable views.
Here's another clue:
I ran "Invisibility Toggler". The file appeared in a Finder window.
I ran "Invisibility Toggler" again. The file disappeared from that window.
--Gil
> On Mar 2, 2019, at 5:33 PM, James Yanchak <email@hidden
> <mailto:email@hidden>> wrote:
>
> Does your QIFnListsFolder end with a level separator (:)? That would create
> a mislocation of the file one level higher.
>
> Sent from my iPad
>
> On Mar 2, 2019, at 19:54, Gil Dawson <email@hidden
> <mailto:email@hidden>> wrote:
>
>> Using MacOS 10.11.6, Script Editor 2.8.2 and AppleScript 2.5,
>>
>> I wish to create a new text file using, e.g.,
>>
>> set QifFileName to "Gil's Data 2003-7 B4 House"
>>
>> set TxtFilePath to QIFnListsFolder & QifFileName & ".txt"
>>
>> try
>> close access POSIX file TxtFilePath
>> end try
>> open for access POSIX file TxtFilePath with write permission
>> write "Test Line" & return to POSIX file TxtFilePath starting at eof as text
>> close access POSIX file TxtFilePath
>>
>> After executing this script, the file does not appear in the corresponding
>> Finder window.
>>
>> Other files in the same folder are visible, just not this one.
>>
>> Changing among the four Finder window views does not help,
>> nor does clicking on a different folder then back,
>> nor does opening a new Finder window then navigating to the folder.
>>
>> I don't think it's a timing thing. The effect persists indefinitely.
>>
>> The file exists in other aspects. For example,
>>
>> An alias succeeds, as in:
>>
>> on FileExists(POSIXFilePath)
>> set ItExists to false
>> try
>> alias POSIXFilePath
>> set ItExists to true
>> end try
>> return ItExists
>> end FileExists
>>
>> The file does appear in the Open dialog for TextWrangler. I can open it,
>> and the text is there.
>>
>> The TextWrangler Save As... dialog also sees it, and alerts ("already
>> exists") if I click Save.
>>
>> If I choose Replace, then the file immediately appears in the Finder window.
>>
>> Most curious. Any ideas?
>>
>> --Gil
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> AppleScript-Users mailing list (email@hidden
>> <mailto:email@hidden>)
>> Help/Unsubscribe/Update your Subscription:
>>
>> Archives: http://lists.apple.com/archives/applescript-users
>> <http://lists.apple.com/archives/applescript-users>
>>
>> This email sent to email@hidden
>> <mailto:email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden