| View previous topic :: View next topic |
| Author |
Message |
malfunction Grandmaster Cheater Supreme
Reputation: 0
Joined: 30 Jan 2007 Posts: 1015 Location: http://www.behindthecorner.com/
|
Posted: Mon Jul 16, 2007 7:52 am Post subject: [DELPHI HELP] |
|
|
i need some help
check the pic...
im trying to make it open a .exe, im using shellexecute... but its not compiling it
| Description: |
|
| Filesize: |
46.03 KB |
| Viewed: |
6733 Time(s) |

|
_________________
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Mon Jul 16, 2007 8:03 am Post subject: |
|
|
uhm... ('C:\...')
?
|
|
| Back to top |
|
 |
malfunction Grandmaster Cheater Supreme
Reputation: 0
Joined: 30 Jan 2007 Posts: 1015 Location: http://www.behindthecorner.com/
|
Posted: Mon Jul 16, 2007 8:20 am Post subject: |
|
|
thanks il try
okay it worked but now this came
| Description: |
|
| Filesize: |
85.21 KB |
| Viewed: |
6722 Time(s) |

|
_________________
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Mon Jul 16, 2007 8:26 am Post subject: |
|
|
| there is no such thing as "NULL" in delphi.
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Mon Jul 16, 2007 8:29 am Post subject: |
|
|
| isnt it called nill or something instead? nil ?
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Mon Jul 16, 2007 8:32 am Post subject: |
|
|
use this
| Code: |
var Exe: string;
begin
Exe := 'd:\windows\system32\notepad.exe';
ShellExecute(Application.Handle, 'open', PChar(Exe), '', Pchar(ExtractFileDir(Exe)), SW_SHOW);
end;
|
|
|
| Back to top |
|
 |
malfunction Grandmaster Cheater Supreme
Reputation: 0
Joined: 30 Jan 2007 Posts: 1015 Location: http://www.behindthecorner.com/
|
Posted: Mon Jul 16, 2007 8:33 am Post subject: |
|
|
it had the null thingy in the delphi help ---- but i think its for finding folders
now this came up
| Description: |
|
| Filesize: |
62.08 KB |
| Viewed: |
6704 Time(s) |

|
_________________
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Mon Jul 16, 2007 9:44 am Post subject: |
|
|
| did you remember to add ShellAPI to your uses list ?
|
|
| Back to top |
|
 |
UnLmtD Grandmaster Cheater
Reputation: 0
Joined: 13 Mar 2007 Posts: 894 Location: Canada
|
Posted: Mon Jul 16, 2007 10:05 am Post subject: |
|
|
| Kevinnn wrote: | | did you remember to add ShellAPI to your uses list ? |
Never used Delphi but, if he didn't include ShellAPI , it would say undeclared identifier.
About your problem, in Delphi don't you need to end every line with ;? I believe the problem is in here: | Code: | | Exe := 'C:\WINDOWS\CALC.EXE' | change it to | Code: | | Exe := 'C:\WINDOWS\CALC.EXE'; |
_________________
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Mon Jul 16, 2007 10:06 am Post subject: |
|
|
Add a ";" to the line above where the error is.
Edit: Gah, curse my internet connection zomgiownyou.
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Mon Jul 16, 2007 12:39 pm Post subject: |
|
|
| skyllakarean wrote: | it had the null thingy in the delphi help ---- but i think its for finding folders
now this came up |
Sorry dude, I forgot to say, Add "shellapi" to your uses list.
Just tried it, it's working
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Mon Jul 16, 2007 1:07 pm Post subject: |
|
|
| I already said at ?
|
|
| Back to top |
|
 |
iRiot Master Cheater
Reputation: 0
Joined: 03 Jul 2007 Posts: 395 Location: Aka RIOT
|
Posted: Mon Jul 16, 2007 3:09 pm Post subject: Re: [DELPHI HELP] |
|
|
| skyllakarean wrote: | i need some help
check the pic...
im trying to make it open a .exe, im using shellexecute... but its not compiling it |
| Code: | | ShellExecute(Handle, 'open','C:\WINDOWS\CALC.Exe', nil, nil, SW_SHOWNORMAL) ; |
|
|
| Back to top |
|
 |
malfunction Grandmaster Cheater Supreme
Reputation: 0
Joined: 30 Jan 2007 Posts: 1015 Location: http://www.behindthecorner.com/
|
Posted: Tue Jul 17, 2007 8:04 am Post subject: |
|
|
Yes i had shellapi
im not that dumb
i used reakwowjfa thingy and my 2nd problem was that i forgot the semicolon from the end, now it works like an little angel
_________________
|
|
| Back to top |
|
 |
KingZero Expert Cheater
Reputation: 0
Joined: 27 Jun 2006 Posts: 103
|
Posted: Tue Jul 17, 2007 10:29 am Post subject: |
|
|
| Code: | | ShellExecute(Handle, nil, pchar('C:\WINDOWS\CALC.Exe'), nil, nil, SW_SHOWNORMAL) ; |
Try that. Didnt test it.
Edit:
| Code: | | shellexecute(handle,nil,pchar('E:\MGADiag.exe'),nil,nil,SW_SHOW); |
That one works for me.
|
|
| Back to top |
|
 |
|