Cast a shadow with text

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Cast a shadow with text

Post by JRL » Sun Sep 30, 2012 5:14 am

Just a concept. I'm not taking it any further and thought I'd share the idea. Uses the Stretchblt API to project an inverted image of some text. This version requires at least Macro Scheduler version 12 though earlier versions would work if one were to rework the dialogs.

Code: Select all

Let>DisplayText=LONG SLANTY SHADOWS

Dialog>Dialog1
object Dialog1: TForm
  AlphaBlend = True
  AlphaBlendValue = 0
  Caption = 'Projector'
  Color = 16777200
  ClientHeight = 200
  ClientWidth = 700
  object Label1: TLabel
    Left = 10
    Top = 100
  end
end
EndDialog>Dialog1

Dialog>Dialog3
object Dialog3: TForm
  Caption = 'Projected'
  ClientHeight = 150
  ClientWidth = 700
  Color = 16777200
  Position = poScreenCenter
  object Label1: TLabel
    Left = 10
    Top = 0
  end
end
EndDialog>Dialog3

AddDialogHandler>Dialog3,,OnClose,Quit
LibFunc>user32,GetDC,HDC1,Dialog1.handle
LibFunc>user32,GetDC,HDC3,Dialog3.handle
Show>Dialog1
Show>Dialog3
SetDialogProperty>Dialog1,Label1,Caption,DisplayText
SetDialogProperty>Dialog3,Label1,Caption,DisplayText
SetDialogObjectFont>Dialog3,Label1,Arial,40,1,1111
SetDialogObjectFont>Dialog1,Label1,Arial,40,1,9737365
SetDialogObjectFont>Dialog1,Label1,Arial,40,2,9737365
LibFunc>Gdi32,StretchBlt,SBres,HDC3,12,148,700,-100,HDC1,10,100,700,50,13369376

Label>Loop
  Wait>0.01
Goto>Loop

SRT>Quit
  Exit>0
END>Quit

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts