Writing a diary with date and time as filenames

Hi,

I would like to write a diary with Scrivener. You can insert the current date and time as the filename of a new entry in Draft. Thats fine!

I wonder if it is possible to make a script that automatically opens Diary.scriv, inserts a new entry in Draft and inserts the current date and time as the name of the entry.

Does anybody know how to do this in Applescript?

While this could be done in Applescript, this is something that I would do using a macro program – it would be far easier to accomplish.

In a macro program like QuicKeys, you can assign a key to the following sequence:

i) Open the Diary project
ii) Type cmd-N (for a new document)
iii) Type the date (in your chosen format)
iv) Type the key command (whatever it is) that switches the focus from the binder to the Editor view.

So, if you have a macro program, you are set. If you don’t, you ain’t really livin’!

–Greg

Feeling like a dead potato I’d ask, why buy a macro programme if it is doable with Applescript? :wink:

Because, if you had a macro program, you would know how to make the function you want and you would have made it and would be enjoying it this moment. By pursuing it as an Applescript project, you find yourself here instead…and still no script. :astonished:

Oh I tried this macro programme and I got it to work, but the whole programme is a bit clumsy and I would like to use a light script. I had the hope that there is some applescript wizard around, who could share his knowledge. But maybe Scrivener isn’t scriptable at all?

Scrivener is not (yet) directly addressable via Applescript, but if you switch on the “Enable Access for Assistive Devices” option in the Universal Access preferences panel, one can “talk to” the GUI interface directly with Applescript (to choose menu items and such).

I think there is no doubt that one could build a script that would do what you want–I guess you just have to wait for the generous soul who will write it for you (b/c to explain how to do it would be to write it)!

–Greg

P.S. We learn from another thread that Keith is brooding on the laborious task of bringing true Applescript-ability to Scrivener, but it is a ways off, I guess.

Hi,

Yes, as has been noted, Scrivener as of yet is not directly Apple-scriptable. I looked into adding this sooner rather than later, but it turned out to be an onerous task and so I have now put it back for some time. I doubt I will look at it seriously for another year, to be honest, so the Macro program or Greg’s advice is the best way forward for now.

All the best,
Keith

Ugh, GUI scripting…It only works half the time anyway and has a tendency to break between system updates.

Why not just use Journler? Diaries are what programs like that specialize in. Any particular reason for wanting Scrivener for it?

Just to keep my work consistent in one app. I have a look at Journler right now and it is a very nice app. Some cool features.

But Scrivener is just better for writing. It has a fullscreen mode and it is very easy to put the current date and time into an entry, what is needed for a diary. I can use keywords and all that. And I can drag and drop entries from my diary to another project, if i need them there.

Ok, I cannot update my blog with Scrivener, but up to now I don’t use a remote blogging tool.

But I will test Journler for a while and see.

Macjournal does blogging and its easy to export.
When I open it it occupies my screen, not full screen like Scriv but enough.
It has quick entry mode as well.

Scriv for writing
Macjournal for bitching.

Paul

I agree, Journler is a brilliant programm for diary and keeping everything “random” plus research plus stuff that bubbles around in your mind. Scrivener is a great program for writers. They should coexist peacefully on one and the same Mac. I for myself am quite happy using both.

(And Journlers price tag leaves nothing to be desired to. Just as Radioheads “In Rainbows”. Makes you feel good about giving that money anyway. (Though I know lots of people that wouldn’t). Anybody else being excited about listening to the new tracks?)

napperkt:
Just downloaded the album this AM. The 3 year old has yet to give me time to listen though. I heard a early version of Videotape (piano and lyrics only) and thought it was brilliant.

This may help

Second Posting From
forums.macosxhints.com/archive/i … 14691.html

[code]If you are willing to install Apple’s GUI Scripting (http://www.apple.com/applescript/GUI/) software, this script, when run from a script menu or hot key, should paste the date into the selected field/document of the frontmost/active application.

set date_ to (current date) as string
tell application “System Events” to keystroke date_

Actual script output while composing this reply: Thursday, August 28, 2003 7:02:54 PM

If you don’t want to install the GUI software, this can also be done with Extra Suites (http://www.kanzu.com/), which makes available dozens of additional AppleScript commands.
[/code]

Hope that helps

My solution is to use TypeIt4Me. I have it set up so that when I type “daten” followed by a space or other punctuation character, it types the date in this format: “2007.10.16”, with no space following. This works in any OS X app, including the Finder, so I use it to name folders, backups, and all kinds of things. You could easily set up a macro to type the time also.

I would post the code I use, but my laptop’s hard drive just died and I’m using a friend’s machine until I get my own running again.

TypeIt4Me works by “watching” what you type. When you type a shortcut you select (such as imox), it backspaces and types in the expansion you set up (such as in my opinion). You don’t have to remember arcane keyboard shortcuts. You can have hundreds of shortcuts, and not run out of keyboard combinations (a possible issue with apps like QuiKeys).

I’m a slowish typist (60-75 wpm) and type a lot of technical stuff, so I use TypeIt4Me to speed up my typing. Instead of typing long words such as “necessary” and “feedback” I can type “nec” and “fb”, and TypeIt4Me (“ti4m”) expands them. Captialization matches how you typed the macro. (If I type “Fb,” it types “Feedback”.) Depending on what I’m typing, TypeIt4Me can almost double my typing speed.

I have also set up macros for stuff like email signatures, and to correct my commonest typing errors (“teh” expands into “the”). (Tip: to help you remember your macros, set up a system. I use standard suffixes to expand -ly, -ness, -ing, and -ed endings, so I only need to remember the abbreviation for the root word.)

If you’re a serious writer, and you use a keyboard, TypeIt4Me can be a great asset. Support from the author is prompt and courteous (much like Scrivener!), and the program’s utility is outstanding. Just remember to turn off TypeIt4Me in OS X if you are either (a) dictating text using speech recognition software, or (b) while using TypeIt4Me for Classic in a Classic app.

HTH,
Wilma