Re: AppleWorks Spreadsheet manipulation
Re: AppleWorks Spreadsheet manipulation
- Subject: Re: AppleWorks Spreadsheet manipulation
- From: Harald E Brandt <email@hidden>
- Date: Sat, 17 Feb 2001 00:37:45 +0100
+--> I wrote 01-02-16:
>
no matter what I do, I always get errors like "AppleWorks 6 got an error: Can't make some data into the expected type.". None of my attempts along the lines of 'get cell 1 of spreadsheet layer of document 1' or 'formula of cell ...' or any of a zillion other similar constructs work. The ONLY command that works for me is the simple 'paste'.
+-
A hard reboot made my machine better understand commands, such as those above!!? Since my machine didn't wake up after a night of sleep (making a hard reboot necessary) the examples of things I tried are gone. None of my AS attempts for spreadsheet worked, but some in the word processing section actually worked!?
Worth mentioning is, however, that if I do
"get formula of cell 1 of spreadsheet of document "untitled (SS)"
I get the error message "AppleWorks 6 got an error: Can't make some data into the expected type", despite the real error in this case is that the name of the document shall be "untitled" (i.e without the "(SS)" even though "(SS)"is show in the window name.)!
+--> T&B wrote 01-02-16:
>
You can gain a better understanding of how the dictionary structure works in this tutorial:
>
http://www.tandb.com.au/applescript/tutorial/
>
......<snip>
>
...
>
>
>My real task is simply to paste a tab delimited text at the first empty row, then go and make some rows bold!
>
>
I don't know why/how it's on the cliipboard, but I suggest getting those values from your other application into a variable in your script, not copying to the clipboard. Copy and paste in AppleScript is a last resort, not because it's difficult, just not elegant and robust.
+-
First of all: Thank you for a nice and enlightening response!
I really appreciated that!!
As for why clipboard, it was just the way I tested things with AppleWorks. Actually, it originally comes from Netscape. But there does not seem to be any way I could make Netscape get me the contents of current browser window (corresponing to cmd-A and then cmd-C).
The site is my internet bank, and I copy account info. I don't want the source, I want the contents as it appears in the window generated from encrypted transmission. Of course I would like to go Tell Netscape to get me that data, but I don't think that is doable. (And Explorer doesn't work with my bank.)
So I manually do cmd-A, cmd-C, then I have made a quite complicatad script for reformatting the text (which is actually a complete trash - not a nice table) using a bunch of exquisite RegEx pattern matching and replacing commands. Now, at the last stage, I want to put it at the end of a spreadsheet and make somew lines bold.
+--
>
I also suspect that you would be better served by an AppleWorks database rather than a spreadsheet. If I knoew more about what you are doing, I could advise better.
+-
Hmm. Maybe. I thought spreadsheet would be good enough.
I simply want to append formatted account info, since the web version from my bank is so bad. Earlier I stayed in Tex-Edit Plus, but that program can't set tab stops independently, so I thought that AppleWorks would be a good simple choice to make columns of account info and letting me make check marks and small notes for each transaction.
+--
>
One method would be:
>
>
tell application "AppleWorks 6"
>
tell spreadsheet of front document
+-..... etcetera etcetera .....
Thanks again for the illustrative code example - I will do some "gymnastics" with it to do what I want...
Best Regards,
______heb________________________________________________________________
Harald E Brandt email@hidden PGP/MIME aware
http://heb.surf.to