the text of the image of the window info of a file
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
the text of the image of the window info of a file
Hi All,
Is there a way to get the text of the picture of the window infos of a file ?
Best
Jean-Marc
Is there a way to get the text of the picture of the window infos of a file ?
Best
Jean-Marc
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: the text of the image of the window info of a file
Hi Jean-Marc,
I don't understand, what exactly are you looking for. Could you give an example?
What kind of info do you want. Do you want the picture?, the size, the dimension?
Kind regards
Bernd
I don't understand, what exactly are you looking for. Could you give an example?
What kind of info do you want. Do you want the picture?, the size, the dimension?
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: the text of the image of the window info of a file
...the thumbnail? ...the icon?
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: the text of the image of the window info of a file
Hi,
Thank for your reply
I want the horse picture
It is the thumbnail or an icon?
Jean-Marc
Thank for your reply
I want the horse picture
It is the thumbnail or an icon?
Jean-Marc
- Attachments
-
- infosAbout.jpg (15.96 KiB) Viewed 6029 times
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: the text of the image of the window info of a file
Hi Jean-Marc,
one way is to open infos, click at the icon (there will be a blue rectangle around it) and copy. In Livecode you can paste this.
If you want it by script this is a bit trickier. I would have to look into that. I dont know if one could get at it with applescript.
Kind regards
Bernd
one way is to open infos, click at the icon (there will be a blue rectangle around it) and copy. In Livecode you can paste this.
If you want it by script this is a bit trickier. I would have to look into that. I dont know if one could get at it with applescript.
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: the text of the image of the window info of a file
Hi Bernd,
Jean-Marc
Yes i want it by script in OSX, windows and if you give me the moon also that is perfectIf you want it by script this is a bit trickier
Jean-Marc
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: the text of the image of the window info of a file
Hi Jean-Marc,
I found this on the use-List from Terry Judd
http://www.mail-archive.com/use-revolut ... 17196.html
For Windows I dont know, there is a stack on revOnline Icon Loader. I don't know what it does, since it is for Windows icons.
I append a simple stack that gets via a shell command all the icns it can find.
use this applescript to open an icon in Preview
Where theFile is one line of the result of the getShellIcns
Regarding the moon i have one more question:
do you want the full moon or would a half/quarter moon be enough
Kind regards
Bernd
Edit 1, corrected first Name from Mark to Jean-Marc.
I found this on the use-List from Terry Judd
http://www.mail-archive.com/use-revolut ... 17196.html
I just tested the link and it still works. Is a very nice stack you just drop a file on to get the icon.Type...
go url "http://deblah.com/rev/MacIconToFile_demo.rev"
...into the message box to download it.
Terry...
For Windows I dont know, there is a stack on revOnline Icon Loader. I don't know what it does, since it is for Windows icons.
I append a simple stack that gets via a shell command all the icns it can find.
use this applescript to open an icon in Preview
Code: Select all
set theFile to "/Applications/Script Debugger 4.5.app/Contents/Resources/AppleEventLog.icns"
tell application "Preview"
open theFile
activate
end tell
Regarding the moon i have one more question:
do you want the full moon or would a half/quarter moon be enough
Kind regards
Bernd
Edit 1, corrected first Name from Mark to Jean-Marc.
- Attachments
-
- getShellIcns.rev.zip
- (1.14 KiB) Downloaded 214 times
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: the text of the image of the window info of a file
The following was erroneously posted in another thread:
http://forums.runrev.com/phpBB2/viewtop ... 230#p30230
I try to move it here.
Jean-Marc wrote:
http://forums.runrev.com/phpBB2/viewtop ... 230#p30230
I try to move it here.
Jean-Marc wrote:
to which Bernd repliedHi Bernd,
Yes. The link work, getIconToFile work and getShellIcns work also.
I tried this
CODE: SELECT ALL
on ShInPrev
put fld "fmyAS" into appleScriptInit
do appleScriptInit as "applescript"
end ShInPrev
with this content in fld "fmyAS"
set theFile to "/Applications/ Jeux/Chess.app/Contents/Resources/chess.icns"
tell application "Preview"
open theFile
activate
end tell
The script open "Aperçu" but no image come
All the best
Jean-Marc
P.S. I need times to think about the moon
Hi Jean-Marc,
set theFile to "/Applications/ Jeux/Chess.app/Contents/Resources/chess.icns"
there is a space before Jeux which probably does not belong there. Try this without the space.
I tried again with the script and a valid path and it works
by the way, we started this conversation here
viewtopic.php?t=6523&p=30177#p30177
Kind regards
Bernd
Last edited by bn on Wed Jan 19, 2011 2:26 pm, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: the text of the image of the window info of a file
Hi Jean-Marc,
try to put this into the script field
you would have to make a field 2 for the error message
Now if the file is not found applescript returns an error message.
Kind regards
Bernd
try to put this into the script field
and this into a buttonset theFile to "/Applications/FileMaker Pro 8/ FileMaker Pro.app/Contents/Resources/FMApp.icns"
try
set theFile to POSIX file theFile as alias
on error
return "file not found"
end try
tell application "Preview"
open theFile
activate
end tell
Code: Select all
on mouseUp
do field 1 as applescript
put the result into field 2
end mouseUp
Now if the file is not found applescript returns an error message.
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: the text of the image of the window info of a file
Hi Jean-Marc
Jean-Marc wrote
Please try this script in the field for applescript. Add a second field for the error message
Applescript as of version MacOSX 10.4.x can not use the "/" style of a path directly. That is the reson why it did not work. The above script works with MacOSX 10.4.x
Jean-Marc est-ce que tu es dans la lune? réponds ici, s'il te plaît.
Kind regards
Bernd
Jean-Marc wrote
No need to rename the apps. It should work without.Hi Bernd,
I tested with my Imac intel duo Core and it work fine
It is different on my Powerbook G4 10.4.2 (first tested)
Curiously, the getIconPaths via Shell return a space before "jeux".
I looked at the name of the folder and it have effectly a space.
I deleted it but no change
I restart the computer, the getIconPaths via Shell return always a space before "Jeux" (the name of the folder is "Jeux")
With others folder like adressbook, no space before but no image come
Best
Jean-Marc
Please try this script in the field for applescript. Add a second field for the error message
This script converts the "/" style of path to the more common ":" of the Mac. And it returns an error if the file is not found.set theFile to "/Applications/FileMaker Pro 8/ FileMaker Pro.app/Contents/Resources/FMApp.icns"
try
set theFile to POSIX file theFile as alias
on error
return "file not found"
end try
tell application "Preview"
open theFile
activate
end tell
Applescript as of version MacOSX 10.4.x can not use the "/" style of a path directly. That is the reson why it did not work. The above script works with MacOSX 10.4.x
Jean-Marc est-ce que tu es dans la lune? réponds ici, s'il te plaît.
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: the text of the image of the window info of a file
Hi Bernd,
Now, the last script work on my powerbook.
Best
Jean-Marc
It is possible.In fact i didn't understand our last exchangesest-ce que tu es dans la lune?
Now, the last script work on my powerbook.
Best
Jean-Marc
https://alternatic.ch