Tapatalk

Tool Configuration for Safari on a Mac not PC (solved)

Tool Configuration for Safari on a Mac not PC (solved)

4
NewbieNewbie
4

    Jan 21, 2012#1

    Hi everyone!

    I'm trying to set up a new tool but how ever I try I just get a Terminal window to open up.
    I want to open a html document in Safari by selecting a menu item in the Tool menu or by clicking its icon in the User tools toolbar.

    Please help me.

    Most support pages on this site only show how things are done in the Windows version of the IDM's software. Please do something about that IDM. I'm a paying customer.

    An Apple a day keeps Windows away :-)

    341
    Basic UserBasic User
    341

      Jan 21, 2012#2

      Have you tried using

      Code: Select all

      OPEN '%f'
      with %f inside of single quotes.

      4
      NewbieNewbie
      4

        Jan 21, 2012#3

        Hi!

        @DaveS: Thank you! That works, as I'm sure you know.

        It still opens a Terminal window and the Safari window shows up but is immediately covered by the UltraEdit window, when the code is run.

        Do you or anyone else know how to get the Safari window to stay on top?

        /snowstar

        6,685587
        Grand MasterGrand Master
        6,685587

          Jan 21, 2012#4

          I'm not using a Mac nor UEM and therefore can't help with a detailed and tested solution. But what about searching in WWW for Safari command line and try the tips you find.

          The first page in results list of google.com is a forum page with subject Launching Safari from the command-line. According to last post open /Applications/Safari.app '%f' might work.

          The second page in results list of google.com is Invoking OS X apps from the command line. According to this page open -a /Applications/Safari.app '%f' would be the right command.

          Is there an Output tab on user tool configuration dialog of UEM? Yes, is there an option like Show Console/Terminal? Yes, then uncheck this option for this tool.

          UltraEdit for Windows has also an Options tab where the user can select the Program Type. Browsers are on Windows OS Windows applications and therefore Windows program must be selected instead of default DOS program. Has the user tool configuration dialog of UEM also an Options tab where the Program Type can be set?

          4
          NewbieNewbie
          4

            Jan 21, 2012#5

            @Mofi: Thanks for your response! Although I'm new to UltraEdit, I'm not new to finding answers to my questions on Google. I've been using Windows for about 20 years so I'm used to things being made overly complicated and not working right out of the box. My question might have sounded like a NOOB question and that I had not tampered with the settings myself. Sorry I got your moralistic streak going with your cute rhetorical questions.

            6,685587
            Grand MasterGrand Master
            6,685587

              Jan 21, 2012#6

              Okay, I just wanted to help. And because you have not posted what you have already tried, I thought, I give some hints found elsewhere.

              4
              NewbieNewbie
              4

                Jan 21, 2012#7

                SOLVED

                Command Line:

                Code: Select all

                open /Applications/Safari.app -Wn '%f'
                Everything else, in all tabs, blank or not selected, apart from Menu Item Name, of course.

                Well as it turns out: Thank you guys, both DaveS and Mofi!
                I didn't realize the Command Line field was for Terminal commands, but some sort of UltraEdit commands. I thought it was implied it would 'open' the active document if I wrote /Applications/Safari.app '%p%n%e' that's why it didn't work. Kind of like an argument in DOS: C:\Program files\Mozilla Firefox\firefox.exe [path to file]

                The second problem of not having the Safari window staying active, I then solved by running man open in Terminal:
                -W
                Causes open to wait until the applications it opens (or that were
                already open) have exited. Use with the -n flag to allow open to
                function as an appropriate app for the $EDITOR environment variable.
                -n
                Open a new instance of the application(s) even if one is already running.


                By hitting CMD+Q I quit the instance of Safari that I'm previewing in and return to UltraEdit.

                Just thought I'd let everyone know.
                Sharing is caring!