| OS X - Development and Darwin Discussion and questions about development for Mac OS X. |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Aug 28, 2008
Posts: 42
![]() Mac Specs: Black MB - 2.4 GHz Intel Core 2 Duo - 4 GB DDR2 SDRAM - OSX 10.5.8
|
I'm a noob trying to write my second script, and I'm having trouble with this one, seemingly simple bit. I need to save a list, so it can be accessed when the script runs again, but I can't get it to work.
The script checks for a certain file. If the file doesn't exist, it gets the bounds of the active window, creates the file and saves the bounds to it. If the file does exist it's supposed to use the bounds I saved to set the bounds of the active window, and then it deletes the file so it can do the same thing again. This is how I'm writing to the file: set sizefile to open for access file sizefilepath with write permission write orig to sizefile close access sizefile When I save it to a text file, instead of something like {94, 24, 815, 785} I get "list long^long long /long." If I tell it to write as a list, I get the same. If I tell it to write as a string, I get an error. I tried using "quoted form of" but that gives me an error too. Then I tried writing each item individually as an integer, but instead of numbers I get letters and special characters...I tried about a thousand more things, but I have no idea what I'm doing. This is how I'm reading the file: set orig to (read file sizefilepath) do shell script "rm " & quoted form of sizefileposix tell application frontapp set bounds of window 1 to orig end tell It's getting frustrating....help please?
Last edited by psychodork; 03-09-2009 at 01:47 AM. |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| My PowerMac G5 is acting screwy! | aedolch | OS X - Operating System | 5 | 08-01-2008 06:12 PM |
| What are the steps to save a Publisher file as a PDF? | rcronin | OS X - Apps and Games | 6 | 01-03-2008 11:07 PM |
| Is it possible to save a file made in Pages as HTM? | mLeroux | OS X - Apps and Games | 3 | 01-02-2008 05:17 AM |
| Can you guys open this site? | Desolate One | OS X - Apps and Games | 13 | 04-29-2005 01:23 PM |
| JPEG file download via PHP on Mac(IE) | irobot | Web Design and Hosting | 1 | 03-09-2005 09:40 PM |
All times are GMT -4. The time now is 04:16 AM.
Powered by vBulletin