Daydreamer 2

You can download example files, example AppleScripts and the manual here.

Table of Contents
System Requirements
Getting Started
Menus
Status Window
Getting URLs
Scripting Daydreamer
Paying for Daydreamer


Daydreamer 2 is a complete rewrite of Daydreamer using Cocoa.

System Requirements
Daydreamer 2 requires Mac OS X 10.3 or later.

Getting Started
When you first start Daydreamer, you will see a dialog reminding you that you are in an evaluation period.


As the dialog says, you will have 30 days to try Daydreamer. All of the features of Daydreamer will be available to you during that time, but you will be reminded on each launch with the message:

After 30 days, you will not be able to fully launch Daydreamer. It will let you buy a registration code or enter an existing registration code, but will quit immediately unless you do.

If you start Daydreamer by launching the application (as opposed to opening a Daydreamer document, Daydreamer will open an untitled document when started:

As the window contents say, you can double click to drop the settings sheet (or you can select “Document Settings…” from the “Edit” menu, or type Command - ,). You can also drag a picture URL into the window. If you drag a picture from a web browser (this has been tested in Safari and Firefox), the URL is dragged with it, and Daydreamer will accept that. If you drag in a URL, Daydreamer will set the change time to 5 minutes, until you change it in the Documents Settings sheet. If you show the sheet, you will see:

It’s pretty much self-explanatory. You need to enter the URL to the picture you want to view. This can be a web URL (http://machine/path), a file transfer URL (ftp://machine/path) or a file URL to a file on your own machine (file:///path). If you are not familiar with URLs, there is documentation later in this document. You also need to enter how often you would like to have the picture retrieved. You will want to check and see how often the picture is updated. After all, it doesn’t make sense to get a picture every 5 minutes if it is only changed every half hour. Daydreamer 2 will let you enter times down to the seconds, or shorter. Practically, 10 seconds is probably the minimum you want to use unless both you and the picture source are on a very fast line.

Daydreamer 2 added the feature of allowing you to save each picture as it is downloaded. Version 2.1 adds another option in saving p1ctures. You see both options click on the triangle next to “Picture settings”.


For either option, check the “Save Picture” checkbox. The two option buttons then become active. If you select the default, “Save Latest”, each new picture will replace the last one downloaded for this document. Selecting the other option, “Save All”, will timestamp each picture as it is downloaded, resulting in each downloaded picture being saved. This could be a lot of pictures, so be careful. In either case, the location for the saved pictures is shown in the text box. The default location is the Daydreamer folder in your Pictures folder. You can chage this location by entering the path as text or by clicking the Browse button to select the location. The Save Picture option is useful in order to use Daydreamer pictures in a Screen saver or on the Desktop. In the Desktop & Screen Saver pane of Mac OS X’s System Preferences, you can choose this folder. The Screen Saver will then automatically change between the pictures in the Daydreamer folder. You can make the Desktop change as well by making the appropriate selections.

To enter movie making settings for a document, you need to click on the triangle next to “Movie settings”.


The first choice is to “Make New” or “Add to Existing” movie. Be careful with this. If you choose “Make New” and specify a file that already exists, that file will be overwritten. If you choose “Add to Existing” even if the file does not exist, it will be created.

Select the movie path. You can 1) use the path Daydreamer suggests (based on the time stamp of when you create the Daydreamer document), 2) Enter the path as text, or 3) Browse for a file path by clicking the “Browse” button. The behavior of the Browse button is governed by “Make New”/“Add To Existing.” If “Make New” is selected, you can enter a new name. If “Add to Existing” is selected, you will only be able to select an existing file name.

The next entry lets you choose how long each picture will be displayed in the movie. The default is 0.1 seconds. You can experiment with different frame durations.

Making a movie is a memory intensive operation. Allowing the movie to get too big can result in slowing down Daydreamer, and probably will result in dropped frames. Checking the “Make new movie” check box will allow Daydreamer to create a new movie when the movie reaches the specified size. The movies share the same name, with § and a sequential number appended. There is a menu item which will concatenate the movies.

Click the record button (red circle) to begin recording. All movie settings will be disabled during recording, but the Pause (two vertical bars) and Stop (black square) buttons become enabled. Click one of them to stop recording and allow changes.

After the settings have been set, either through the dialog, or by opening a file, Daydreamer will start to get the picture. The window will display:


When the picture has been downloaded, it will be displayed. If the URL that you entered does not point to a picture, instead of seeing a picture an alert will be shown:


When you click “OK”, the settings sheet will drop again so you can correct the URL. If there are other errors in the connection, they will also be displayed in the Status Window. Once a picture has been downloaded, the status messages will not be displayed while the document is open.


Menus
Under the Apple menu, you will find “About Daydreamer...”. If you select that you will see:


This gives you the information about Daydreamer. The next menu item, “Register...”, lets you enter your registration code, if you have one, or actually buy the product from within the app. You will see:


There is more information about dealing with this dialog in Paying for Daydreamer.

Of course, you also Quit from the Daydreamer menu.



The File menu:

allows you to make a new document, open an old one, open a recent document, close the front document, save the changes, revert to the previously saved version, combine movies or print the picture. When you select “New”, you will get a new document as you do when launching Daydreamer. Selecting “Open...” shows you an open dialog:

This does not open a picture, per se, but all of the settings saved in that document. The picture pointed to by the saved URL will be downloaded as soon as the document is read.

Selecting “Save As...” or “Save” if the document has not been saved, will result in a standard save dialog:

As with all standard save panels, you can get more details by clicking on the triangle next to the file name. Saving does not save the picture, just all the settings you have entered, as well as the current size and position of the window.

Revert will revert the settings to those last saved.

As noted earlier, when making a movie it is best to let Daydreamer make it in pieces. Since that is the case, it would be nice if Daydreamer could also join them up. Well, it does.

The movies to be joined must be named in the same way, viz., filename§n.mov, where filename is any name you care to have (as long as it is the same for all files) and n is a number in sequence with all of the other files. The files will be joined in n order.

For example, if you have files named eiffel§1.mov, eiffel§3.mov, eiffel§4.mov and eiffel§5.mov then eiffel§3.mov, eiffel§4.mov and eiffel§5.mov could be joined, but eiffel§1.mov could not, because it is not in sequence with the others.

Here's how you join movies.

If you select “Print...” from the File menu, Daydreamer will print the current picture in the front document. It will print it as large as will fit on one page, up to the original size of the picture. The picture will be centered on the page.

The Edit menu:

lets you Undo, Redo, Copy, and change Document Settings. Undo and Redo are only active if there is something to be undone or redone. Copy will put the image currently being displayed in the front window on to the clipboard in TIFF format. Selecting “Document Settings...” drops the settings sheet described in Getting Started. The changes take effect immediately, but the picture will probably not change at once. The new picture does need to be downloaded before it can be displayed. Cut, Copy, Paste, Clear and Select all work in the edit fields in the settings sheet.

The next menu is the Window menu:


From the Window menu, you can zoom, minimize, display the picture in its largest (Normal) size, or in the Small size you get when you first create a document. The menu also lists the current open windows.

One of the most interesting features made available by the Window menu is “Show Status Window”. The Status Window shows the status of all open documents:

The left column has an image gives you the status of the last download. A gray dot indicates that no download has yet failed or completed. Green means a successful download, and red means there was an error on the last download.

The next column shows the name of the document. The column following that is an area where the program can give you a message, either status or error messages.

The "Expected" column shows the number of bytes expected to be downloaded, while the “Received” column shows the number of bytes received so far. The next two columns display the time the last download completed and the time when the next download will begin, respectively.

The last column shows you whether the document is currently downloading. If the checkbox is checked, the document is downloading. You can force a download to start by clicking the checkbox, or to stop by doing the same.

URLs
Daydreamer can understand web (http), file transfer (ftp) and local file (file) URLs. How do you get these URLs? Daydreamer comes with several documents that have URLs to interesting changing pictures on the Internet. Note: The URLs in the documents included with Daydreamer pointed to valid changing pictures the Daydreamer distribution was created. I can’t guarantee that they will remain valid.

There are web sites on the net that have changing pictures on them. Once you have found a picture, you need to get the URL. There are many ways to get a URL from a browser. the easiest is to simply drag the image from the browser on to a Daydreamer window. This has been tested in Safari and Firefox, but may not work in other browsers. In the case that you do not use Safari, Firefox or (most likely, but not tested) OmniWeb, you might want to read the section on URLs in the old Daydreamer documentation.

You do need to be careful when using this method that there isn’t a link around the picture you drag. Before dragging a picture to Daydreamer, click on it to make sure it doesn’t link off somewhere else. If there is a link, that link is what will be used in Daydreamer, not the path to the picture that you desire.

If you want to use Daydreamer to view a file on your own disk, you can either make use of one of the scripts included with Daydreamer, or you can enter a file URL into the settings dialog. A file URL has the form “file:///path”. path is the path from the root of the system to the file. Folders are separated by slashes, not colons as in Mac OS before Mac OS X.

Suppose that I have a “don” account. In a normal Mac OS X installation, I will have a “Pictures” folder. In that folder I might have a “Landscapes” folder. Finally, in that last folder is the picture I want to display, “Mountains.jpg”. The file URL would then be “file:///Users/don/Pictures/Landscapes/Mountains.jpg”. In a fully valid URL, you would need to replace the spaces with %20, and any special characters with the ASCII equivalent, but Daydreamer handles them fine as they are. The only replacement you would have to replace would be slashes “/” in any disk, file or folder name. Those would be replaced with “%2F”.

If this seems too complicated to you, just use one of the scripts that comes with Daydreamer.

Scripting Daydreamer

Daydreamer is AppleScriptable. Among other things, you can create a new document, change the settings of an existing document or export the current picture.

Scripting Daydreamer usually means creating commands that have to do with documents, though you can get information about windows. Documents can be referred to by name or by numeric index. The numeric index is the order in which the document was created which is the same as the order in the Window menu.

The following table summarizes what can be done.

AppleScript Command Acts On Example Discussion
close document, window close document 1 saving yes saving in file filePath closes the document or window. The saving option can be yes or no. If it is yes, you can specify a file to save the document in
count document, window set numDocs to count documents Returns the number of documents or windows that are open.
exists document, window set docExists to exists document named "Key West" This is useful for finding out if a document is open
open file set theDoc to open file filePath Opens a document from a file path
print document print document 1 prints the picture of the specified document
save document save document 1 in file filePath saves the document. If you include the in clause, you can specify a filepath.
get document, window see below get one or more of the properties of an object
set document, window see below set one or more of the properties of an object
make document see below discussed in detail below

To really discuss get, set and make, the properties of documents and windows must be discussed. Properties are what can be gotten or set for an element. The properties of a window are:

Property type description
bounds rectangle the boundary rectangle for the window
closeable boolean Does the window have a close box?
titled boolean Does the window have a title bar?
index integer the number of the window
floating boolean Does the window float?
modal boolean Is the window modal?
resizable boolean Is the window resizable?
zoomable boolean Is the window zoomable?
zoomed boolean Is the window zoomed?
name international text the title of the window
visible boolean is the window visible?


Most of the window properties are not terribly interesting. In fact, most of them are read only. Only the bounds and the zoomed are really writable. You could set the window size by saying:

set the bounds of window 1 to {20,20, 300,300}

This probably wouldn’t be the best idea because the aspect ratio of the picture would not be preserved. Of course, you could write a script that got the bounds, figured out the aspect ratio, and set different bounds while taking into account the aspect ratio.

The document properties get to the meat of what Daydreamer does. In fact, they are all of the settings, plus a couple.

Property type description
bytes expected integer, r/o Most, but not all, picture URL sources will tell Daydreamer how many bytes to expect while downloading. This is not guaranteed to be accurate by the spec. If Daydreamer doesn't get this number, it will use the number of bytes downloaded on the last attempt. This property is read only, so your script can't change it.
bytes received integer, r/o The number of bytes received in the current or most recent download. This changes during the download. This property is read only, so your script can't change it.
divide movie boolean Daydreamer performs better when the movie is kept to a smaller size. When this property is set to true, Daydreamer will append ¤n to the name you choose. When the movie reaches the size set by the max movie size property, n is incremented by 1 and a new movie is started.
downloading boolean Whether the document is downloading. If an image is currently downloading, returns true, otherwise false. Set this to true to start downloading. This does not affect the regular schedule of the document.
frequency real How often, in seconds, the picture at the URL is fetched.
image TIFF picture, r/o This is the main image of the document. This property is read only, so your script can't change it.
last download time date, r/o The date and time the last download completed. This property is read only, so your script can't change it.
make time lapse movie boolean This is true if the document is set to make a time lapse, false if it is not. You can change it to start and stop movie making.
max movie size integer This is the maximum size (in MB) for the movie when it is being divided.
movie file Unicode text The path to the file in which the time lapse movie is saved. It uses UNIX style separators (/), so you will need to use POSIX file to convert it to the form that AppleScript usually likes. See the example code, especially Alert.
movie frame duration real The duration of each frame in the time lapse movie in seconds (fractional values allowed).
new movie boolean This sets whether a new movie will be written at the next download. CAUTION: setting this to true will overwrite any file at path movie file with no warning.
next download time date This is the date and time the next scheduled download will begin. You can set a new download schedule by setting this property (greater than or equal to the current date and time). Future download times will be in reference to the time you set here.
picture file Unicode text The path to the file in which the downloaded picture is saved, if save picture is true. This is property is deprecated in 2.1. Use picture folder instead, unless you need a specific file name. It uses UNIX style separators (/), so you will need to use POSIX file to convert it to the form that AppleScript usually likes. See the example code, especially Alert. You can set a new path with this property. Remember to use UNIX style separators. POSIX path can help you here.
picture folder Unicode text The path to the folder in which the downloaded picture is saved, if save picture is true. It uses UNIX style separators (/), so you will need to use POSIX file to convert it to the form that AppleScript usually likes. See the example code, especially Alert. You can set a new path with this property. Remember to use UNIX style separators. POSIX path can help you here.
save picture boolean If this property is true, the picture will be saved in ~/Pictures/Daydreamer (by default, but set in picture folder) for use as the desktop picture or in a screensaver. The path to this saved file can also be set by picture file.
status Unicode text, r/o This is the status message of the document. It is what is displayed in the Status Window. This property is read only, so your script can't change it.
status image TIFF picture, r/o This is the image that reflects the status of the document. It is what is displayed in the Status Window. This property is read only, so your script can't change it.
time stamp picture boolean If this property is true, saved picture name will have a timestamp inserted between the name and the extension. Setting this to true is equivalent to selecting “Save All” in the settings. Setting it to false is equivalent to selecting “Save Latest”
URL Unicode text The URL the document will display. It must point to a picture.

The properties property makes it possible to get and set several properties at once. For example,

set propertyRecord to the properties of document 1

would return all of the settings of document 1. While you get all of the properties when you use the properties property, you don’t need to set all of them at once. If you wanted to start recording and specify a movie you could do it:

set the movie file of document 1 to "/Users/don/Movies/New QT Movie"
set the make time lapse movie of document 1 to true

Or you could do it in one statement:

set the properties of document 1 to { movie file: "/Users/don/Movies/New QT Movie", make time lapse movie:true}

You can use the same idea with the make command. If you simply say:

set theDoc to make new document

Daydreamer will make an untitled document. If you say:

set theDoc to make new document with properties {URL:"http://www.thisplace.com/images/webcam.jpg", frequency:600, make time lapse movie:false}

a new document will be created, and the picture will be displayed. make returns a reference to the document, so it’s a good idea to set a variable to the make statement so that you can change the document later.

For more information on scripting, look at the examples in the scripts folder.

Paying for Daydreamer

Daydreamer has the following pricing. Single user licenses, $20 per user. A Site License costs $1000 (equal to 50 users) and covers all locations for your organization within a 160 kilometer radius of your site (100 miles). One big advantage of a Site License is that you do not need to keep track of how many people at your site are using the software. A World-Wide License costs $2000 and it covers all locations for your organization on the planet earth.

Paying for Daydreamer revolves around the Register Dialog which is invoked from the Daydreamer menu:


If you already have a registration code from a previous version, you can enter it here and click “Enter Code.” If you are not ready to deal with this yet, you can click “Cancel.” Note: If you enter a code, or buy a code, while running Daydreamer as a user with administrative privileges, all users on that computer will be registered.

If you want to pay by cash, check, money order, or a currency not supported by the direct method discussed below, you can click the “Pay by Check” button, and you will be taken to Kagi's online page for Quandir Solutions. Follow the instructions there. When you have, you will be sent an email. The email will contain, in addition to a confirmation of your order information, the registration code. This will be close to the end of the message.

Return to the dialog above, and enter the name and code as given in the message and click “Enter Code.” You can paste in the name and code one at a time. If you have entered a valid registration code, you will see an alert confirming that you are registered.

By far, the easiest way for you to register Daydreamer is to click on the “Buy Code” button. You will see:


Clicking "Buy Now" will start the interaction with Kagi:


Your purchase will be transacted over a secure connection. Fill out this form with your information, and click “Purchase.” You will see a progress dialog:


When this is complete, your information will be automatically saved in Daydreamer. You will be shown an alert thanking you for registering:


You can see (and copy) your Registration code by selecting "Register..." from the Daydreamer menu again.

Back to the Daydreamer page.