minimize stack using applescript
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
minimize stack using applescript
Dear livecoders
it baffles me that no one has really asked or answered this question ......
I tried the following to minimize application window in Mac OS X
the DoCommand of button "Minimize" contains:
tell application "UMP"
set miniaturized of window 1 to true
end tell
on mouseUp:
do the DoCommand of me as "AppleScript"
answer the result
end mouseup
nothing happens... no answerwindow appears....
why doesn't this work?
it baffles me that no one has really asked or answered this question ......
I tried the following to minimize application window in Mac OS X
the DoCommand of button "Minimize" contains:
tell application "UMP"
set miniaturized of window 1 to true
end tell
on mouseUp:
do the DoCommand of me as "AppleScript"
answer the result
end mouseup
nothing happens... no answerwindow appears....
why doesn't this work?
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
-
- VIP Livecode Opensource Backer
- Posts: 9738
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: minimize stack using applescript
Hi.
Don't know much about Applescript, but is the middle line of code you are executing as AppleScript valid? Not sure how a runtime error in that world would go down. And the "tell" command can access "UMP" whatever that is? Same thinking there.
I assume that the "mouseUp" handler is indeed in the button "Minimize"?
Craig Newman
Don't know much about Applescript, but is the middle line of code you are executing as AppleScript valid? Not sure how a runtime error in that world would go down. And the "tell" command can access "UMP" whatever that is? Same thinking there.
I assume that the "mouseUp" handler is indeed in the button "Minimize"?
Craig Newman
Re: minimize stack using applescript
I got the applescript code from an answer on stackoverflow
http://stackoverflow.com/questions/3564 ... dow-in-mac
UMP is the name of my application .... as specified in the standalone settings....
yes mouseup handler is in the button "Minimize"
http://stackoverflow.com/questions/3564 ... dow-in-mac
UMP is the name of my application .... as specified in the standalone settings....
yes mouseup handler is in the button "Minimize"
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: minimize stack using applescript
From my understanding Livecode has only limited support for AppleScript. Livecode is not scriptable as e.g. Safari.
Incomming Livecode supports the required suite like quit etc.
As for other AppleEvents it only handles evaluate and do script.
Did you try "set the iconic of this stack to true"? In the IDE this puts the stack into the dock on MacOSX.
Kind regards
Bernd
Incomming Livecode supports the required suite like quit etc.
As for other AppleEvents it only handles evaluate and do script.
Did you try "set the iconic of this stack to true"? In the IDE this puts the stack into the dock on MacOSX.
Kind regards
Bernd
Re: minimize stack using applescript
Hi Bernd,
That line doesn't work for me on Mac OS X ...works on windows....
Thats why I started to investigate another way of doing it..... my wife's little airbook is my testing ground, and the "set iconic" doesn't work.
That line doesn't work for me on Mac OS X ...works on windows....
Thats why I started to investigate another way of doing it..... my wife's little airbook is my testing ground, and the "set iconic" doesn't work.
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: minimize stack using applescript
Hi MakeShift,
I just tried a minimal standalone on MacOSX 10.9.5. using LC 7.1 DP1
One card one button
script of button
and it worked.
What are your specs?
Kind regards
Bernd
I just tried a minimal standalone on MacOSX 10.9.5. using LC 7.1 DP1
One card one button
script of button
Code: Select all
on mouseUp
set the iconic of this stack to true
end mouseUp
What are your specs?
Kind regards
Bernd
Re: minimize stack using applescript
she is running 10.6.8 .... so i tried to send the message "set the iconic of this stack to true" to the stack and nothing happens.
i guess i should report it as a bug?
i guess i should report it as a bug?
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: minimize stack using applescript
Hi Tom,
what exactly are you trying to achieve. I am not clear about this.
Do you want to let the user of the app minimize the window (stack) of the app? Or do you want to remote-control the app and send it a minimize message?
did you try to do a minimal standalone as described above?
Kind regards
Bernd
what exactly are you trying to achieve. I am not clear about this.
Do you want to let the user of the app minimize the window (stack) of the app? Or do you want to remote-control the app and send it a minimize message?
did you try to do a minimal standalone as described above?
Kind regards
Bernd
Re: minimize stack using applescript
my app runs in fullscreen mode..so i had to create my own buttons to close and minimize...... closing works... minimize doesn't .....
thats all..nothing fancy....simple task ....
I jsut tried the empty stack..and it worked..... ... though only in the ide.
hhhmmmm.... ok...i will investigate more..... thanks for taking your time with this ...
will return with a verdict, though i suspect that now i will be able to track down the issue knowing that it actually is supposed to work....
thats all..nothing fancy....simple task ....
I jsut tried the empty stack..and it worked..... ... though only in the ide.
hhhmmmm.... ok...i will investigate more..... thanks for taking your time with this ...
will return with a verdict, though i suspect that now i will be able to track down the issue knowing that it actually is supposed to work....
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com