Applescript command line (quick and dirty)

Here’s one that is very useful to me- A quick-and-dirty two liner that will let you run any AS command that will fit on one line:

set myCmd to text returned of (display dialog "Enter Command" default answer "")
run script myCmd

I didn’t trap for errors or anything, so if the text you enter is flawed, it won’t work, but if you want to do something fast without loading Script Editor, this works beautifully.