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 with shellexectue

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

Joined: 11 Oct 2007
Posts: 231
Location: I have alzheimer's.

PostPosted: Sun Apr 27, 2008 7:56 pm    Post subject: [Delphi] Help with shellexectue Reply with quote

Hi, could someone help me make this work?
Quote:

ShellExecute(0, pchar('open'),pchar('http://login.ijji.com/login.nhn?m=login&memberid=(Edit1.Text)&password=(Edit2.Text)', pchar(''),pchar(''), SW_NORMAL );


I want to allow the user to edit the username and password. Also, how can you go to another web page after going to that one using the same window?

In other words,

Could someone convert this in batch:
Code:
START IEXPLORE "http://login.ijji.com/login.nhn?m=login&memberid=%USERNAME%&password=%PASSWORD%&nextURL=http://sfront.ijji.com/common/prelaunch.nhn?gameId=u_sf&subId="

to Delphi?

Thanks a lot Smile.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sun Apr 27, 2008 8:08 pm    Post subject: Reply with quote

Code:
ShellExecute(0, pchar('open'),pchar('http://login.ijji.com/login.nhn?m=login&memberid='+(Edit1.Text)+'&password='+(Edit2.Text)+'), pchar(''),pchar(''), SW_NORMAL );

try that?

_________________
Back to top
View user's profile Send private message
Flabbergasted
Expert Cheater
Reputation: 0

Joined: 11 Oct 2007
Posts: 231
Location: I have alzheimer's.

PostPosted: Sun Apr 27, 2008 8:16 pm    Post subject: Reply with quote

I get Unterminated String and ) expected but END found.
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Mon Apr 28, 2008 4:00 am    Post subject: Reply with quote

Very basicly i think:

Code:
ShellExecute(0, 'open', pchar('http://login.ijji.com/login.nhn?m=login&memberid=' + (Edit1.Text) + '&password=' + (Edit2.Text), nil, nil, SW_NORMAL );


Should work..., (might be the same as lurc's code, didnt read it, but you said it gave you errors...)[/code]
Back to top
View user's profile Send private message
GuM
Expert Cheater
Reputation: 0

Joined: 17 Jan 2007
Posts: 185
Location: The Netherlands

PostPosted: Mon Apr 28, 2008 4:38 am    Post subject: Reply with quote

Code:
var
  Lol: PChar;
begin
  Lol := PChar('http://login.ijji.com/login.nhn?m=login&memberid=' + Edit1.Text + '&password=' + Edit2.Text);
  ShellExecute(0, PChar('open'), Lol, nil, nil, SW_NORMAL);
end;


That should work.
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Mon Apr 28, 2008 5:07 am    Post subject: Reply with quote

GuM wrote:
Code:
var
  Lol: PChar;
begin
  Lol := PChar('http://login.ijji.com/login.nhn?m=login&memberid=' + Edit1.Text + '&password=' + Edit2.Text);
  ShellExecute(0, PChar('open'), Lol, nil, nil, SW_NORMAL);
end;


That should work.


Pretty much the same as i wrote, you just made a whole variable about it, wich i dont find neccesary...
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Mon Apr 28, 2008 5:49 am    Post subject: Reply with quote

Why are we fighiting over Shellexecute lol ?

just use LPCSTR (PAnsiChar).

Code:
ShellExecute(0,
'OPEN',
LPCSTR('http://login.ijji.com/login.nhn?m=login&memberid='+Edit1.Text+'&password='+Edit2.Text+'&nextURL=http://sfront.ijji.com/common/prelaunch.nhn?gameId=u_sf&subId='),
nil,
nil,
SW_NORMAL);


btw, i even made a function from it.

Code:
Function Login(Username,Password:LPCSTR):Cardinal;
Begin
Result:=ShellExecute(
0,
'OPEN',
LPCSTR('http://login.ijji.com/login.nhn?m=login&memberid='+Username+'&password='+Password+'&nextURL=http://sfront.ijji.com/common/prelaunch.nhn?gameId=u_sf&subId='),
nil,
nil,
SW_NORMAL);
End;

procedure TForm1.Button1Click(Sender: TObject);
begin
Login(LPCSTR(Edit1.Text),LPCSTR(Edit2.Text));
end;
Back to top
View user's profile Send private message
Flabbergasted
Expert Cheater
Reputation: 0

Joined: 11 Oct 2007
Posts: 231
Location: I have alzheimer's.

PostPosted: Tue Apr 29, 2008 6:25 pm    Post subject: Reply with quote

Ok I have another problem Confused. How do I insert that into that?

Code:
Webbrowser1.Navigate('');
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Wed Apr 30, 2008 11:07 pm    Post subject: Reply with quote

Code:
LoginStr:= LPCSTR('http://login.ijji.com/login.nhn?m=login&memberid='+Edit1.Text+'&password='+Edit2.Text+'&nextURL=http://sfront.ijji.com/common/prelaunch.nhn?gameId=u_sf&subId=')

Webbrowser1.Navigate(LoginStr);

it should be something like that, but i can't get navigate to work, dunno why

_________________
Back to top
View user's profile Send private message
Flabbergasted
Expert Cheater
Reputation: 0

Joined: 11 Oct 2007
Posts: 231
Location: I have alzheimer's.

PostPosted: Sat May 03, 2008 3:47 pm    Post subject: Reply with quote

Thanks Snootae, but it doesn't work.

To get navigate to work you have to add TWebBrowser to your form if you haven't done so O.o.
Back to top
View user's profile Send private message
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