| View previous topic :: View next topic |
| Author |
Message |
Flabbergasted Expert Cheater
Reputation: 0
Joined: 11 Oct 2007 Posts: 231 Location: I have alzheimer's.
|
Posted: Sun Apr 27, 2008 7:56 pm Post subject: [Delphi] Help with shellexectue |
|
|
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 .
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Sun Apr 27, 2008 8:08 pm Post subject: |
|
|
| 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 |
|
 |
Flabbergasted Expert Cheater
Reputation: 0
Joined: 11 Oct 2007 Posts: 231 Location: I have alzheimer's.
|
Posted: Sun Apr 27, 2008 8:16 pm Post subject: |
|
|
| I get Unterminated String and ) expected but END found.
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Mon Apr 28, 2008 4:00 am Post subject: |
|
|
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 |
|
 |
GuM Expert Cheater
Reputation: 0
Joined: 17 Jan 2007 Posts: 185 Location: The Netherlands
|
Posted: Mon Apr 28, 2008 4:38 am Post subject: |
|
|
| 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 |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Mon Apr 28, 2008 5:07 am Post subject: |
|
|
| 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 |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Mon Apr 28, 2008 5:49 am Post subject: |
|
|
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 |
|
 |
Flabbergasted Expert Cheater
Reputation: 0
Joined: 11 Oct 2007 Posts: 231 Location: I have alzheimer's.
|
Posted: Tue Apr 29, 2008 6:25 pm Post subject: |
|
|
Ok I have another problem . How do I insert that into that?
| Code: | | Webbrowser1.Navigate(''); |
|
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Wed Apr 30, 2008 11:07 pm Post subject: |
|
|
| 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 |
|
 |
Flabbergasted Expert Cheater
Reputation: 0
Joined: 11 Oct 2007 Posts: 231 Location: I have alzheimer's.
|
Posted: Sat May 03, 2008 3:47 pm Post subject: |
|
|
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 |
|
 |
|