Execute a applescript from within a applescript

Hey guys how would one go about executing a applescript from within a applescript?

hi

One method is to use the run script command


set ftpScript to "disk:Users:you:Library:Scripts:Photodata User Scripts:Database scripts:FTP upload.app"
display dialog "Images processed. Do You Want to FTP now" buttons {"Yes", "No"} default button 1
if the button returned of the result is "Yes" then
	run script pathtoftp
end if


As you can see you can store scripts in the scripts folder in your library

Model: 2 G5’s 1 intel iMac, 2imacs, 1.5 powerbook, G4 a G3Blue and white a 8200…
AppleScript: 2.1.1
Browser: Safari 312
Operating System: Mac OS X (10.4)

Thanks so i just use run script ? also what is the best way i make a GUI so a user can select the script they want to run

Just reference the script


set useScript to choose file with prompt "Choose script to run"

run script useScript



Model: 2 G5’s 1 intel iMac, 2imacs, 1.5 powerbook, G4 a G3Blue and white a 8200…
AppleScript: 2.1.1
Browser: Safari 312
Operating System: Mac OS X (10.4)

Hey that works great never knew of the file prompt thingo, is there anyway to using bindings to make it save in a preference file as well

anyone know how to use carbon bindings to bind it to a preference

I think you mean Cocoa bindings. Whatever you’re talking about, you probably need to start a different thread.