• 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
non-existant app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

non-existant app


  • Subject: non-existant app
  • From: Robert Poland <email@hidden>
  • Date: Sun, 31 Jan 2010 14:36:44 -0700

Scripters,

On this shortened script, if the machine does not have Dreamweaver is there a better way to avoid the script hunting for a non-existant app?


on run
main()
beep
end run

on main()
--  newL - left border,  newT - top border
set newL to 20
set newT to 22
set wd to 800
set ht to 1000
tell (do shell script "/usr/sbin/system_profiler SPDisplaysDataType | grep Resolution") to set {newR, newB} to {word 2 as number, word 4 as number} -- get screen size for monitor


set x to (info for (path to frontmost application))'s short name


if x = "" then
beep
return
end if


if x contains "Dreamweaver" then

try

tell application "Dreamweaver"
-- window 1- CSS & Files
set newL to 1080
set bounds of window 1 to {newL, newT, newR, newB}
end tell
end try
beep
return
end if


end main


Bob Poland - Fort Collins, CO



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: non-existant app
      • From: Yvan KOENIG <email@hidden>
    • Re: non-existant app
      • From: Shane Stanley <email@hidden>
    • Re: non-existant app
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: looking for busy work?
  • Next by Date: Re: non-existant app
  • Previous by thread: Re: looking for busy work?
  • Next by thread: Re: non-existant app
  • Index(es):
    • Date
    • Thread