home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Add-Ons / AppleScript / Switch Keyboard / Switch Keyboard.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-12  |  831 b   |  39 lines  |  [TEXT/CWIE]

  1. ////////////////////////////////////////////////////////////////////
  2. //
  3. //      kbdswitch
  4. //      an OSAX
  5. //        (1 line added to a shell made by butchering one of
  6. //      D.Olson's excellent examples)
  7. //
  8. //         John Blackburne, johnb@tempest.net.hk, 14 August 1995
  9. //        
  10. //
  11. //////////////////////////////////////////////////////////////////
  12.  
  13.  
  14.  
  15.  
  16. ////////////////////////////////////////////////////////////////////
  17. //
  18. //     main()
  19. //    The entry to our Scripting Addition.
  20. //    Remember to declare it pascal!!
  21. //
  22. //////////////////////////////////////////////////////////////////
  23.  
  24. pascal OSErr main(    AppleEvent *theEvent, 
  25.                     AppleEvent *theReply, 
  26.                     long theRefCon)
  27. {    
  28.     OSErr        theErr = noErr;
  29.         
  30.       /*
  31.           Switch the keyboard
  32.        */
  33.        
  34.      KeyScript(smKeyNextKybd);                                 
  35.     
  36.     
  37.     return theErr;    // And return our error.
  38. }
  39.