Re: Thumbnail on txt file? (Mac users)

2020-01-28 Thread Michael Kristensen via use-livecode
Hi again

Thanks for the input on this topic to all!

I have put a little file here to demonstrate how this could be done.

If you have ideas for polish then I look forward to that.

https://forums.livecode.com/viewtopic.php?f=8&t=33586 


BTW
Here is some key codes for applescript
https://macbiblioblog.blogspot.com/2014/12/key-codes-for-function-and-special-keys.html

Michael
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Thumbnail on txt file?

2020-01-21 Thread Bob Sneidar via use-livecode
Applescript is not clumsy. It's obscure and very poorly documented. Application 
Dictionaries are especially bad. Typically no examples of usage, which means 
hours of frustrating trial and error, leading eventually to abandonment.  
And then you are dependent on vendor software and OS developer support not 
changing or excluding IAC support. 

Bob S


> On Jan 18, 2020, at 02:56 , Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Matthias,
> 
>> Am 18.01.2020 um 11:53 schrieb Matthias Rebbe via use-livecode 
>> :
>> Maybe this is of help.
>> https://apple.stackexchange.com/questions/6901/how-can-i-change-a-file-or-folder-icon-using-the-terminal
> 
> ah, a terminal solution, even better than a clumsy AppleScript. :-)
> 
>> -
>> Matthias Rebbe
>> Life Is Too Short For Boring Code


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Thumbnail on txt file?

2020-01-19 Thread Richard Gaskin via use-livecode

Michael Kristensen wrote:

> I Livecode I want to take a snapshot of part of the screen, and
> that snapshot I want to use as thumbnail for the txt file.
>
> In that way I can see what the txt file represent.

Does the file have to be a text file specifically?  How will it be used?

If your app is the only one that will be using it, you could use an 
array to represent the data, with one key for the text and another for 
the thumbnail.


Then again, Bill Prothero raised a good point when he noted that 
thumbnail of text is often too small to give any indication of the content.


If that's the case here, perhaps whatever needs these small 
representations could display the first X number of words of the text to 
give the user some idea about what the text contains.


But all of this is just guessing.  It would be most helpful to know how 
these files will be used.


--
Richard Gaskin
Fourth World Systems


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Thumbnail on txt file?

2020-01-18 Thread prothero--- via use-livecode
Mic,
My response assumed you will display the thumbnail in a livecode application 
and that you are not trying to change the icon of the text file for viewing on 
the desktop.
Bill

William Prothero
http://es.earthednet.org

> On Jan 18, 2020, at 7:58 AM, "proth...@earthlearningsolutions.org" 
>  wrote:
> 
> Mic,
> An issue is how to efficiently maintain the association between the text file 
> and its image. The easiest way is probably to just add something, like “-tn” 
> to the name of the text file, for the name of the image. That way you can 
> just test for the existence of file mytextfilename&”-tn” load it and display 
> it wherever you want. 
> 
> One concern comes to mind, though. If you capture an image of text, then 
> display it at a reduced size, it may quickly become unreadable.
> 
> Bill
> 
> William Prothero
> http://es.earthednet.org
> 
>> On Jan 18, 2020, at 5:17 AM, Michael Kristensen via use-livecode 
>>  wrote:
>> 
>> Thanks for the answer, Richmond
>> 
>> I just want to describe a little more what I want
>> 
>> I Livecode I want to take a snapshot of part of the screen, and that 
>> snapshot I want to use as thumbnail for the txt file.
>> 
>> In that way I can see what the txt file represent.
>> 
>> Does that change anything?
>> 
>> Mic
>> 
>>> Subject: Re: Thumbnail on txt file?
>>> Message-ID: <492a6ff7-7a25-5a4d-bc05-fd79fb1d9...@gmail.com 
>>> <mailto:492a6ff7-7a25-5a4d-bc05-fd79fb1d9...@gmail.com>>
>>> Content-Type: text/plain; charset=utf-8; format=flowed
>>> 
>>> Surely that is something that is done by the operating system or its 
>>> desktop/windowing manager and not by LiveCode.
>>> 
>>>> On 18.01.20 11:26, Michael Kristensen via use-livecode wrote:
>>>> Hi there
>>>> 
>>>> Im using a simple txt file for storing data.
>>>> 
>>>> I want to stick a preview thumbnail onto it when I save it.
>>>> 
>>>> Can I do that?
>>>> 
>>>> Mac High Sierra
>>>> 
>>>> 
>>>> Thanks
>>>> 
>>>> Michael
>>>> 
>>>> ___
>>>> use-livecode mailing list
>>>> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
>>>> Please visit this url to subscribe, unsubscribe and manage your 
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode 
>>>> <http://lists.runrev.com/mailman/listinfo/use-livecode>
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Thumbnail on txt file?

2020-01-18 Thread prothero--- via use-livecode
Mic,
An issue is how to efficiently maintain the association between the text file 
and its image. The easiest way is probably to just add something, like “-tn” to 
the name of the text file, for the name of the image. That way you can just 
test for the existence of file mytextfilename&”-tn” load it and display it 
wherever you want. 

One concern comes to mind, though. If you capture an image of text, then 
display it at a reduced size, it may quickly become unreadable.

Bill

William Prothero
http://es.earthednet.org

> On Jan 18, 2020, at 5:17 AM, Michael Kristensen via use-livecode 
>  wrote:
> 
> Thanks for the answer, Richmond
> 
> I just want to describe a little more what I want
> 
> I Livecode I want to take a snapshot of part of the screen, and that snapshot 
> I want to use as thumbnail for the txt file.
> 
> In that way I can see what the txt file represent.
> 
> Does that change anything?
> 
> Mic
> 
>> Subject: Re: Thumbnail on txt file?
>> Message-ID: <492a6ff7-7a25-5a4d-bc05-fd79fb1d9...@gmail.com 
>> <mailto:492a6ff7-7a25-5a4d-bc05-fd79fb1d9...@gmail.com>>
>> Content-Type: text/plain; charset=utf-8; format=flowed
>> 
>> Surely that is something that is done by the operating system or its 
>> desktop/windowing manager and not by LiveCode.
>> 
>>> On 18.01.20 11:26, Michael Kristensen via use-livecode wrote:
>>> Hi there
>>> 
>>> Im using a simple txt file for storing data.
>>> 
>>> I want to stick a preview thumbnail onto it when I save it.
>>> 
>>> Can I do that?
>>> 
>>> Mac High Sierra
>>> 
>>> 
>>> Thanks
>>> 
>>> Michael
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode 
>>> <http://lists.runrev.com/mailman/listinfo/use-livecode>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Thumbnail on txt file?

2020-01-18 Thread Michael Kristensen via use-livecode
Thanks for the answer, Richmond

I just want to describe a little more what I want

I Livecode I want to take a snapshot of part of the screen, and that snapshot I 
want to use as thumbnail for the txt file.

In that way I can see what the txt file represent.

Does that change anything?

Mic

> Subject: Re: Thumbnail on txt file?
> Message-ID: <492a6ff7-7a25-5a4d-bc05-fd79fb1d9...@gmail.com 
> <mailto:492a6ff7-7a25-5a4d-bc05-fd79fb1d9...@gmail.com>>
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> Surely that is something that is done by the operating system or its 
> desktop/windowing manager and not by LiveCode.
> 
> On 18.01.20 11:26, Michael Kristensen via use-livecode wrote:
>> Hi there
>> 
>> Im using a simple txt file for storing data.
>> 
>> I want to stick a preview thumbnail onto it when I save it.
>> 
>> Can I do that?
>> 
>> Mac High Sierra
>> 
>> 
>> Thanks
>> 
>>  Michael
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode 
>> <http://lists.runrev.com/mailman/listinfo/use-livecode>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Thumbnail on txt file?

2020-01-18 Thread Klaus major-k via use-livecode
Hi Matthias,

> Am 18.01.2020 um 11:53 schrieb Matthias Rebbe via use-livecode 
> :
> Maybe this is of help.
> https://apple.stackexchange.com/questions/6901/how-can-i-change-a-file-or-folder-icon-using-the-terminal

ah, a terminal solution, even better than a clumsy AppleScript. :-)

> -
> Matthias Rebbe
> Life Is Too Short For Boring Code
> 
>> Am 18.01.2020 um 10:27 schrieb Michael Kristensen via use-livecode 
>> :
>> Hi there
>> 
>> Im using a simple txt file for storing data.
>> I want to stick a preview thumbnail onto it when I save it.
>> Can I do that? Mac High Sierra
>> 
>> Thanks
>> Michael

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Thumbnail on txt file?

2020-01-18 Thread Matthias Rebbe via use-livecode

Maybe this is of help.


https://apple.stackexchange.com/questions/6901/how-can-i-change-a-file-or-folder-icon-using-the-terminal


-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 18.01.2020 um 10:27 schrieb Michael Kristensen via use-livecode 
> :
> 
> Hi there
> 
> Im using a simple txt file for storing data.
> 
> I want to stick a preview thumbnail onto it when I save it.
> 
> Can I do that?
> 
> Mac High Sierra
> 
> 
> Thanks
> 
> Michael
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Thumbnail on txt file?

2020-01-18 Thread Klaus major-k via use-livecode
Hi Michael,

> Am 18.01.2020 um 11:16 schrieb Richmond via use-livecode 
> :
> Surely that is something that is done by the operating system or its 
> desktop/windowing manager and not by LiveCode.
> 
> On 18.01.20 11:26, Michael Kristensen via use-livecode wrote:
>> Hi there
>> 
>> Im using a simple txt file for storing data.
>> I want to stick a preview thumbnail onto it when I save it.
>> Can I do that?
>> Mac High Sierra
>> 
>> Thanks
>>  Michael

I am sure this can be done somehow with AppleScript.
Search the web for some example scripts.


Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Thumbnail on txt file?

2020-01-18 Thread Richmond via use-livecode
Surely that is something that is done by the operating system or its 
desktop/windowing manager and not by LiveCode.


On 18.01.20 11:26, Michael Kristensen via use-livecode wrote:

Hi there

Im using a simple txt file for storing data.

I want to stick a preview thumbnail onto it when I save it.

Can I do that?

Mac High Sierra


Thanks

  Michael

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Thumbnail on txt file?

2020-01-18 Thread Michael Kristensen via use-livecode
Hi there

Im using a simple txt file for storing data.

I want to stick a preview thumbnail onto it when I save it.

Can I do that?

Mac High Sierra


Thanks

 Michael

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode