Click the links below to explore the different sections of our site. If you have any questions about our products or services, don't hesitate to contact us.
Following are a number of links to pages that might interest you as a visitor of this web site.
copyright © 2005-07 by Mark Schonewille & Economy-x-Talk

Economy-x-Talk - Sample Scripts

Center Window Relative to Card Window

This is a short script that returns the coordinates of the center of the screen relative to the card window. If you want to center a window created by xDialogs, w and h are the width and height of the centered window. In other occasions, you may want to set w and h to 0 (zero).





function centerLocRelative w,h
  put the loc of the card window into cardLoc
  put (item 3 of the screenRect / 2) & comma & ¬
  (item 4 of the screenRect / 2) into theGlobalCenter
  put (item 1 of theGlobalCenter - item 1 of the loc of the card window - (w/2)) ¬
  & comma & ¬
 (item 2 of theGlobalCenter - item 2 of the loc of the card window - (h/2)) ¬
  into relativeLoc
  return relativeLoc
end centerLocRelative





Keep this extensive resource of tutorials and samples on-line! Support RunRev.info!
Yes, this script is useful. I make a donation and choose freely how much I want to donate on-line (PayPal). Click here if you want to make a donation in dollars.This script has not (completely) solved my problem and I want Economy-x-Talk to take care of it. Let me contact you.
Copyright©2002-2008 by Mark Schonewille, Nijmegen, the Netherlands. This web site is in no way affiliated with Runtime Revolution Ltd., but we do recommend the Revolution development platform.