• 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
newbie question: define a variable?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

newbie question: define a variable?


  • Subject: newbie question: define a variable?
  • From: u7u <email@hidden>
  • Date: Wed, 26 Dec 2001 12:25:59 -0800

Hello list:
I am having trouble finding appleScript documentation on simple
activities like defining a variable. Any pointers to such documentation
would be appreciated.

The following gives an error "variable w not defined." I have tried
several different syntaxes, but I guess I'm not hitting the mark on
simply defining a variable.

any help greatly appreciated.


email@hidden



-- Application.applescript

on idle
variable(w)
if w = 0 then
setvariable(w = 1)
-- WINDOWSHADE FINDER WINDOWS
tell application "Finder"
activate
-- the desktop is erroneously listed as a window so don't process
repeat with i from 1 to (the count of windows) - 1
try
copy the bounds of window i to {a, b, c, d}
set the bounds of window i to {a, b, c, b + 1}
end try
end repeat
end tell

quit




else
setvariable(w = 0)

tell application "Finder"
activate
-- the desktop is erroneously listed as a window so don't process
repeat with i from 1 to (the count of windows) - 1
try
set zoomed of window i to true
end try
end repeat
end tell
quit
end if
end idle

on open
variable(w) -- or definevariable(w) or setvariable(w = 0)
end open


  • Prev by Date: Re: Getting keyboard status in X
  • Next by Date: Re: bug or feature?
  • Previous by thread: Re: Change resolution
  • Next by thread: Re: newbie question: define a variable?
  • Index(es):
    • Date
    • Thread