newbie question: define a variable?
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