Also (excusing my ignorance here...
Scripting a Minimize button
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Scripting a Minimize button
Hi, could anyone tell me please: is it relatively straightforward to script for my own Minimize button on a Mac?
Also (excusing my ignorance here...
) what is the Windows alternative to Minimize and could that be scripted from a custom button as well?

Also (excusing my ignorance here...
Hi gyroscope,
that's pretty easy:
Crossplatform solution, of course 
Best
Klaus
New "bass" department:
http://www.major-k.de/bass
that's pretty easy:
Code: Select all
...
set the iconic of stack "xyz" to true
...Best
Klaus
New "bass" department:
http://www.major-k.de/bass
This works a treat when the Mac control/name/window bar (what is it's official name?!) is there, but as soon as I make the controls empty (i.e gone), the emulating minimize button doesn't work....
So I'm guessing the control bar has to be hidden for it to work; after trying different seaches in the dictionary, I couldn't find any answer to how to do this. Any help here please!

So I'm guessing the control bar has to be hidden for it to work; after trying different seaches in the dictionary, I couldn't find any answer to how to do this. Any help here please!
Hope its OK to bump this thread...
Seriously, if anyone has an answer I'd appreciate this. I'm getting close, I think (but not close enough...)
That doesn't work but I'm certain it can work as I've seen plugins with custom minimize, etc and no title bar showing...
Title bar...tut!control/name/window bar (what is it's official name?!)
Seriously, if anyone has an answer I'd appreciate this. I'm getting close, I think (but not close enough...)
Code: Select all
on preOpenStack
set the decorations of this stack to "minimize"
hide title
end preOpenStackHi, I've bumped this thread again....
In the five months that's passed, in my occasional Rev script trawlings, I still haven't discovered a way to script a minimize button without the title bar showing....
There's gotta be a way (to block buster...
)
Seriously, if anyone could tell me this quite straightforward scripting, I'm certain, I'd be reeeelly grateful....

In the five months that's passed, in my occasional Rev script trawlings, I still haven't discovered a way to script a minimize button without the title bar showing....
There's gotta be a way (to block buster...
Seriously, if anyone could tell me this quite straightforward scripting, I'm certain, I'd be reeeelly grateful....
You must be about my generation there gyro!
I don't have a Mac so I can't guarantee this works in that environment (and I know there are some quirks about iconic display generally).
On Windows XP this seems to work for me:
Given a stack with the decorations set to empty, and a custom "title" bar or "controls area" you can:
I don't have a Mac so I can't guarantee this works in that environment (and I know there are some quirks about iconic display generally).
On Windows XP this seems to work for me:
Given a stack with the decorations set to empty, and a custom "title" bar or "controls area" you can:
Code: Select all
--in the stack script
on uniconifyStack
set the decorations of this stack to empty
end uniconifyStackCode: Select all
--in the minimise button script
on mouseUp
lock screen --I still see a momentary animation of the window frame shrinking to the taskbar even so
set the decorations of this stack to Title --or default
set the iconic of this stack to true
end mouseUpHi SparkOut
)
Thanks for your info but unfortunately it's not quite what I'm after: the iconic of the stack only seems to works if the title bar is showing but I don't want the title bar to show at all; but still want to iconify/collapse the window...

They were the days! (Or not, depending how you look at it...You must be about my generation there gyro!
Thanks for your info but unfortunately it's not quite what I'm after: the iconic of the stack only seems to works if the title bar is showing but I don't want the title bar to show at all; but still want to iconify/collapse the window...
so maybe you're after this?
Code: Select all
on mouseUp
set the iconic of this stack to true
end mouseUpVarious teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Still no joy there, BvG but thanks still.
Perhaps I've confused people; I'll explain a bit better:
Make a new stack. This stack has a title bar as default. Put a button on it with the script you and Klaus suggested. Click the button and it works just fine. So far so good...
I go to the Controls on the stack inspector and make the title bar empty (or make it empty via script). The title bar disappears, as I want.
Click the button again....and nothing happens. It seems that the prerequisite of the "set the iconic" script to work is that the title bar is showing. But I don't want the title bar showing!!
But there must be a way, because I've seen Rev plugins with no title bar but the minimize button works (I can't inspect the script of any of these because they are locked somehow...)
Aayeee!! (As they say in Batman comics....er, perhaps)

Perhaps I've confused people; I'll explain a bit better:
Make a new stack. This stack has a title bar as default. Put a button on it with the script you and Klaus suggested. Click the button and it works just fine. So far so good...
I go to the Controls on the stack inspector and make the title bar empty (or make it empty via script). The title bar disappears, as I want.
Click the button again....and nothing happens. It seems that the prerequisite of the "set the iconic" script to work is that the title bar is showing. But I don't want the title bar showing!!
But there must be a way, because I've seen Rev plugins with no title bar but the minimize button works (I can't inspect the script of any of these because they are locked somehow...)
Aayeee!! (As they say in Batman comics....er, perhaps)
SparkOut, apologies here....I was getting so flustered about this I didn't read your script properly; it works pretty much as I need; (I put in unlock screen as well into your code); on the Mac there seems to be the same flashing before it goes to the Dock and after it's opened from the dock though but it's the closest yet...
Thank you!

Thank you!
Judge: Did you, or did you not, try the stack with a custom window shape so that the title bar would be still active but not showing and so that the custom button to minimize should work?
Me: Yes, I tried this about 5 months ago, your honor blackman, but the custom button didn't work.
Judge: I see. And have you repeated this process?
Me: Yes, about ten minutes ago, real time.
Judge: Don't get funny with me, gyroscope or whatever you're called...did it work this time?
Me: Yes, it did.
Judge: Case dismissed!

Me: Yes, I tried this about 5 months ago, your honor blackman, but the custom button didn't work.
Judge: I see. And have you repeated this process?
Me: Yes, about ten minutes ago, real time.
Judge: Don't get funny with me, gyroscope or whatever you're called...did it work this time?
Me: Yes, it did.
Judge: Case dismissed!

