• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: delay 1 millisecond in Panther
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: delay 1 millisecond in Panther


  • Subject: Re: delay 1 millisecond in Panther
  • From: Bill <email@hidden>
  • Date: Sun, 15 Feb 2004 01:25:29 +0800

Thanks Chris, Emmanuel, Lachlan, Timothy & Deivy :)

Your information is valuable and extremely helpful.

Currently I'm testing PsyScript and Smile, prior to recommendation.


Well, may I ask some silly questions here:

To display a glyph, the point "." has the fewest pixels to change color, would it display faster than other characters, e.g. "W"?

Non-ASCII characters like Traditional Chinese, their glyphs are complicated, are they the slowest to display (more pixels to change color)?

For the same character e.g. "A", will different fonts have different time to display?


The script below is for fun ;)

-- script starts

-- provided the font "Apple Symbols.ttf" is installed, which comes with Essentials.pkg

-- get the unicode glyph from code point
on hexU(h)
run script ("+data utxt" & h & ";")
end hexU
-- white chess
property wKing : hexU("2654")
property wQueen : hexU("2655")
property wBishop : hexU("2657")
property wKnight : hexU("2658")
property wRook : hexU("2656")
property wPawn : hexU("2659")

-- black chess
property bKing : hexU("265A")
property bQueen : hexU("265B")
property bBishop : hexU("265D")
property bKnight : hexU("265E")
property bRook : hexU("265C")
property bPawn : hexU("265F")

property windowName : "chess" as Unicode text
property theBounds : {37, 41, 313, 317}

tell application "TextEdit"
set theDoc to make new document at front
set text of theDoc to space
set the size of text of theDoc to 191
tell window 1
set name to windowName
set bounds to theBounds
end tell
activate
tell theDoc
-- display white King for 0.25 second
set text 1 to wKing
delay 0.25
-- display blank for 0.25 second
set text 1 to space
delay 0.25
-- display black King for 0.25 second
set text 1 to bKing
delay 0.25
-- display blank again
set text 1 to space
delay 0.25
-- display white Queen for 0.25 second
set text 1 to wQueen
delay 0.25
-- display blank for 0.25 second
set text 1 to space
delay 0.25
-- display black Queen for 0.25 second
set text 1 to bQueen
delay 0.25
-- display blank again
set text 1 to space
delay 0.25
-- display white Bishop for 0.25 second
set text 1 to wBishop
delay 0.25
-- display blank for 0.25 second
set text 1 to space
delay 0.25
-- display black Bishop for 0.25 second
set text 1 to bBishop
delay 0.25
-- display blank again
set text 1 to space
delay 0.25 -- display white Knight for 0.25 second
set text 1 to wKnight
delay 0.25
-- display blank for 0.25 second
set text 1 to space
delay 0.25
-- display black Knight for 0.25 second
set text 1 to bKnight
delay 0.25
-- display blank again
set text 1 to space
delay 0.25
-- display white Rook for 0.25 second
set text 1 to wRook
delay 0.25
-- display blank for 0.25 second
set text 1 to space
delay 0.25
-- display black Rook for 0.25 second
set text 1 to bRook
delay 0.25
-- display blank again
set text 1 to space
delay 0.25
-- display white Pawn for 0.25 second
set text 1 to wPawn
delay 0.25
-- display blank for 0.25 second
set text 1 to space
delay 0.25
-- display black Pawn for 0.25 second
set text 1 to bPawn
delay 0.25
-- display blank again
set text 1 to space
delay 0.25
end tell
-- close window
close window 1 without saving
end tell

-- script ends

Wanna to play chess this weekend?


TIA
bill
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: delay 1 millisecond in Panther
      • From: Graff <email@hidden>
  • Prev by Date: Re: GUI scripting beta in OS 10.2--sliders
  • Next by Date: Remember Classic? Tex-Edit loop runs glacially slow
  • Previous by thread: Re: delay 1 millisecond in Panther
  • Next by thread: Re: delay 1 millisecond in Panther
  • Index(es):
    • Date
    • Thread