Jump to content


Photo

G M R A - The Delphi Interpreter [now V1.0.7.4]


  • Please log in to reply
120 replies to this topic

#101 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 05 May 2009 - 11:32 AM

If you check the skinned form, you'll notice it is made of "objects" (in Delphi, what you refer to are called "Controls", like buttons, textboxes, labels...).
The skinned dialog itself is made of many images (TImage), a label (TLabel) and a scroll box (a panel which shows scrollbars when content is out of view) (TScrollBox).Adding other object is easy. Here's how to add a simple button (add code in current dialog):

var b:TButton; // <- put this under the "var" line at the top

b:=TButton.Create(Application); // <- create button
b.Caption:='Click Me'; // <- button text
b.Parent:=ScrollBox1; // <- button's parent control, the scrollbox

You have to figure the rest yourself though. (Hint, the code should be as in how stuff works after each other: creaes objects, set parent properties, set child properties, put child in parent, show window/form).

Kind regards,
Christian Sciberras.
  • 0

#102 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 05 June 2009 - 09:34 PM

Tiny bump!
  • 0

#103 Hockeyflyers

Hockeyflyers

    Hockeyplayer Games

  • New Member
  • 1108 posts
  • Version:Unknown

Posted 09 June 2009 - 12:02 AM

Amazing DLL!

I just need to know one thing. I created the GUI perfect in the DelphiDesigner, and put that into a script. How do I make them show up? Sorry for the dumb question.
  • 0

#104 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 09 June 2009 - 07:59 PM

Hockeyflyers, don't worry, it actually isn't completely straightforward.
You actually have to make some modifications to the script, however, I'd have to see it to tell which.
  • 0

#105 Hockeyflyers

Hockeyflyers

    Hockeyplayer Games

  • New Member
  • 1108 posts
  • Version:Unknown

Posted 09 June 2009 - 08:37 PM

Well here's the exact code given:
[codebox]//////////////////////////////////////////////////////
// Generation: Code generated by Covac DGUID v1.0.2 //
// Copyright: DGUID © 2008 Covac Research //
// Arguments: None //
// Returns: All control IDs in a ControlIdArray //
//////////////////////////////////////////////////////
var delphi_code;
delphi_code="
unit MainProgramUnit;

function Main:String;
var
Form1: TForm;
ListBox1: TListBox;
Button1: TButton;
Button2: TButton;
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Label3: TLabel;
Edit2: TEdit;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
CheckBox1: TCheckBox;
Button3: TButton;
Button4: TButton;
Label4: TLabel;
Edit3: TEdit;
Shape1: TShape;
Label5: TLabel;
Button5: TButton;
Button6: TButton;
begin
Form1:=TForm.Create(Application);
Form1.Left:=188;
Form1.Top:=110;
Form1.Width:=676;
Form1.Height:=453;
Form1.Caption:='Form1';
Form1.Color:=clBtnFace;
Form1.Font.Charset:=DEFAULT_CHARSET;
Form1.Font.Color:=clWindowText;
Form1.Font.Height:=-11;
Form1.Font.Name:='MSSansSerif';
Form1.Font.Style:=[];
Form1.OldCreateOrder:=False;
Form1.Visible:=True;
Form1.PixelsPerInch:=96;
Form1.TextHeight:=13;
Label1:=TLabel.Create(Application);
Label1.Parent:=Form1;
Label1.Left:=192;
Label1.Top:=8;
Label1.Width:=120;
Label1.Height:=24;
Label1.Caption:='PointDetails';
Label1.Font.Charset:=DEFAULT_CHARSET;
Label1.Font.Color:=clWindowText;
Label1.Font.Height:=-19;
Label1.Font.Name:='MSSansSerif';
Label1.Font.Style:=[fsBold];
Label1.ParentFont:=False;
Label2:=TLabel.Create(Application);
Label2.Parent:=Form1;
Label2.Left:=192;
Label2.Top:=40;
Label2.Width:=61;
Label2.Height:=13;
Label2.Caption:='XCoordinate';
Label2.Color:=clWhite;
Label2.ParentColor:=False;
Label3:=TLabel.Create(Application);
Label3.Parent:=Form1;
Label3.Left:=192;
Label3.Top:=96;
Label3.Width:=61;
Label3.Height:=13;
Label3.Caption:='YCoordinate';
Label4:=TLabel.Create(Application);
Label4.Parent:=Form1;
Label4.Left:=192;
Label4.Top:=194;
Label4.Width:=93;
Label4.Height:=13;
Label4.Caption:='Delay(Milliseconds)';
Shape1:=TShape.Create(Application);
Shape1.Parent:=Form1;
Shape1.Left:=184;
Shape1.Top:=32;
Shape1.Width:=248;
Shape1.Height:=216;
Shape1.Pen.Mode:=pmMask;
Label5:=TLabel.Create(Application);
Label5.Parent:=Form1;
Label5.Left:=8;
Label5.Top:=8;
Label5.Width:=58;
Label5.Height:=24;
Label5.Caption:='Points';
Label5.Font.Charset:=DEFAULT_CHARSET;
Label5.Font.Color:=clWindowText;
Label5.Font.Height:=-19;
Label5.Font.Name:='MSSansSerif';
Label5.Font.Style:=[fsBold];
Label5.ParentFont:=False;
ListBox1:=TListBox.Create(Application);
ListBox1.Parent:=Form1;
ListBox1.Left:=10;
ListBox1.Top:=34;
ListBox1.Width:=152;
ListBox1.Height:=172;
ListBox1.ItemHeight:=13;
ListBox1.TabOrder:=0;
Button1:=TButton.Create(Application);
Button1.Parent:=Form1;
Button1.Left:=10;
Button1.Top:=217;
Button1.Width:=72;
Button1.Height:=32;
Button1.Caption:='AddPoint';
Button1.TabOrder:=1;
Button2:=TButton.Create(Application);
Button2.Parent:=Form1;
Button2.Left:=90;
Button2.Top:=217;
Button2.Width:=72;
Button2.Height:=32;
Button2.Caption:='DeletePoint';
Button2.TabOrder:=2;
Edit1:=TEdit.Create(Application);
Edit1.Parent:=Form1;
Edit1.Left:=192;
Edit1.Top:=59;
Edit1.Width:=64;
Edit1.Height:=19;
Edit1.MaxLength:=4;
Edit1.TabOrder:=3;
Edit2:=TEdit.Create(Application);
Edit2.Parent:=Form1;
Edit2.Left:=192;
Edit2.Top:=115;
Edit2.Width:=64;
Edit2.Height:=19;
Edit2.MaxLength:=4;
Edit2.TabOrder:=4;
RadioButton1:=TRadioButton.Create(Application);
RadioButton1.Parent:=Form1;
RadioButton1.Left:=289;
RadioButton1.Top:=67;
RadioButton1.Width:=96;
RadioButton1.Height:=16;
RadioButton1.Caption:='LeftClick';
RadioButton1.TabOrder:=5;
RadioButton2:=TRadioButton.Create(Application);
RadioButton2.Parent:=Form1;
RadioButton2.Left:=289;
RadioButton2.Top:=87;
RadioButton2.Width:=96;
RadioButton2.Height:=16;
RadioButton2.Caption:='RightClick';
RadioButton2.Checked:=True;
RadioButton2.TabOrder:=6;
RadioButton2.TabStop:=True;
CheckBox1:=TCheckBox.Create(Application);
CheckBox1.Parent:=Form1;
CheckBox1.Left:=290;
CheckBox1.Top:=119;
CheckBox1.Width:=96;
CheckBox1.Height:=20;
CheckBox1.Caption:='NotSuspicious';
CheckBox1.TabOrder:=7;
Button3:=TButton.Create(Application);
Button3.Parent:=Form1;
Button3.Left:=390;
Button3.Top:=119;
Button3.Width:=20;
Button3.Height:=20;
Button3.Hint:='ShowhelpforNotSuspicious';
Button3.Caption:='?';
Button3.TabOrder:=8;
Button4:=TButton.Create(Application);
Button4.Parent:=Form1;
Button4.Left:=193;
Button4.Top:=149;
Button4.Width:=92;
Button4.Height:=24;
Button4.Caption:='SetPositions';
Button4.TabOrder:=9;
Edit3:=TEdit.Create(Application);
Edit3.Parent:=Form1;
Edit3.Left:=192;
Edit3.Top:=216;
Edit3.Width:=64;
Edit3.Height:=20;
Edit3.MaxLength:=4;
Edit3.TabOrder:=10;
Button5:=TButton.Create(Application);
Button5.Parent:=Form1;
Button5.Left:=114;
Button5.Top:=274;
Button5.Width:=208;
Button5.Height:=48;
Button5.Caption:='RecordClicks';
Button5.TabOrder:=11;
Button6:=TButton.Create(Application);
Button6.Parent:=Form1;
Button6.Left:=114;
Button6.Top:=338;
Button6.Width:=208;
Button6.Height:=48;
Button6.Caption:='StartClicking!';
Button6.TabOrder:=12;
Result := (
IntToStr(Integer(Form1))+'|'+
IntToStr(Integer(ListBox1))+'|'+
IntToStr(Integer(Button1))+'|'+
IntToStr(Integer(Button2))+'|'+
IntToStr(Integer(Label1))+'|'+
IntToStr(Integer(Label2))+'|'+
IntToStr(Integer(Edit1))+'|'+
IntToStr(Integer(Label3))+'|'+
IntToStr(Integer(Edit2))+'|'+
IntToStr(Integer(RadioButton1))+'|'+
IntToStr(Integer(RadioButton2))+'|'+
IntToStr(Integer(CheckBox1))+'|'+
IntToStr(Integer(Button3))+'|'+
IntToStr(Integer(Button4))+'|'+
IntToStr(Integer(Label4))+'|'+
IntToStr(Integer(Edit3))+'|'+
IntToStr(Integer(Shape1))+'|'+
IntToStr(Integer(Label5))+'|'+
IntToStr(Integer(Button5))+'|'+
IntToStr(Integer(Button6))
);
end;

end.
";

cvc_gmra_set(delphi_code);
return cvc_gmra_exec(global.RA_EXECUTE);[/codebox]
(didn't see the need to custom name my buttons and labels lol)

Thanks.
  • 0

#106 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 10 June 2009 - 03:07 PM

Goo, here you go:
[codebox]//////////////////////////////////////////////////////
// Generation: Code generated by Covac DGUID v1.0.2 //
// Copyright: DGUID © 2008 Covac Research //
// Arguments: None //
// Returns: All control IDs in a ControlIdArray //
//////////////////////////////////////////////////////
var delphi_code;
delphi_code="
unit MainProgramUnit;

function Main:String;
var
Form1: TForm;
ListBox1: TListBox;
Button1: TButton;
Button2: TButton;
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Label3: TLabel;
Edit2: TEdit;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
CheckBox1: TCheckBox;
Button3: TButton;
Button4: TButton;
Label4: TLabel;
Edit3: TEdit;
Shape1: TShape;
Label5: TLabel;
Button5: TButton;
Button6: TButton;
begin
Form1:=TForm.Create(Application);
Form1.Left:=188;
Form1.Top:=110;
Form1.Width:=676;
Form1.Height:=453;
Form1.Caption:='Form1';
Form1.Color:=clBtnFace;
Form1.Visible:=True;
Label1:=TLabel.Create(Application);
Label1.Parent:=Form1;
Label1.Left:=192;
Label1.Top:=8;
Label1.Width:=120;
Label1.Height:=24;
Label1.Caption:='PointDetails';
Label2:=TLabel.Create(Application);
Label2.Parent:=Form1;
Label2.Left:=192;
Label2.Top:=40;
Label2.Width:=61;
Label2.Height:=13;
Label2.Caption:='XCoordinate';
Label2.Color:=clWhite;
Label2.ParentColor:=False;
Label3:=TLabel.Create(Application);
Label3.Parent:=Form1;
Label3.Left:=192;
Label3.Top:=96;
Label3.Width:=61;
Label3.Height:=13;
Label3.Caption:='YCoordinate';
Label4:=TLabel.Create(Application);
Label4.Parent:=Form1;
Label4.Left:=192;
Label4.Top:=194;
Label4.Width:=93;
Label4.Height:=13;
Label4.Caption:='Delay(Milliseconds)';
Shape1:=TShape.Create(Application);
Shape1.Parent:=Form1;
Shape1.Left:=184;
Shape1.Top:=32;
Shape1.Width:=248;
Shape1.Height:=216;
Label5:=TLabel.Create(Application);
Label5.Parent:=Form1;
Label5.Left:=8;
Label5.Top:=8;
Label5.Width:=58;
Label5.Height:=24;
Label5.Caption:='Points';
ListBox1:=TListBox.Create(Application);
ListBox1.Parent:=Form1;
ListBox1.Left:=10;
ListBox1.Top:=34;
ListBox1.Width:=152;
ListBox1.Height:=172;
ListBox1.ItemHeight:=13;
ListBox1.TabOrder:=0;
Button1:=TButton.Create(Application);
Button1.Parent:=Form1;
Button1.Left:=10;
Button1.Top:=217;
Button1.Width:=72;
Button1.Height:=32;
Button1.Caption:='AddPoint';
Button1.TabOrder:=1;
Button2:=TButton.Create(Application);
Button2.Parent:=Form1;
Button2.Left:=90;
Button2.Top:=217;
Button2.Width:=72;
Button2.Height:=32;
Button2.Caption:='DeletePoint';
Button2.TabOrder:=2;
Edit1:=TEdit.Create(Application);
Edit1.Parent:=Form1;
Edit1.Left:=192;
Edit1.Top:=59;
Edit1.Width:=64;
Edit1.Height:=19;
Edit1.MaxLength:=4;
Edit1.TabOrder:=3;
Edit2:=TEdit.Create(Application);
Edit2.Parent:=Form1;
Edit2.Left:=192;
Edit2.Top:=115;
Edit2.Width:=64;
Edit2.Height:=19;
Edit2.MaxLength:=4;
Edit2.TabOrder:=4;
RadioButton1:=TRadioButton.Create(Application);
RadioButton1.Parent:=Form1;
RadioButton1.Left:=289;
RadioButton1.Top:=67;
RadioButton1.Width:=96;
RadioButton1.Height:=16;
RadioButton1.Caption:='LeftClick';
RadioButton1.TabOrder:=5;
RadioButton2:=TRadioButton.Create(Application);
RadioButton2.Parent:=Form1;
RadioButton2.Left:=289;
RadioButton2.Top:=87;
RadioButton2.Width:=96;
RadioButton2.Height:=16;
RadioButton2.Caption:='RightClick';
RadioButton2.Checked:=True;
RadioButton2.TabOrder:=6;
RadioButton2.TabStop:=True;
CheckBox1:=TCheckBox.Create(Application);
CheckBox1.Parent:=Form1;
CheckBox1.Left:=290;
CheckBox1.Top:=119;
CheckBox1.Width:=96;
CheckBox1.Height:=20;
CheckBox1.Caption:='NotSuspicious';
CheckBox1.TabOrder:=7;
Button3:=TButton.Create(Application);
Button3.Parent:=Form1;
Button3.Left:=390;
Button3.Top:=119;
Button3.Width:=20;
Button3.Height:=20;
Button3.Hint:='ShowhelpforNotSuspicious';
Button3.Caption:='?';
Button3.TabOrder:=8;
Button4:=TButton.Create(Application);
Button4.Parent:=Form1;
Button4.Left:=193;
Button4.Top:=149;
Button4.Width:=92;
Button4.Height:=24;
Button4.Caption:='SetPositions';
Button4.TabOrder:=9;
Edit3:=TEdit.Create(Application);
Edit3.Parent:=Form1;
Edit3.Left:=192;
Edit3.Top:=216;
Edit3.Width:=64;
Edit3.Height:=20;
Edit3.MaxLength:=4;
Edit3.TabOrder:=10;
Button5:=TButton.Create(Application);
Button5.Parent:=Form1;
Button5.Left:=114;
Button5.Top:=274;
Button5.Width:=208;
Button5.Height:=48;
Button5.Caption:='RecordClicks';
Button5.TabOrder:=11;
Button6:=TButton.Create(Application);
Button6.Parent:=Form1;
Button6.Left:=114;
Button6.Top:=338;
Button6.Width:=208;
Button6.Height:=48;
Button6.Caption:='StartClicking!';
Button6.TabOrder:=12;
Form1.Show;
Result := (
IntToStr(Integer(Form1))+'|'+
IntToStr(Integer(ListBox1))+'|'+
IntToStr(Integer(Button1))+'|'+
IntToStr(Integer(Button2))+'|'+
IntToStr(Integer(Label1))+'|'+
IntToStr(Integer(Label2))+'|'+
IntToStr(Integer(Edit1))+'|'+
IntToStr(Integer(Label3))+'|'+
IntToStr(Integer(Edit2))+'|'+
IntToStr(Integer(RadioButton1))+'|'+
IntToStr(Integer(RadioButton2))+'|'+
IntToStr(Integer(CheckBox1))+'|'+
IntToStr(Integer(Button3))+'|'+
IntToStr(Integer(Button4))+'|'+
IntToStr(Integer(Label4))+'|'+
IntToStr(Integer(Edit3))+'|'+
IntToStr(Integer(Shape1))+'|'+
IntToStr(Integer(Label5))+'|'+
IntToStr(Integer(Button5))+'|'+
IntToStr(Integer(Button6))
);
end;

end.
";

cvc_gmra_set(delphi_code);
return cvc_gmra_exec(global.RA_EXECUTE);[/codebox]Now just put all that code in a GML script.
When you run the script, a new form will be created and shown.
  • 0

#107 Hockeyflyers

Hockeyflyers

    Hockeyplayer Games

  • New Member
  • 1108 posts
  • Version:Unknown

Posted 10 June 2009 - 04:37 PM

Thank you!
But could you please explain what you did and why it works?

Also, how can I put these controls on the Game window instead of the form?
  • 0

#108 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 10 June 2009 - 08:20 PM

Thank you!
But could you please explain what you did and why it works?

Also, how can I put these controls on the Game window instead of the form?


He set the font information, it may not have been set by default.

To put the controls on the game window, you must create the control on it or you can SetParent it. I've never done it, so I do not know much.

By the way, Uuf6429, have you tested DFM support?
  • 0

#109 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 11 June 2009 - 08:53 PM

He set the font information, it may not have been set by default.

Unless I missed some, I knew what was the old/default font. Got to fix this in the editor.

To put the controls on the game window, you must create the control on it or you can SetParent it. I've never done it, so I do not know much.

Yes, there are two ways, each requiring you to create the control:
code="var b:TButton;

function Main:String;
begin
  
  // create button
  b:=TButton.Create(Application);
  
  // you can use the Delphi method (easy+reccomended)
  b.ParentWindow:="+string(window_handle())+";
  
  // or the WinAPI way (child, parent):
  SetParent(b.Handle,"+string(window_handle())+");
  
end;"

// here you should execute "code"

By the way, Uuf6429, have you tested DFM support?

Not yet, sorry.

Edited by uuf6429, 11 June 2009 - 08:54 PM.

  • 0

#110 Maxinston

Maxinston

    Epic Phail

  • GMC Member
  • 1230 posts
  • Version:Unknown

Posted 16 October 2010 - 08:33 PM

Can someone please reupload?
  • 0

#111 alitahir

alitahir

    Sonic Revolution

  • GMC Member
  • 29 posts

Posted 13 March 2012 - 08:21 AM

there is only one page at your covac software site
  • 0

#112 alitahir

alitahir

    Sonic Revolution

  • GMC Member
  • 29 posts

Posted 13 March 2012 - 08:21 AM

there is only one page at your covac software site
moreover the GMRA and other things can`t be downloaded from it
  • 0

#113 Primoz128

Primoz128

    GMC Member

  • GMC Member
  • 277 posts
  • Version:GM8.1

Posted 08 April 2012 - 08:48 PM

THERE IS NO WORKING DOWNLOAD SITE FOR THIS (and i need a new keyboard) !!!
  • 0

#114 Razon

Razon

    GMC Member

  • GMC Member
  • 246 posts
  • Version:Unknown

Posted 11 April 2012 - 03:13 AM

http://www.mediafire...9aonzx49dtnr5og
  • 4

#115 time-killer-games

time-killer-games

    GMC Member

  • Banned Users
  • 539 posts
  • Version:GM:Studio

Posted 17 April 2012 - 01:04 AM

^+1 I've been needing that for ages :D!!!!!

#116 alitahir

alitahir

    Sonic Revolution

  • GMC Member
  • 29 posts

Posted 01 May 2012 - 02:08 PM

does anyone have a copy of DGUID?
  • 0

#117 client

client

    GMC Member

  • New Member
  • 45 posts
  • Version:GM:HTML5

Posted 17 August 2012 - 02:33 PM

how to read harddisk serial number ?
can somebody help me?
  • 0

#118 mnm_manish

mnm_manish

    GMC Member

  • GMC Member
  • 63 posts
  • Version:GM8

Posted 27 September 2012 - 11:50 AM

Covac Software Page not found??? PLease help me another mirror....
  • 0

#119 swyrl

swyrl

    GMC Member

  • GMC Member
  • 9 posts
  • Version:GM8.1

Posted 07 February 2013 - 12:29 AM

Covac Software Page not found??? PLease help me another mirror....


Yeah, bump.I need that too. would appreciet if anyone could re-upload it

EDIT:
just saw the medifire link. thanks for that man :D

Edited by swyrl, 07 February 2013 - 12:30 AM.

  • 0

#120 swyrl

swyrl

    GMC Member

  • GMC Member
  • 9 posts
  • Version:GM8.1

Posted 07 February 2013 - 12:38 AM

Hmm. Anyone got a DL for DGUID? I cant fnd it anywhere.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users