OS X - Operating System General OS operation information and support

OS 10.4 - Create a .bat type file for OS X


Post Reply New Thread Subscribe

 
Thread Tools
dbUSMC

 
Member Since: Sep 10, 2007
Posts: 1
dbUSMC is on a distinguished road

dbUSMC is offline
Hi all, I'm new to this forum, so please forgive any overlooked formalities or traditions.

I am trying to find a way to create a .bat type of file for mac OS X. For those of you who dont know; a .bat file is file for pc's. It is a file that executes two or more commands when opened. For instance, one might want to clear their cache as they open a web broweser. You would create a .bat file (which is created in a text editor and executes dos commands) this file would clear your cache and then open your browser all in the background. You could then replace the default .bat icon with that of your favorite web browser and no one would be the wiser.

Specifically what I am trying to achieve is as follows; I would like to have a sound played when I open an application. That is, a specific sound for specific applications. If anyone knows of another way to achieve this, I am all ears.

Thanks for your time.
QUOTE Thanks
rman
Inactive Staff
 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,591
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
You should be able to create an AppleScript to do what you want.

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks
mac57

 
mac57's Avatar
 
Member Since: Apr 29, 2006
Location: St. Somewhere
Posts: 4,547
mac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant future
Mac Specs: PowerMac G5 Quad, 2.5 GHz, 4 Core, 120 GB SSD, 500 GB HDD

mac57 is offline
rman, I am guessing you are suggesting writing an Applescript that plays the sound and then launches the app? dbUSMC would then launch the Applescript, not the original app, to get the sound/app behavior he is looking for?

I am no Applescript expert (or even novice for that matter). How does one play a sound file via an Applescript command?

dbUSMC, I am guessing you are coming to Mac from a KDE based Linux environment? I *love* the KDE sound splashes on various window manager events. It is the one thing I haven't been able to reproduce from Linux on my Mac. Good luck on this one.

My Macs: PowerMac G5 Quad, 2.5 GHz, 4 Core, Mac Pro, 3.2 GHz 8 Core, Power Macintosh 7500/100
My iStuff: 32 GB iPhone 4, 30 GB iPod Video, 16 GB iPod Touch
My OS': Mac OS X Tiger, Mac OS X Snow Leopard, Mac OS X Leopard, Mac OS 8.6, openSUSE 10.3, Win XP
I was on the Mac-Forums honor roll for September 2007
QUOTE Thanks
pjhutch

 
Member Since: Aug 04, 2007
Posts: 250
pjhutch has a little shameless behaviour in the past

pjhutch is offline
Try the 'Automator' tool to develop AppleScript scripts which uses a GUI where you specify the application, action and objects to use.
QUOTE Thanks

Post Reply New Thread Subscribe


« Security: Is Mac OS X 10.4 that secure? | leopard release »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Troubles with .html!!! (screwed up file type associations) Mainyehc OS X - Operating System 0 02-22-2004 09:49 AM
File type code from the command line smook1980 OS X - Development and Darwin 1 02-17-2004 11:03 AM
Changing file type of bin and hqx from PC to Mac scotttaylor75 Running Windows (or anything else) on your Mac 1 12-22-2003 01:55 PM
Mac OS X 10.2.8 released Murlyn OS X - Operating System 34 10-11-2003 01:27 AM
Finding disk usage by file type gatorparrots OS X - Development and Darwin 1 12-23-2002 06:34 PM

All times are GMT -4. The time now is 09:30 AM.

Powered by vBulletin
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?