Iconic Problem

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
alemrantareq
Posts: 203
Joined: Wed Jul 23, 2008 8:46 am

Iconic Problem

Post by alemrantareq » Tue Nov 25, 2008 8:40 am

Hi everybody,

There are some games which changes screen resolution on startup. I've made a script for my stack -

on desktopChanged
set the iconic of me to false
end desktopChanged

But when I start a game, it changes the screen resolution in 640X480 but my stack wont restore if minimized.

I've alse made a script for my stack -

on escapeKey
set the iconic of me to false
end escapeKey

But it also not works when I press escape key.

Pls, solve me.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Fri Nov 28, 2008 12:47 am

Hi alemrantareq,

It looks like you've put your script in the wrong place. If you put your script in a card script, "me" doesn't refer to the stack but to the card and setting the iconic of a card causes an execution error.

Please, make sure that you have your script at stack level. If your stack is not always the topstack, you might want to insert your script into the backscripts to make sure that the desktopChanged message is trapped.

While your stack is iconified, it isn't focused and can't trap the escapeKey message.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply