Re: First time script ... help for debugging
Re: First time script ... help for debugging
- Subject: Re: First time script ... help for debugging
- From: Emmanuel <email@hidden>
- Date: Sat, 17 Jan 2004 16:34:58 +0100
At 2:59 PM +0100 17/01/04, SVEN AERTS wrote:
>
What's wrong with this ?
*You* are supposed to tell us first what is wrong, for instance "when I run the script from Script Editor no file is renamed, yet I don't get an error message", "... I get the following error message: blah", " ... only part of the files are renamed" etc.
Maybe your script does not compile: then the Script Editor will highlight some section of the code, tell us where.
>
Display dialog
>
"Welcome, this script replaces the last 4 characters of a filename with .jpg
>
if the filename has no .jpg at the end. What folder are the files in ?"
>
choose folder with promt
There is a typo here.
>
Select Folder
This should be quoted: "Select Folder"
>
if name ends with ".jpg"
>
then goto next name
>
else
>
replace name -4 to -1 by ".jpg"
You don't look familiar with a "repeat" structure, and you don't look familiar with the AppleScript's operators on strings, that you need.
Maybe it would help you to check a few sections in the official AppleScript Language Guide:
<
http://developer.apple.com/techpubs/macosx/Carbon/interapplicationcomm/AppleScript/AppleScriptLangGuide/index.html>
(A French version is also available)
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.