PDA

View Full Version : Icon/shortcut to execute a command




jakaj
Oct 21, 2006, 07:17 AM
Hi,

is it possible to create an icon that would execute a bash script or another command?

I guess that should be possible on OS X too, since it's possible on every other UNIX based system. Heck, you can also do it in windows.

One other small thing:
Is it possible to make the dashboard pre-load the widgets. As it currently is, the first time I open the dashboard, widgets start loading, and that takes quite some time...

Jaka



Hobofuzz
Oct 21, 2006, 02:32 PM
Hi,

is it possible to create an icon that would execute a bash script or another command?

I guess that should be possible on OS X too, since it's possible on every other UNIX based system. Heck, you can also do it in windows.

One other small thing:
Is it possible to make the dashboard pre-load the widgets. As it currently is, the first time I open the dashboard, widgets start loading, and that takes quite some time...

Jaka

If you know bash scripting, you can do it simply by writing a plain file with text in it and executing it from the terminal like you would any other program.

jakaj
Oct 21, 2006, 03:31 PM
If you know bash scripting, you can do it simply by writing a plain file with text in it and executing it from the terminal like you would any other program.
Yah... I know.

I'm asking if there's a possibility to launch it _WITHOUT_ opening a terminal first.

In Windows/Linux/almost every other OS, you can do something like 'create a shortcut' and then set which command is to be executed (along with working directory, environment vars, etc...).

beatsme
Oct 21, 2006, 04:14 PM
Hi,

is it possible to create an icon that would execute a bash script or another command?

Jaka

AppleScript will do it. What exactly are you wanting to do?

plinden
Oct 21, 2006, 04:45 PM
Save your script as .command and it's double clickable.

jakaj
Oct 22, 2006, 05:08 AM
Save your script as .command and it's double clickable.
Excellent. Thank you!