0

I'm trying to pull a prank on a friend. I have a shell script that continuously cats a C source code file so make it look like the terminal is "hacking" something. The next thing I would like to do is have the script make the terminal full screen.

Is there anyway in the default terminal app to make a window full screen based off of a PID or some other identifier?

2

Use applescript to send the F shortcut:

tell application "Terminal"
    activate
    tell application "System Events" to keystroke "F" using {command down, control down}
end tell

You can use the osascript command to execute applescripts.

  • Thanks, I completely forgot about sending fake key strokes. Now off to do something funny. Mwahahah – TheBat Dec 1 '14 at 22:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .