I am just trying a create a folder where I have a text box, the user inputs the name of the folder in the text box and presses a button and a folder is created with the name in the text box. This was working at one point and now I can’t get it to work.
Can anyone help…
here is the code that I have
--
-- Textbox_testAppDelegate.applescript
-- Textbox_test
--
-- Created by Scott Freeman on 3/18/11.
-- Copyright 2011 The Worth Collection,Ltd. All rights reserved.
--
script Textbox_testAppDelegate
property parent : class "NSObject"
property textField : missing value
on cleartheObject_(sender)
set this_folder to (path to desktop folder)
set textFieldValue to (textField's |StringValue|()) as text
tell application "Finder"
if not (exists folder textFieldValue of this_folder) then
make new folder at this_folder with properties {name:textFieldValue}
end if
end tell
end cleartheObject_
on applicationWillFinishLaunching_(aNotification)
-- Insert code here to initialize your application before any files are opened
end applicationWillFinishLaunching_
on applicationShouldTerminate_(sender)
-- Insert code here to do any housekeeping before your application quits
return current application's NSTerminateNow
end applicationShouldTerminate_
end script