#!/bin/bash

#--------------------------------------------------------
#-- assure to be in the right folder
 
if [ "`which getdir`" = "" ];then
  xmessage -center "please install the \"getdir\" dotpup first!"
  exit 0
fi
BASE=`getdir $0` 
cd $BASE
BASE=`pwd`
cd $BASE

#--------------------------------------------------------
#-- run filechooser, get all selected files in a variable
#-- 2>/dev/null will suppress Gtk-warnings

#-- wrong arguments, shows error

thefiles=`./multifilechooser.pb 2>/dev/null`

echo "$thefiles"


# -- open a file
A1="Open a File"
A2="/usr/share/audio"
A3="*.au"
A4="1"
A5="0"
thefiles=`./multifilechooser.pb "$A1" "$A2" "$A3" "$A4" "$A5" 2>/dev/null`

echo "$thefiles"


A1="Open Files"
A2="/usr/share/audio"
A3="*.au"
A4="1"
A5="1"
thefiles=`./multifilechooser.pb "$A1" "$A2" "$A3" "$A4" "$A5" 2>/dev/null`

echo "$thefiles"


A1="Save File as"
A2="/usr/share/audio"
A3="*.au"
A4="2"
A5="0"
thefiles=`./multifilechooser.pb "$A1" "$A2" "$A3" "$A4" "$A5" 2>/dev/null`

echo "$thefiles"

A1="Select a Folder"
A2="/usr/share/audio"
A3="*.au"
A4="3"
A5="0"
thefiles=`./multifilechooser.pb "$A1" "$A2" "$A3" "$A4" "$A5" 2>/dev/null`

echo "$thefiles"


A1="Create a Folder"
A2="/usr/share/audio"
A3="*.au"
A4="4"
A5="0"
thefiles=`./multifilechooser.pb "$A1" "$A2" "$A3" "$A4" "$A5" 2>/dev/null`

echo "$thefiles"
