Sponsored Content
Full Discussion: AppleScript to Bash
Operating Systems OS X (Apple) AppleScript to Bash Post 302404117 by tlarkin on Monday 15th of March 2010 03:19:14 PM
Old 03-15-2010
Yeah, like here is an example of a post image script I am using to force an admin log in after image, since some of the stuff I install post imaging requires that a user be logged in.

Code:
/usr/bin/osascript <<EndOfMyScript
  tell application "System Events"
      keystroke "$admin1_short"
      keystroke return
      delay 3.0
      keystroke "$admin1_passwd"
      delay 3.0
      keystroke tab
      keystroke return
      keystroke return
  end tell
EndOfMyScript

The $admin1 variables are the variables I hard code at the beginning of my shell scripts to create the local administration accounts. So, when I update the script to change passwords or change accounts, it will still use whatever I hard code at the top.

This is really cool because now after I image a Mac, the post image script automates everything for me and I can sit back and relax and let it do it's job for me. The alternative is manually logging into 6,000 Macbooks, no thanks.Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

BASH or applescript keygen

Please help me to make this script to create a key based on these parameters: the output of $USER is smithm for mike smith the output of id smithm is uid=1042(smithm) gid=20(staff) groups=20(staff), 1025(group1), 1057(group2), 1028(group5), 1038(group3), 1037(group4) I need a script that... (0 Replies)
Discussion started by: glev2005
0 Replies

2. Shell Programming and Scripting

Terminal vs. Applescript

I am running Mac OS X (10.5). I run the following script successfully in terminal in order to split an mp3 file into 3 smaller mp3 files... split -b 8667k -a1 Monday.mp3 Levin-Hour_; ls Lev* | sed "s/.*/mv '&' '&.mp3'/g" | zsh However, when I run a similar script within the Applescript editor... (2 Replies)
Discussion started by: tgaleza
2 Replies

3. Shell Programming and Scripting

Need help writing an Applescript to launch a specific Terminal Command...

I developed a script in Lingon (which is an automated script editor developed for OS X) that is used to automatically restart programs only if they crash. The script itself does just that, but I only want it to load if I'm going to use the specific application that it's designed to protect. In... (3 Replies)
Discussion started by: JFraser1
3 Replies

4. OS X (Apple)

Need help writing an Applescript to launch a specific Terminal Command...

I developed a script in Lingon (which is an automated script editor developed for OS X) that is used to automatically restart programs only if they crash. The script itself does just that, but I only want it to load if I'm going to use the specific application that it's designed to protect. In the... (2 Replies)
Discussion started by: JFraser1
2 Replies

5. Shell Programming and Scripting

Scripting in AppleScript

What I want my script to do is to run a command in Terminal and close that same Terminal window when the process is complete. Of course I could ad a delay of 6 seconds to complete the process, but it may not be enough every time. To simplify my question, this is what I want to achieve.... (0 Replies)
Discussion started by: ShadowofLight
0 Replies

6. OS X (Apple)

[Solved] Running shell code in AppleScript without Terminal

What I want my script to do is to run a command in Terminal and close that same Terminal window when the process is complete. Of course I could ad a delay of 6 seconds to complete the process, but it may not be enough every time. To simplify my question, this is what I want to achieve.... (9 Replies)
Discussion started by: ShadowofLight
9 Replies

7. Shell Programming and Scripting

applescript & grep - sed command

I'm new using Unix commands in applescript. The following script you choose different folders with PDfs, get file count of PDfs on chosen folders, & write the results in text file. set target_folder to choose folder with prompt "Choose target folders containing only PDFs to count files" with... (0 Replies)
Discussion started by: nellbern
0 Replies

8. Shell Programming and Scripting

SED command works in terminal, but not Applescript

The following command works perfectly in Terminal, but not in Applescript. (Returns "unknown token" error for square brackets.) (new to site. sorry.) I have an Applescript that is designed to find and remove any square-bracketed text, including the square brackets. I ran the following code from... (1 Reply)
Discussion started by: Phillip Acosta
1 Replies

9. OS X (Apple)

Applescript application call problem...

Hi all... I am trying to create a shell project purely for this Macbook Pro. I do NOT want to use SOX as the sampling _source_ but Quicktime instead, the idea being that NO third party installs will be needed. The code below works fine except the commented out Applescript line does not do... (2 Replies)
Discussion started by: wisecracker
2 Replies

10. Post Here to Contact Site Administrators and Moderators

Delete or move post to applescript area

i posted an applescript question in the wrong area, trying frantically to delete or move before I get in trouble for posting question in wrong area. it is the one about opening webpages and searching text with applescript, thanks (1 Reply)
Discussion started by: ilovedoritos
1 Replies
TIFF2FAX(8C)															      TIFF2FAX(8C)

NAME
tiff2fax - convert TIFF for facsimile transmission by HylaFAX SYNOPSIS
/var/spool/fax/bin/tiff2fax [ options ] file DESCRIPTION
bin/tiff2fax takes TIFF input and generates a TIFF Class F image file suitable for facsimile transmission. It is usually invoked by the HylaFAX scheduler process, faxq(8C). The default implementation uses the tiffcheck(8C) program and tools from the freely available TIFF software distribution to implement the conversion operations. This script can modify outgoing facsimile, such as watermarking, To do this create a shell script etc/FaxModify in the spooling area that alters the document. OPTIONS
The following operations are recognized: -1 Write Group 3 1D-encoded data to the output file. -2 Write Group 3 2D-encoded data to the output file. -3 Write Group 4 MMR-encoded data to the output file. -m pages Set the maximum number of pages that are permitted in the output file. If more pages are present in the input document then abort processing. -o file Write output to the specified file instead of the default foo.tif filename. -w width Set the output page width, in pixels. By default, pages are 1728 pixels wide. -l length Set the output page length in millimeters. By default, pages are 297 millimeters long. -r vres Set the vertical resolution, in lines/inch, at which to image the POSTSCRIPT. FILES
/usr/sbin/tiffcheck TIFF file conversion examiner /var/spool/fax/bin/ps2fax POSTSCRIPT RIP for doing complicated conversions /usr/bin/tiffcp for converting compression schemes /usr/bin/tiff2ps for colorspace and/or image size conversions BUGS
Conversions that require re-imaging and resizing may result in images that are poorly placed on the page. There is no way to control how images are treated when they are resized; e.g. the original aspect ratio is not always maintained. SEE ALSO
sendfax(1), faxq(8C), hylafax-server(5F) May 12, 1996 TIFF2FAX(8C)
All times are GMT -4. The time now is 04:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy