The Dialog values need refreshing ?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Grovkillen
Automation Wizard
Posts: 1128
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: The Dialog values need refreshing ?

Post by Grovkillen » Sun Jul 25, 2021 3:51 pm

Why not use a new window/dialog to show whatever error you want?
Let>ME=%Script%

Running: 15.0.27
version history

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

Re: The Dialog values need refreshing ?

Post by JRL » Mon Jul 26, 2021 1:04 pm

These days I rarely use CloseDialog> Most of the time I use the dialog AlphaBlend property instead if I want the dialog "closed".

See the comments.

Code: Select all

Dialog>Dialog1
object Dialog1: TForm
  Caption = 'AlphaBlend Demo'
  ClientHeight = 211
  ClientWidth = 476
  object Edit1: TEdit
    Left = 49
    Top = 23
    Width = 121
    Height = 21
  end
  object MSButton1: tMSButton
    Left = 197
    Top = 154
    Width = 75
    Height = 25
    Caption = 'OK'
  end
end
EndDialog>Dialog1

//Click "OK" button to run demo.
AddDialogHandler>Dialog1,MSButton1,OnClick,srtDisplayMessage
//Set Dialogs alphablend property to true so the dialog can accept
//changes to alphablendvalue property.
SetDialogProperty>Dialog1,,AlphaBlend,True

Show>Dialog1,

SRT>srtDisplayMessage
  //AlphaBlendValue=0 makes the window invisible and untouchable by the mouse and keyboard
  //AlphaBlendValue=1 makes the window invisible yet touchable by the mouse and keyboard
  SetDialogProperty>Dialog1,,AlphaBlendValue,0
  MDL>This is information you want.%crlf%Dialog is unavailable (closed).
  SetDialogProperty>Dialog1,,AlphaBlendValue,255
END>srtDisplayMessage

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