From Minimize to Maximize the Lasagna with LC (='.'=) [SOLVED]
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
From Minimize to Maximize the Lasagna with LC (='.'=) [SOLVED]
While I enjoy experimenting with LiveCode, I sometimes cook lunch or dinner.
So I thought of doing a small application to avoid burning lasagna or meat sauce (ragù, bolognese).
I thought to make a small stand alone where I put a number of minutes and, when the time is up, a colored window will come out on my computer with a message, for example "the dinner burns!".
I give a summary to better explain it, Mah scots is indeed ill ! (richmond62 docet)
a) I'm working on the computer (desktop with Windows)
b) I turn on my little program (standalone) and I set the minutes
c) I MINIMIZE the small program (because I have to keep working)
d) when the minutes have expired the program IS ALARM, REMOVES ITS MINIMIZATION, MAXIMIZES, ABOVE ALL WINDOWS AND SHOW!
Sorry for uppercase, (and for my ridiculous English) but it is to highlight the highlights.
Now, I can do everything (ie the "countdown", the colored window, the standalone, etc.).
What I do not know how to do (and I have searched the vocabulary but I can not find the solution) is, once the time has elapsed, to maximize the window that is minimized (or under all other windows).
Do you believe that it can be done with LC?
Thank you guys!
Mariasole
(='.'=)
So I thought of doing a small application to avoid burning lasagna or meat sauce (ragù, bolognese).
I thought to make a small stand alone where I put a number of minutes and, when the time is up, a colored window will come out on my computer with a message, for example "the dinner burns!".
I give a summary to better explain it, Mah scots is indeed ill ! (richmond62 docet)
a) I'm working on the computer (desktop with Windows)
b) I turn on my little program (standalone) and I set the minutes
c) I MINIMIZE the small program (because I have to keep working)
d) when the minutes have expired the program IS ALARM, REMOVES ITS MINIMIZATION, MAXIMIZES, ABOVE ALL WINDOWS AND SHOW!
Sorry for uppercase, (and for my ridiculous English) but it is to highlight the highlights.
Now, I can do everything (ie the "countdown", the colored window, the standalone, etc.).
What I do not know how to do (and I have searched the vocabulary but I can not find the solution) is, once the time has elapsed, to maximize the window that is minimized (or under all other windows).
Do you believe that it can be done with LC?
Thank you guys!
Mariasole
(='.'=)
Last edited by Mariasole on Thu May 03, 2018 6:07 pm, edited 1 time in total.
"I'm back" - The Cyberdyne Systems Model 101 Series 800 Terminator
Re: From Minimize to Maximize the Lasagna with LC (='.'=)
Assuming (bad habit of mine) that your minutes are in a variable of some kind, I think it would be something a handler like (not tested psuedo code)
Code: Select all
// at the end of the handler that starts your timer / iconifies the stack...
on timerFinished
if theMins = 1 then show stack "myAlarmStack"
send to me in 30 seconds
// or whatever amount of time you deem necessary...
end timerFinished
Re: From Minimize to Maximize the Lasagna with LC (='.'=)
Grazie davvero gattone!
The reasoning is perfect, even I imagined it that way.
The problem is the "command" since "show me" does nothing in the minimized standalone....
I do not know what command to put.
mmmmmmmmm....
The reasoning is perfect, even I imagined it that way.
The problem is the "command" since "show me" does nothing in the minimized standalone....
I do not know what command to put.
Code: Select all
if tTime is "0" then
MAXIMIZE THE WINDOW AND PUT IN FRONT OF ALL :)
end if
"I'm back" - The Cyberdyne Systems Model 101 Series 800 Terminator
Re: From Minimize to Maximize the Lasagna with LC (='.'=)
Ciao cara,
this property is what you are looking for:
Best
Klaus
this property is what you are looking for:
Code: Select all
...
## Maximize window:
set the iconic of this stack to FALSE
...
Klaus
Re: From Minimize to Maximize the Lasagna with LC (='.'=)
Thank you Klaus! It works!!!
But if the window was not minimized but hidden behind other windows, how can I tell the window:
Thank you very much, you deserve the tagliatelle alla bolognese (handmade)
But if the window was not minimized but hidden behind other windows, how can I tell the window:
Code: Select all
Hey! stand in front of all the windows!
"I'm back" - The Cyberdyne Systems Model 101 Series 800 Terminator
Re: From Minimize to Maximize the Lasagna with LC (='.'=)
Ciao cara,
grazie, adoro la pasta!
I'm fraid you can do this only with AppleScript on a Mac and VBScript on Windows.
AppleScript example, put this snippet into a custom property or a field
Then replace XXXX with the name of your standalone (or the current running verwsion of LC, if this should work in the IDE) and "do IT as AppleScript", capisce?
Being a Mac guy, I'll leave the Windows part up to you.
Best
Klaus
grazie, adoro la pasta!
I'm fraid you can do this only with AppleScript on a Mac and VBScript on Windows.
AppleScript example, put this snippet into a custom property or a field
Code: Select all
tell application "XXXX"
activate
end tell
Being a Mac guy, I'll leave the Windows part up to you.
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 365
- Joined: Mon Jun 10, 2013 1:32 pm
Re: From Minimize to Maximize the Lasagna with LC (='.'=)
Hiya
I used this in an application that was loading another version of itself with a different name - I just tested it with a test stack
Regards Lagi
Code: Select all
On TimerDone
--Bring to Front
set the systemwindow of stack "timerdone" to TRUE
wait 250
-- Then don't make it a system window otherwise it will be above all the others all the time
set the systemwindow of stack "timerdone" to false
end TimerDone
Regards Lagi
Re: From Minimize to Maximize the Lasagna with LC (='.'=)
Ah, yes, "systemwindow", never used it, always forget about it
Re: From Minimize to Maximize the Lasagna with LC (='.'=) [SOLVED]
Grazie Lagi!!!!
I had also found this solution and I was posting it.
And here the good Lagi gave it to me too!
Thank you very much!
Grazie Klaus, anche io una volta ero un'utente Apple! Bei tempi!
Grazie gattone Bogs! Sei sempre carinissimo!
Mariasole
(='.'=)
I had also found this solution and I was posting it.
Code: Select all
set the systemWindow of stack "TimerDinner" to true
Thank you very much!
Grazie Klaus, anche io una volta ero un'utente Apple! Bei tempi!
Grazie gattone Bogs! Sei sempre carinissimo!
Mariasole
(='.'=)
"I'm back" - The Cyberdyne Systems Model 101 Series 800 Terminator
Re: From Minimize to Maximize the Lasagna with LC (='.'=) [SOLVED]
@ Lagi - Wow, nice Lagi, thank you for that!
@ Klaus - I should have known, I must have hit a blank spot
@ Klaus - I should have known, I must have hit a blank spot
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: From Minimize to Maximize the Lasagna with LC (='.'=) [SOLVED]
Code: Select all
on mouseUp
ask "Time in minutes?"
put it into MINZ
put (MINZ * 60) into SEX
set the width of stack "COOKING" to 2
set the height of stack "COOKING" to 2
set the loc of stack "COOKING" to -10,-10
wait SEX secs
set the width of stack "COOKING" to 1024
set the height of stack "COOKING" to 780
set the loc of stack "COOKING" to the screenLoc
end mouseUp
-
- VIP Livecode Opensource Backer
- Posts: 365
- Joined: Mon Jun 10, 2013 1:32 pm
Re: From Minimize to Maximize the Lasagna with LC (='.'=) [SOLVED]
Richmond for boiling an egg (and other things) it can be optimized.
Lagi
Code: Select all
put 3 into MINZ
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: From Minimize to Maximize the Lasagna with LC (='.'=) [SOLVED]
Hard or soft?for boiling an egg
Re: From Minimize to Maximize the Lasagna with LC (='.'=) [SOLVED]
Cook yourself an egg with Lagi's setting, peel it and try to slice it.
That should answer your question!
That should answer your question!