Auto opening data files on boot..?

Discussion in 'macOS' started by Thrash911, Oct 13, 2006.

  1. Thrash911 macrumors 6502

    Thrash911

    Joined:
    Sep 14, 2006
    Location:
    Randers, DK
    #1
    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..
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    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):

    Code:
    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.
     
  3. n-abounds macrumors 6502a

    n-abounds

    Joined:
    Mar 6, 2006
    #3
    Yep, just make an application that opens the file.
     
  4. Thrash911 thread starter macrumors 6502

    Thrash911

    Joined:
    Sep 14, 2006
    Location:
    Randers, DK
    #4
    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. ;)
     
  5. mad jew Moderator emeritus

    mad jew

    Joined:
    Apr 3, 2004
    Location:
    Adelaide, Australia
    #5
    I thought you could add files to your Login Items in System Preferences. :)
     
  6. Thrash911 thread starter macrumors 6502

    Thrash911

    Joined:
    Sep 14, 2006
    Location:
    Randers, DK
    #6
    WTF..?!?!?! :eek: :eek: :eek: :eek:

    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!! :) :)
     
  7. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #7
    Haha I somehow assumed you couldn't do that. Nice :D
     
  8. mad jew Moderator emeritus

    mad jew

    Joined:
    Apr 3, 2004
    Location:
    Adelaide, Australia
    #8

    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. :)
     
  9. Thrash911 thread starter macrumors 6502

    Thrash911

    Joined:
    Sep 14, 2006
    Location:
    Randers, DK
    #9
    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..
     
  10. mad jew Moderator emeritus

    mad jew

    Joined:
    Apr 3, 2004
    Location:
    Adelaide, Australia
    #10
    No worries. I kinda thought you knew what was going on but thought I'd post up a quick explanation just in case. :p
     

Share This Page