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

A place for users to discuss the Mac-based version of UltraEdit.

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

Postby snowstar » Fri Jan 20, 2012 7:38 pm

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 :-)
snowstar
Newbie
 
Posts: 4
Joined: Fri Jan 20, 2012 7:27 pm

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

Postby DaveS » Fri Jan 20, 2012 9:22 pm

Have you tried using

Code: Select all
OPEN '%f'

with %f inside of single quotes.
User avatar
DaveS
Basic User
Basic User
 
Posts: 39
Joined: Wed Oct 27, 2010 8:49 am
Location: San Diego, California

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

Postby snowstar » Sat Jan 21, 2012 3:15 am

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
snowstar
Newbie
 
Posts: 4
Joined: Fri Jan 20, 2012 7:27 pm

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

Postby Mofi » Sat Jan 21, 2012 4:15 am

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?
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

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

Postby snowstar » Sat Jan 21, 2012 5:28 am

@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.
snowstar
Newbie
 
Posts: 4
Joined: Fri Jan 20, 2012 7:27 pm

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

Postby Mofi » Sat Jan 21, 2012 6:22 am

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.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

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

Postby snowstar » Sat Jan 21, 2012 4:30 pm

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!
snowstar
Newbie
 
Posts: 4
Joined: Fri Jan 20, 2012 7:27 pm


Return to UltraEdit for Mac General Discussion