[Wine] Scripting help please

John Hunter jhunter at kitesabbey.org.uk
Wed Nov 21 08:53:37 CST 2007

AxCrypt seems to give a problem passing target filenames and so I 
created a script to correct this.

I can open axx files and encrypt any file by right mouse-clicking on it 
in Ubuntu. I'm a bit new to this scripting and I wondered if anyone 
could get this script down to one line so that it could be put as a 
simple 'open with' line. At the moment it is a nautilus script and is 
listed under scripts when you right mouse-click a file.

Associating a file with AxCrypt passes "z:\home\myname\/home/my 
programs/myname/path to the target file.." to the program which fails

 The script removes the z:\home\myname\ from the front
and adds appropriate quotes to allow spaces in the names

The script is:
# remove the leading 'z:\home\myname\'
# 2 different scripts should be created, one with the -z parameter and 
one without.
# with the -z parameter it decrypts, without it, it encrypts
wine "C:\Program Files\AxCrypt\AxCrypt.exe" "$filename2"
#wine "C:\Program Files\AxCrypt\AxCrypt.exe" -z "$filename2"

This is put as two different scripts in 
/home/myname/.gnome2/nautilus-scripts (one for encrypting and one for 
decrypting) and they appear when you right mouseclick (under 'scripts'), 
after restarting X-windows.

Is it possible for a script expert to improve on this. At the moment the 
'myname' must be hand coded for each person. Is there a string 
substitution which would read back from the right to the first ':' and 
then one more character and remove everyting before that. If that were 
possible, then this would be a common script for everyone and AxCrypt 
could have a simple installer.

By the way, I copied the program files into a wine programs folder 
because the installer will not run - it insists that IE4 or above must 
be loaded. This must be an installer issue, not an AxCrypt issue.

More information about the wine-users mailing list