Newbies has27 Posted August 20, 2008 Newbies Posted August 20, 2008 I've got an icon in photoshop, 50px by 50px. For Reasons to Become Apparent Later, I'd like to recreate this icon as single coloured pixels in FileMaker. Obviously, creating a couple of thousand pixels isn't my idea of a good time. I was hoping to AppleScript it. Can I AppleScript layout mode to the extent of 'make a rectangle, colour it this colour, position it here'? If so, then I can script Photoshop to get each individual pixel's colour, then go to filemaker and recursively make them; if not, then I guess I have a few evenings' tedium in front of me. Help much appreciated. Hamish
Fitch Posted August 21, 2008 Posted August 21, 2008 Can't be done. But you could make 50 fields with 50 repetitions and script or calculate the colors. Or you could type a period (.) on the layout; give it an object name; then conditionally format it based on the object name... maybe use a custom function... Huh? Who said that?
Vaughan Posted August 21, 2008 Posted August 21, 2008 This would be a job for repeating fields. Then you'd only need 50 fields each with 50 repetitions. Get the first field right and duplicate it 49 times.
comment Posted August 21, 2008 Posted August 21, 2008 I believe it could be done by using GUI scripting: http://www.apple.com/applescript/uiscripting/ Though I'd be interested to know what advantage can there be in having an image broken into individual pixels (unlike a graduated background made out of grouped lines, that can be stretched in one direction).
Fitch Posted August 21, 2008 Posted August 21, 2008 I'm curious about that too. "For Reasons to Become Apparent Later," so mysterious. I can't quite picture doing this with GUI scripting, but maybe it's possible. Another option that I think would be easier to program is some kind of macro utility.
Newbies has27 Posted August 21, 2008 Author Newbies Posted August 21, 2008 ;) Maybe I should've put 'reasons that are too boring to go into but which I think are reasonable'! I'd just prefer to have them, that's all. I think that the best/only way to do it would be to combine it with Extra Suites and use mouse clicks in Filemaker. I can reasonably easily get the colour of each pixel in Photoshop, but it's the creation in FileMaker that would be hard. I can script the menus, but resizing would be hard. That's where Extra Suites comes in - if I put the Info box at the top left of the screen, I know its position, and I could get ES to click in the right box and then keystroke the width and height. It might be interesting as a technical exercise, but I think isn't really worth it in the long run - as you say, images would work ok. I'll report back if I manage to get something working - it could be an amusingly kludge-based script for people to roll their eyes at! Thanks to all for the help. H
Recommended Posts
This topic is 5936 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now