Results 1 to 11 of 11
  1. #1


    Member Since
    Apr 23, 2007
    Posts
    6
    Unhappy Create a executable file for mac
    Hello there. (First time here) :mac:

    So, I am doing this flash application for both pc and Mac. I have functions to open some *.pdf and *.html files. So, for pc, I execute a *.bat file wich will open the pdf oh html file I want. Well, this is very simple, because I can create the *.bat file in any text editor, just saying something like "start myfile.pdf" and record it with the "bat" extension. Is there any similar file for mac? How can I run a system file to make start another?

    Thanks in advance.

    P. Capelo

  2. #2

    giulio's Avatar
    Member Since
    Mar 19, 2007
    Location
    NY USA
    Posts
    1,813
    Specs:
    iMac 5.1 | iMac 7.1 | iPod Touch | iPod Nano
    You will need applescript for that that. The editor is in the Applications > Utlitites


    I'm not sure of the syntax... but I think it would be something like:
    Tell Application Finder.app
    open file.ext
    end tell
    schweb This has to be one of the best threads ever in MF history...
    Cherokee This gets my vote for most innovative thread on Mac-Forums... ever.

  3. #3


    Member Since
    Apr 23, 2007
    Posts
    6
    hello. Thanks for your reply. I have been trying to make it work like that, but it does not. The extension of the file is "*.sctp", right? Another big problem is that I don´t have a mac to test it, so I have to ask for friends to test it for me... But thanks for showing the way: I´ll keep on trying. Regards

  4. #4

    giulio's Avatar
    Member Since
    Mar 19, 2007
    Location
    NY USA
    Posts
    1,813
    Specs:
    iMac 5.1 | iMac 7.1 | iPod Touch | iPod Nano
    Well you're going to have a very hard time building a mac app without a mac!
    schweb This has to be one of the best threads ever in MF history...
    Cherokee This gets my vote for most innovative thread on Mac-Forums... ever.

  5. #5

    Aptmunich's Avatar
    Member Since
    Mar 09, 2004
    Location
    Munich
    Posts
    9,073
    Specs:
    Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2
    You could also build .bat like files using Automator - however that's a Mac only application...

  6. #6


    Member Since
    Apr 23, 2007
    Posts
    6
    well, I got it. Now, I have a mac, and things are working. Just one thing: I need to tell application Finder to open a file wich is not on desktop, so it wont work. The problem is that the files shall be at the cd-rom, so I can´t no the absolute path. Is there any way to refer the folder where the script file is? It can´t be the front window, because the window will not be opened. The script will be called from an executable flash file

    Thanks for your help

  7. #7


    Member Since
    Mar 11, 2004
    Posts
    1,964
    Check out macscripter.net. It has a wealth of information for the neophyte and veteran scripter alike, and the forum posters appear to be very helpful.
    If you have more specific AppleScript or application-related questions, please post them to our Bulletin Board System. This system is host to thousands of AppleScript developers who will be happy to answer any questions you may have.

  8. #8


    Member Since
    Apr 23, 2007
    Posts
    6
    well, it seems I can´t register in macscripter...
    so, can anyone tell me why isn´t this working? I want to open the pdf file wich is in the same folder as the script executable file...

    set scriptFile to the path to me
    set folderName to the folder of the scriptFile
    tell application "Finder"
    open file "link_a_7_2_1.pdf" of folder folderName
    end tell

  9. #9


    Member Since
    Apr 23, 2007
    Posts
    6
    well, just got it. so, for someone who search this later, to open a file in the same folder as the script file, do this:

    --change this variable
    set theFile to "your_file.pdf"
    ------------------------------
    set myPath to path to me
    tell application "Finder"
    set myFolder to (container of myPath) as string
    open file theFile of folder myFolder
    end tell

  10. #10


    Member Since
    Mar 11, 2004
    Posts
    1,964
    Where'd you find it?

  11. #11


    Member Since
    Apr 23, 2007
    Posts
    6
    well, the part to find the folder path was in a macscripter forum (http://bbs.applescript.net/viewtopic...55&action=new). I got there by google; and the rest, also google and trying diferent ways...

    By the way, I must say thanks to all the answers before that helped to get this solution.

    Regards
    P. Capelo

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Unix executable file
    By BobanandaG5 in forum OS X - Operating System
    Replies: 1
    Last Post: 11-12-2013, 04:31 PM
  2. unix executable file
    By joe4735 in forum OS X - Operating System
    Replies: 9
    Last Post: 03-01-2013, 02:18 PM
  3. Unix Executable File Trouble
    By JacktheFlipper in forum OS X - Operating System
    Replies: 1
    Last Post: 10-22-2010, 01:27 PM
  4. unix executable file?
    By 88190211 in forum OS X - Operating System
    Replies: 1
    Last Post: 04-01-2008, 09:41 PM
  5. Unix Executable File problem
    By fender1100 in forum OS X - Apps and Games
    Replies: 9
    Last Post: 01-07-2007, 06:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •