Refactored deprecated save and open panel code in ScriptExec, int-->NSInteger