Thursday, December 14, 2017

#1 2000-01-24 03:30:09 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Hide Startup Items

Though a veteran Mac user, I've never tried to write apple scripts that didn't involve simply recording my actions. Here's something VERY simple that I'd like to do but can't figure out how to make it work...
I have a couple of items in my startup folder (one is my DSL connection app, the other a universal URL app that gives me menubar access) that I want to hide more or less immediately after they launch. But since I can't record menu selections, I've been trying to script it like a pro-- to no avail. I'm thinking it would be something like:

Applescript:

tell application "MacPoET"
hide
end tell

Then I'd duplicate that for the other one. But what I get instead of execution is an error message saying the variable hide is not defined.
Assuming this action is actually scriptable (any help greatly appreciated!) and I just want to drop an alias of the script in my startup items folder, do I also need to build a delay into the script to allow MacPoET to fully launch? Would I be better off mapping the script to an Fkey? Advice, answers?
If this is too silly and basic a problem to warrant bbs posting, please feel free to contact me directly.
Thanks much!


One mans trash is another mans treasure


Filed under: MacPoET

Offline

 

#2 2000-01-24 04:01:07 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Re: Hide Startup Items

You can try...

Applescript:

tell application "MacPoET"
launch without visibles
end tell

I'm not sure if it will for you or not, but it's worth a shot, Good Luck
Greg


One mans trash is another mans treasure


Filed under: MacPoET

Offline

 

#3 2000-01-24 05:34:38 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Re: Hide Startup Items

Well, the window did come up as visible (darn!), but the connect/disconnect button was dimmed as inactive and wouldn't respond.
I had thought from reading a few script bits from this site that "hide" was an action I could specify. Is this untrue? Or is it part of some scripting addition I don't have?
Any thoughts?
The issue for me is that I'll have two windows open on the desktop that I don't really want clogging up the space, but if I close them I lose menu bar access to their contents. Hiding seems to be the solution (and it works, getting rid of the windows but leaving the menus) but I hoped to automate that hiding.


One mans trash is another mans treasure

Offline

 

#4 2000-01-25 02:13:34 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Re: Hide Startup Items

Hi,
try this:

Applescript:

tell application "Finder"
set the visible of process "MacPoET" to false
end tell

cya
Roberto


One mans trash is another mans treasure


Filed under: Finder

Offline

 

#5 2000-01-25 12:39:34 pm

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Re: Hide Startup Items

That does it. All I needed to do was remove the word "the" and it worked like a charm.
Thanks everybody!


One mans trash is another mans treasure

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)