PDA

View Full Version : Auto opening data files on boot..?




Thrash911
Oct 13, 2006, 04:57 PM
Hey there..

Is it somehow possible to start up a data file automatically, when booting up? Like a text file, fx.. I can only get applications to start up..



kainjow
Oct 13, 2006, 05:57 PM
One way is to create an AppleScript that launches your file. Go to Script Editor, make a new document with this code (putting in the path of your file):

on run
do shell script "open '/Users/you/Documents/somefile.txt'"
end run

Then Save As > application bundle, and then add the final script to your login items.

n-abounds
Oct 13, 2006, 06:09 PM
Yep, just make an application that opens the file.

Thrash911
Oct 14, 2006, 03:12 AM
Thanks a lot you guys!

The script application works really well! This is a "trick" no note down for mac beginner. Although it would be easier, if you could just start up the data files directly. But, oh well.. If there is a workaround..

Have a good day. ;)

mad jew
Oct 14, 2006, 03:16 AM
I thought you could add files to your Login Items in System Preferences. :)

Thrash911
Oct 14, 2006, 03:38 AM
WTF..?!?!?! :o :o :o :o

You can just do it with data files! Um.. Explanation required.. I have used OSX in just about 14 days. I got used to start up applications on boot, by dragging them down to the dock.. That can not work with data files. But you can just add data files in Login Items directly..!!

Jesus christ, thank you mad jew!! :) :)

kainjow
Oct 14, 2006, 10:27 AM
I thought you could add files to your Login Items in System Preferences. :)
Haha I somehow assumed you couldn't do that. Nice :D

mad jew
Oct 14, 2006, 10:47 PM
You can just do it with data files! Um.. Explanation required.


In System preferences, go to the Accounts pane and then select Login Items from the top bar of the app. There's a box with a small list of things (it'll just have iTunesHelper by default). At the bottom of this box is a plus sign. Click on this sign and add whatever app or file you want to add. :)

Thrash911
Oct 15, 2006, 04:35 AM
Oh, thanks for the explanation, but I didn't need that. I wasn't too clear before, so you misunderstood me. I'm sorry. I meant that I (me) had some explaining to do, because I felt I should've tried to do what you explained.. Yes, that was deep.. :D :D I guess I just assumed (like kainjow :)) that it wasn't possible..

mad jew
Oct 15, 2006, 06:30 AM
No worries. I kinda thought you knew what was going on but thought I'd post up a quick explanation just in case. :p