• 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: looking for busy work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: looking for busy work?


  • Subject: Re: looking for busy work?
  • From: Yvan KOENIG <email@hidden>
  • Date: Sun, 31 Jan 2010 21:33:20 +0100


Le 31 janv. 2010 à 19:06, Robert Poland a écrit :

Thanks Yvan,

I have questions about your two cautions.

(1) What difference does this make?

(2) If Dreamweaver does not have a front window, you should never get into the If statement??? So is that really a problem?

If the reader doesn't own Smile, I assume that opening the script in Script Editor may cause some oddity because Smile offer features unavailable in the SCript Editor.

When I opened the script, the Editor asked me to teach it where is the DreamWer app.
I had no way to respond : look on Robert Poland's HardDisk.


As to the multiple end tell/tell lines that is called growing pains. Thanks for pointing that to me. Removing them sped things up. That was one of the things I was looking for.

After posting my late message, I realized that not only you may strip some tell application "Finder" instructions but you may also remove several tell wdw ones.
Here is a stripped version
tell application "Finder"
set wdw to Finder window 1
select wdw -- in case the window was not selected
-- resize window so changes will hold - first
tell wdw -- get original size (bounds)
set {leftSide, topSide, rightSide, bottomSide} to bounds
set bottomSide to bottomSide + 10 -- add 10 px to bottom
set bounds to {leftSide, topSide, rightSide, bottomSide}
--end tell


--   then Zoom 
--tell application "Finder" to tell wdw
set z to zoomed
if not z then
tell application "System Events" to tell (first process whose frontmost is true) to try
click button 2 of window 1
end try
end if
--end tell


--tell application "Finder" to tell wdw
set {leftSide, topSide, rightSide, bottomSide} to bounds -- get original size (bounds)
set xSize to rightSide - leftSide -- width of window
set bottomSide to bottomSide + 10 -- add 10 px to bottom
--end tell


--tell wdw
if (toolbar visible) then
set toolbar visible to false
set toolbarWasVisible to true
end if
end tell -- wdw

-- home scroll bar(s)
tell application "System Events" to tell application process "Finder"
--tell application "Finder" to activate
-- tell application "System Events" to key code 115
tell scroll area 1 of splitter group 1 of window 1 to set value of every scroll bar to 0
end tell -- System Events …
--end tell


tell application "System Events"
set {rightLimit, bottomLimit} to size of scroll area 1 in process "Finder"
if rightLimit > 1680 then set rightLimit to 1680 -- don't do multiple monitors
set rightLimit to rightLimit - 150 -- leave room for desktop icons
end tell -- System Events …
end tell -- Finder

Yvan KOENIG (VALLAURIS, France) dimanche 31 janvier 2010 21:33:03



 _______________________________________________
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

References: 
 >looking for busy work? (From: Robert Poland <email@hidden>)
 >Re: looking for busy work? (From: Yvan KOENIG <email@hidden>)
 >Re: looking for busy work? (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: looking for busy work?
  • Next by Date: non-existant app
  • Previous by thread: Re: looking for busy work?
  • Next by thread: non-existant app
  • Index(es):
    • Date
    • Thread