RE: Coercion from string to integer fails-UPDATE
RE: Coercion from string to integer fails-UPDATE
- Subject: RE: Coercion from string to integer fails-UPDATE
- From: Dan Doughtie <email@hidden>
- Date: Fri, 01 Jun 2007 09:29:15 -0400
- Thread-topic: Coercion from string to integer fails-UPDATE
I finally found the smoking gun. I think Emmanuel hit it. I did a character
count of the variable after I grabbed it. It should have been 5 characters
but the count was 10. I then went through each item and found every other
character was empty. So, I guess when the result displayed something that
looked like 5 characters it in fact contained 5 extra characters (nulls I
supposed) it was the nulls that was failing the coercion. I will try
Emmanuel suggestion to force it to read it as a UTF16 file. Actually I just
noticed in ScriptDebugger that the UTF XVI icon is next to the result.
The other question was about reading the prefs file. The script basically
asks which folder to watch and when to act. It has a idle time so it checks
every 10 minutes. But when it hits the correct time it will then FTP
everything in the folder.
The script automatically creates some working folders like DONE and ERROR.
In enclosing folder I was going to include a text file that would tell the
script APP what folder to watch and at what time. I had it set so that if
the text file was missing to prompt for the info, then write it to the file
then run. If the app is stopped and the prefs file is present then it just
reads the path and the time from the file.
That way if someone had to change the watch folder they simply toss the
prefs and it would ask what the new prefs are.
(After ID'ing the coercion problem with the number I realized the nice
clean string for the path wasn't so clean.)
Dan
--
------ End of Forwarded Message
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden