Jump to content

Search the Community

Showing results for tags 'showmessage button click'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Forum Rules
    • Announcements
    • General Discussion
    • Forum Discussion
  • Support
    • Download SCAR Divi
    • SCAR Divi Manual
    • General Help
    • Scripting Help
    • Script Help
    • Tutorials and FAQ
  • Scripts
    • Scripts For Games
    • Game Scripts
    • Other Scripts
    • Requests
  • Include Libraries
    • OSI
    • MSSL
    • GMRL
    • SSIL
    • Archive
  • Code Bin
    • Mouse & Keyboard
    • Screen & Client
    • Color, Bitmap, DTM & OCR
    • Points & Boxes
    • Files & Networking
    • Math
    • Other Snippets
  • Development
    • Development Roadmap
    • Bugtracker
    • Development Discussion
  • Games
    • RuneScape
    • Seafight
    • Other Games
  • Misc
    • Native Corner
    • Programming
    • Graphics
    • Music
    • Movies & TV

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Location


Interests


Occupation


Studies


Skype

Found 1 result

  1. Hi everyone, I'm slowly getting the hang of scripting so Please keep your as simplified as possible. After making some besic scripts I want to combine them under 1 single program... So I'm trying to make a form with basic buttons to assign my scripts to, but I can't even make a button click to show a message. I succeeded in getting a message box with a basic script using the ShowMessage function, but as soon as i try it in a form, it won't work. Here's the code: type TForm1 = record Form1: TForm; Button1: TButton; end; var Form1: TForm1; procedure TestButton; begin ShowMessage('ok') end; procedure Button1Click(sender: TObject); begin case sender of Form1.Button1: TestButton; end; end; procedure Form1_Init; begin with Form1 do begin Form1 := CreateForm; Button1 := TButton.Create(Form1); with Form1 do begin Left := 228; Top := 129; Caption := 'Form1'; ClientHeight := 202; ClientWidth := 304; Color := clWindow; Font.Charset := DEFAULT_CHARSET; Font.Color := clWindowText; Font.Height := -11; Font.Name := 'Tahoma'; Font.Style := []; OldCreateOrder := False; PixelsPerInch := 96; end; with Button1 do begin Parent := Form1; Left := 4; Top := 4; Width := 296; Height := 40; Caption := 'Button1'; TabOrder := 0; end; end; end; procedure Form1_SafeInit; var v: TVariantArray; begin SetLength(v, 0); ThreadSafeCall('Form1_Init', v); end; function Form1_ShowModal: Boolean; begin Result := Form1.Form1.ShowModal = mrOk; end; function Form1_SafeShowModal: Boolean; var v: TVariantArray; begin SetLength(v, 0); Result := ThreadSafeCall('Form1_ShowModal', v); end; begin Form1_SafeInit; Form1_SafeShowModal; FreeForm(Form1.Form1); end.; So if anyone sees what I'm doing and wants to tell me, Thanks in advance
×
  • Create New...