• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Writing Applescripts that run "quietly"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing Applescripts that run "quietly"?


  • Subject: Re: Writing Applescripts that run "quietly"?
  • From: Bill Briggs <email@hidden>
  • Date: Sat, 1 Mar 2003 08:42:25 -0400

At 12:07 PM +0000 01/03/03, Jason Alexander wrote:
Using applescript, is it possible to launch an application and have it perform some tasks without actually showing windows or dialog boxes?

The "normal" mode of operation for AppleScript is to not have dialog boxes open - it's not designed to "play" the UI like a player piano. Apple Events work behind the scenes to act on objects directly without invoking dialogs. In some applications you can do things with AppleScript that you can't even do through the UI.

As for windows, it depends. It's normal for most applications to have a window open, but it doesn't have to be frontmost, and it could be window shaded closed. Any application that doesn't have a window object (e.g., IE) is not very flexible in this department (you can't move or resize the window with a script), but for most applications you could just move the window to a pixel location that was in the virtual desktop space off of your screen or resize it to something very tiny, or windowshade it. Some applications (e.g., FrameMaker) will allow you to make a window completely invisible so all processing can be done in the background, but I've not noticed this facility in many applications.



I've got some scripts which automate an application and it's a little disconcerting to activate the script and watch the application appear, automatically open some dialog boxes, press buttons, and then close.

It sounds like the AppleScript you're running is using either Prefab Player (if it's OS 9) or System Events GUI scripting (if it's OS X). One only resorts to such things when the application you're scripting doesn't support some operation you need to perform through a "normal" scripting approach. It's a technique of last resort, but when nothing else is available, it can still be exceedingly useful.

- web
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Writing Applescripts that run "quietly"? (From: Jason Alexander <email@hidden>)

  • Prev by Date: Writing Applescripts that run "quietly"?
  • Next by Date: Re: get alias from ~/path
  • Previous by thread: Writing Applescripts that run "quietly"?
  • Next by thread: Re: get alias from ~/path
  • Index(es):
    • Date
    • Thread