Move setting of ioready 'wait' earlier in call chain, to
[python/dscho.git] / Mac / Demo / calldll / samplecalldll.py
blob3a5bb5c4a125f0f12bcad1f1008ebd6b3d802baf
2 # Test calldll. Tell the user how often menus flash, and let her change it.
5 import calldll
6 import sys
8 # Obtain a reference to the library with the toolbox calls
9 interfacelib = calldll.getlibrary('InterfaceLib')
11 # Get the routines we need (see LowMem.h for details)
12 LMGetMenuFlash = calldll.newcall(interfacelib.LMGetMenuFlash, 'Short')
13 LMSetMenuFlash = calldll.newcall(interfacelib.LMSetMenuFlash, 'None', 'InShort')
15 print "Menus currently flash",LMGetMenuFlash(),"times."
16 print "How often would you like them to flash?",
18 # Note: we use input(), so you can try passing non-integer objects
19 newflash = input()
20 LMSetMenuFlash(newflash)
22 print "Okay, menus now flash", LMGetMenuFlash(),"times."
24 sys.exit(1) # So the window stays on-screen