ihearthans

Skip to end of metadata
Go to start of metadata

Statement

"Why is there a program that states that you are romantically involved with a dead man?"

"ihearthans" is a new media art reinterpretation of "Collage with Squares Arranged According to the Laws of Chance", a piece by the Dada artist Jean Arp in 1916.

In his original piece, Jean Arp (or Hans Arp, hence the project title) ripped small scraps of paper and dropped them onto another piece of paper. He then glued these randomly placed scraps down after adjusting their positions slightly.

The overall theme of the piece is randomness, i.e. something created without the premeditated intervention of the artist. This idea of escaping logic allows for the artist to develop and create in new ways (even without his own input factored into his work).

This total escape from human creation is impossible: Jean Arp chose the size of the paper to drop, the color of the paper to drop, where atop the larger piece of paper to drop the smaller pieces, and the number of pieces of paper to drop.

This is where "ihearthans" comes into play. Computer programming languages have the ability to produce random numbers via complex algorithms, thus the ability to escape the intervention of the human touch. "ihearthans" is an Applescript that places shells of the program "Terminal" on the Mac OS X GUI with completely random X and Y window coordinates, column and row numbers, and background colors. Even the number of shell windows is a random choice by the computer- not the artist.

"ihearthans" fails in a few instances to complete Jean Arp's idea of total lack of artistic intervention. For aesthetic reasons, the program automatically removes shell windows that are placed off screen. Because of the limitations of Applescript, hexadecimal color generations cannot be used in conjunction with the program "Terminal," thus a predefined list of color string names is used. The user also sets limits on the number of terminal windows possible so that the process does not take days or years to complete. The biggest failure, however, is that the random number generator call the Applescript language uses is not a true random number (see Pseudorandom Number Generator).

"ihearthans" also has the ability to take a snapshot of your artwork and upload it to a server via FTP.

Download and Notes

Download ihearthans.tar.gz!

Included in the link- the application, the Xcode build, and the ICON image.

System Requirements:
Mac OS X
FTP ability (if you want to upload your pictures)

Bugs:
The script runs the "top" command in each new "Terminal" window it opens. After a certain set of windows open, the "top" command ceases to run.

The program becomes unstable around the 30 to 35 max number of windows. Keep it at 20 so that it runs smoothly.

Depending on your upload speed and the download ability of your server, the "Terminal" shells may remain open while your snapshot is being uploaded (even if you have the "Close Windows Auto." feature enabled).

Notes:
The application was built using Apple Script Studio and Cocoa in the Xcode and Interface Builder environment.

The icon was made using GIMP and Icon Composer.

In all respcts, this is an Applescript (with a lot of terminal code) with a basic Cocoa GUI frontend.

Future Features: The ability to upload files via SFTP. Applescript lacks the ability to properly ineterface with shell scripts (thus the reason "curl" is used to upload images); however, with a bit of creative coding, this could be bypassed.

Screenshots


 
GUI interface for "ihearthans" (via Cocoa/Applescript Studio Framework).
 
Uploaded art pictures on server via "ihearthans."

Sample Pictures







 

Applescript Code

(the Applescript GUI is sloppy but it works) tell application "Terminal" activate end tell tell application "System Events" tell process "Terminal" tell menu bar 1 tell menu bar item "File" tell menu "File" click menu item "Close" end tell end tell end tell end tell end tell funtion to generate random colors, stringname does not matter on getcolor(stringname) Get a random color set colorlist to every word of "black blue brown cyan green magenta orange purple red yellow white" set numofcolors to count colorlist set rn to (random number (numofcolors)) repeat until rn is not equal to 0 set rn to (random number (numofcolors)) end repeat set rancolor to item rn of colorlist set stringname to rancolor end getcolor on clicked theObject tell window "ihearthans" DEFINE UNIVERSAL VARIABLES HERE set usermaxnumwindows to (contents of text field "usermaxnumwindows") as integer Get Screen Resolutions- set xres to (contents of text field "userxres") as integer set yres to (contents of text field "useryres") as integer set servername to (contents of text field "userservername") as text set pathto to (contents of text field "userpathto") as text set username to (contents of text field "userusername") as text set upassword to (contents of text field "userpassword") as text Checks if user wants to upload image set uploadviaftp to current row of matrix "ftpchoice" if uploadviaftp is equal to 1 then set clientchoice to 1 else if uploadviaftp is equal to 2 then set clientchoice to 2 end if Checks if user wants to windows open afterward set killapp to current row of matrix "killapp" if killapp is equal to 1 then set killappnow to 1 else if killapp is equal to 2 then set killappnow to 2 end if end tell pixel size of each col. in terminal set pxcol to 6.1 pixel size for sidebar width in terminal set pxsidebar to 15 pixel size of each row in terminal set pxrow to 15 pixel size for top help bar in terminal set pxhelpbar to 20 number of windows to open set rn to (random number (usermaxnumwindows)) set numberofwindows to rn repeat until numberofwindows > 0 set rn to (random number (usermaxnumwindows)) set numberofwindows to rn end repeat Kill that pesky blank terminal again tell application "Terminal" activate end tell tell application "System Events" tell process "Terminal" tell menu bar 1 tell menu bar item "File" tell menu "File" click menu item "Close" end tell end tell end tell end tell end tell GIANT LOOP OF PROGRAM STARTS HERE to create a new window, windownumber is in the Terminal tell function at the end windownumber means nothing repeat with windownumber from 1 to numberofwindows Set random numbers appropriate for the page set rcol to (xres - pxsidebar) / pxcol set rrow to (yres - pxhelpbar) / pxrow Generate random columns set rn to (random number (rcol)) set c to rn Generate random x position set rn to (random number (xres)) set x to rn X Axis from Left check to see if the window is off the screen to the right repeat until x + (c * pxcol + pxsidebar) < xres Generate random columns set rn to (random number (rcol)) set c to rn Generate random x position set rn to (random number (xres)) set x to rn X Axis from Left end repeat Generate random rows set rn to (random number (rrow)) set r to rn Generate random y position set rn to (random number (yres)) set y to rn Y Axis from Top check to see if the window is off the screen to the bottom repeat until y + (r * pxrow + pxhelpbar) < yres Generate random rows set rn to (random number (rrow)) set r to rn Generate random y position set rn to (random number (yres)) set y to rn Y Axis from Top end repeat use function to get colors set bgcolor to getcolor(color) set ccolor to getcolor(color) set ncolor to getcolor(color) set bcolor to getcolor(color) Open Terminal App For One Window tell application "Terminal" activate Create window the above parameters do script with command "top" tell window 1 set background color to bgcolor set cursor color to ccolor set normal text color to ncolor set bold text color to bcolor set title displays window size to false set title displays custom title to false set number of columns to c set number of rows to r set position to x, yend tell end tell end repeat Checks to see if user wants the picture uploaded via FTP if clientchoice is equal to 1 then find scaled screen size set sxres to (xres / 2) set syres to (yres / 2) capture screen, shrink image, convert it to png, delete first screen capture do shell script "screencapture -S ~/image1 ; sips resampleWidth " & sxres & " resampleHeight " & syres & " ~/image1; sips -s format png ~/image1 out ~/image1.png; rm ~/image1" change the file name to the current date and time set timenow to do shell script "date +%Y%m%d%H%M%S" do shell script "mv ~/image1.png ~/" & quoted form of timenow & ".png" define ftp sites, upload the image to the FTP server via curl set filename to timenow & ".png" do shell script "curl -ftp-ssl -T ~/" & quoted form of filename & " url ftp://" & quoted form of username & ":" & quoted form of upassword & "@" & quoted form of servername & quoted form of pathto do shell script "cd ~/; ftp -n " & quoted form of servername & "; quote USER " & quoted form of username & ";quote PASS " & quoted form of upassword & ";cd " & quoted form of pathto & " ; put " & quoted form of filename & "; quit" delete the local image do shell script "rm ~/" & quoted form of filename end if Choice to kill Terminal if killappnow is equal to 1 then give the Terminal a nice death do shell script "ps -acxu | grep Terminal | grep -v Finder | grep -v loginWindow | awk '
print $2 ' | xargs kill -15" end if end clicked on action theObject (Add your script here.) end action Created by Sebastian Gallese.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.