An AppleScript alternative for the HyperCard flash command

Remember the HyperCard flash feature? It would invert your screen for a split second and then return to normal. Here’s how to do exactly the same with AppleScript.

tell application “System Events”
    tell application processes
        repeat 2 times
            key code 28 using {command down, option down, control down}
            delay 0.2
        end repeat
    end tell
end tell

Store the script in a custom property of your LiveCode stack, for example cInvertScript. Then run the script as follows:

do (the cInvertScript of this stack) as AppleScript

Isn’t that cool?!

1 thought on “An AppleScript alternative for the HyperCard flash command

Leave a Reply

Your email address will not be published. Required fields are marked *


*