Re: Propmpting user to enter Variables
Re: Propmpting user to enter Variables
- Subject: Re: Propmpting user to enter Variables
- From: "francois.houle" <email@hidden>
- Date: Sun, 15 May 2005 22:43:50 -0400
I did know that by default there is no StartupItems in Panther but there is
not one by default in the User's Library folder in Tiger (at least when I do
install it)... Bu that part I have solved... I've setup nicely the script so
that it creates the folder if necessary and also the lops to re-prompt the
user if they enter a blank.. That works real nice... I ended up using
Matthew Smith's suggestion, although I had to change the "repeat until
variable_1 "" " for "repeat until variable ret_value "" "....
My problem now is with the end of the same script... Here is the part that's
causing my headache:
set user_info to "user:pass@1.1.1.1/HardDrive"
set scripts_folder to (path to desktop folder from user domain) as string
set file_name to "Testfile"
----------------
tell application "Script Editor" to tell (make new document)
set its text to "tell application \"Finder\"
try
mount volume \"afp://" & user_info & "\"
on error
display dialog \"There was an error mounting the shared drive.\"
buttons {\"Cancel\"} default button 1
end try
end tell"
compile it
save as "application" in ((path to desktop folder from user domain) &
file_name) run only "true"
end tell
----------------
What happens if I run this script I get an NSInternalScript Error... But I
can't find whats wrong though... Can some one help ?
On 5/13/05 8:48 PM, "David Marshall" <email@hidden> wrote:
> On Fri, 13 May 2005, Michelle Steiner wrote:
>
>> Have you tested the above code in Panther? Your original message had
>> the name of the folder as one word instead of two words.
>>
>> If it doesn't work in Panther, here is code that should work in both
>> Panther and Tiger:
>>
>> (path to library folder from user domain as text) & "startupitems" as
>> alias
>
> On my machine (OS X 10.3.8), though there is (well...was) no
> StartupItems folder in ~/Library/, the script
>
> set thisthat to path to startup items folder from user domain
> tell application "Finder" to make new Finder window to thisthat
>
> not only created one; it also gave the folder the single-word name
> "StartupItems."
>
> When I trashed the folder and ran the script a second time, however, I
> got the "File some object wasn't found" AppleScript error with the
> first line highlighted. Quitting and relaunching Script Editor allowed
> me to run the script and create the folder exactly once again.
>
> The Event Log shows "alias
> "Omni_Disk:Users:dkmarsh:Library:StartupItems:" as the result of the
> "path to startup items from user domain" command; odd, since in other
> instances, as expected, I can't _create_ a folder by coercing the path
> to an alias.
>
> - - - - -
>
> Dave
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> ll.ca
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden