Recent Posts
None | 0 sec ago
None | 0 sec ago
None | 5 sec ago
Bash | 9 sec ago
None | 27 sec ago
None | 45 sec ago
C++ | 1 min ago
Z80 Assembler | 1 min ago
None | 1 min ago
Java | 2 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By brandizzi on the 23rd of Nov 2009 02:26:38 AM Download | Raw | Embed | Report
  1. #!/bin/sh
  2. title=Conversor
  3. for file in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
  4. do
  5.         size=$(zenity --entry --title="$title" --text='Size:')
  6.         if [ -z "$size" ]
  7.         then
  8.                 return
  9.         fi
  10.         converted=$(zenity --entry --title="$title" --text='Output file:')
  11.         if [ -z "$converted" ]
  12.         then
  13.                 return
  14.         fi
  15.         convert -resize "$size" "$file" "$converted"
  16.         if [ "$?" == "0" ]
  17.         then
  18.                 zenity --info --title="$title" --text="$file converted to $converted!"
  19.         else
  20.                 zenity --error --title="$title" --text="The $file conversion to $converted failed!"
  21.         fi
  22. done
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: