Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


delphi help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
tarochanpan
Master Cheater
Reputation: 0

Joined: 25 Jan 2007
Posts: 285
Location: up your arse XD

PostPosted: Fri Oct 26, 2007 10:56 pm    Post subject: delphi help Reply with quote

i am just at a begginer in delphi and i figured lets remake the google part for the internet browser thing which was placed in the maplestory section i had the idea of shellxecuting a varible and i got the error "string and pansichar incompaible types" can any one help witht this problem

Code:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, shellapi;

type
  TForm1 = class(TForm)
    GroupBox1: TGroupBox;
    Button1: TButton;
    Edit1: TEdit;
    Button2: TButton;
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button2Click(Sender: TObject);
var s: string;
begin
s := 'www.gooogle.com/search?hl=en&q=' + Edit1.Text + '&meta=';
ShellExecute(Handle, 'open',(s), nil, nil, SW_SHOWNORMAL) ;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(Handle, 'open','www.google.com', nil, nil, SW_SHOWNORMAL) ;
end;

end.

_________________


Back to top
View user's profile Send private message MSN Messenger
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Sat Oct 27, 2007 5:59 am    Post subject: Reply with quote

ShellExecute syntax is:
Code:

ShellExecute(HWND,Operation,Filename in pchar,parameters in pchar, Folder name in pchar,ShowCmd);

so your code shoud look like this:
Quote:

procedure TForm1.Button2Click(Sender: TObject);
var s: string;
begin
s := 'www.gooogle.com/search?hl=en&q=' + Edit1.Text + '&meta=';
ShellExecute(Handle, 'open',pchar(s), nil, nil, SW_SHOWNORMAL) ;
end;

btw i make something like this some weeks ago.



The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.

Back to top
View user's profile Send private message
tarochanpan
Master Cheater
Reputation: 0

Joined: 25 Jan 2007
Posts: 285
Location: up your arse XD

PostPosted: Sun Oct 28, 2007 2:58 am    Post subject: Reply with quote

thanks man for the help +rep
_________________


Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites