Automated setup file uploaded
Tariel Gogoberidze
tariel at mac.com
Tue Jul 17 20:58:57 CDT 2007
On Mon, 16 Jul 2007 16:12:41 -0500, "J. Landman Gay" wrote:
>>
>> As for the rest of my post, you are right, it's better to keep such
>> modifications personal and handle them in either plugIn or front
>> Script
>> or the script of stack home.
>
> Well, I did kind of like your idea about saving the positions of the
> various IDE windows. I am pretty sure no one would object to that.
>
> Jacqueline Landman Gay | jacque at hyperactivesw.com
Well, the question is where to save this information. The least
intrusive method would be probably to external file?
In this case something like script below may probably do it...
on RememberIDEstacksPositions
put the openStacks into tOpenStacksList
put "mchome.mc/mctools.mc/mchelp.mc" into tMCIDEstacks
set the itemDel to "/"
repeat for each line L in tOpenStacksList
if last item of the effective filename of stack L is among the
items of tMCIDEstacks then
put L &","& the loc of stack L & cr after tPositions
end if
end repeat
delete last char of tPositions
put item 1 to -2 of the effective fileName of stack "home" &
"/IDEstackPositions.txt" into FL
put tPositions into url ("file:"&FL)
end RememberIDEstacksPositions
another question is what should be the trigger for reading from file
which would execute something like this...
on RestoreIDEstackPositions
put item 1 to -2 of the effective fileName of stack "home" &
"/IDEstackPositions.txt" into FL
if there is a file FL then
put url ("file:"&FL) into tPositions
put the windowBoundingRect into tMonitorRect
put the short name of the topstack into tStack -- ?
repeat for each line L in tPositions
if item 1 of L = tStack then
set the loc of stack tStack to (item 2 to 3 of L)
-- if user changed resolution or monitor
if (the left of stack tStack) +10 > item 3 of tMonitorRect then
set the left of stack tStack to the left of stack tStack -
100 -- to make stack accessible
end if
if the top of stack tStack > item 4 of tMonitorRect then
set the top of stack tStack to item 4 of tMonitorRect - 100
end if
end if
end repeat
end if
end RestoreIDEstackPositions
So, in case read / write IDE stack positions to external file is
acceptable idea, any thoughts about ..
1) what should be the trigger to write IDE stack positions to file?
shutdownRequest in Home stack? )
2) What should be the trigger to read external file ? (preOpenStack in
"McTools.mc" and "home" stacks?
Or may be somebody has better idea where to save such info?
best regards
Tariel
More information about the metacard
mailing list