| View previous topic :: View next topic |
| Author |
Message |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Fri Feb 27, 2009 12:20 am Post subject: ShellExecute() wont open MS.. |
|
|
| Code: | | ShellExecute( 0, "open", 0, "C:\\Nexon\\MapleStory\\MapleStory.exe", 0, SW_SHOWNORMAL ); |
Compiles fine, but doesnt open MapleStory...why not?
Thanks for any help/advice.
nvm, fixed, was supposed to be
| Code: | | ShellExecute( 0, "open", "C:\\Nexon\\MapleStory\\MapleStory.exe", 0, 0, SW_SHOWNORMAL ); |
_________________
Last edited by manc on Fri Feb 27, 2009 1:04 am; edited 1 time in total |
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Fri Feb 27, 2009 12:22 am Post subject: |
|
|
What's up with the '\\' ?
_________________
|
|
| Back to top |
|
 |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Fri Feb 27, 2009 12:26 am Post subject: |
|
|
slipppppp told me that you're supposed to use \\ rather than \ when typing paths in c++,
which seemed logical since \ gave
| Quote: | .\maincppfile.cpp(69) : warning C4129: 'N' : unrecognized character escape sequence
.\maincppfile.cpp(69) : warning C4129: 'M' : unrecognized character escape sequence
.\maincppfile.cpp(69) : warning C4129: 'M' : unrecognized character escape sequence
Linking... |
while \\ didnt
Either way, neither of them worked
_________________
|
|
| Back to top |
|
 |
Bizarro I post too much
Reputation: 0
Joined: 01 May 2007 Posts: 2648
|
Posted: Fri Feb 27, 2009 12:46 am Post subject: |
|
|
| Code: | ShellExecute( HWND hwnd,
LPCTSTR lpOperation,
LPCTSTR lpFile,
LPCTSTR lpParameters,
LPCTSTR lpDirectory,
INT nShowCmd
); |
check ur code
_________________
w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils |
|
| Back to top |
|
 |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Fri Feb 27, 2009 1:01 am Post subject: |
|
|
nvm i had the file path in the wrong parameter, thanks guys
also, is there any way to make maplestory startup in windowed mode (without dxwnd)?
_________________
|
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Fri Feb 27, 2009 1:28 am Post subject: |
|
|
Eh, wasn't familiar with path naming conventions and their intricacies.
_________________
|
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Fri Feb 27, 2009 1:46 am Post subject: |
|
|
http://en.wikipedia.org/wiki/Path_(computing)#Uniform_Naming_Convention
Grouped under a naming convention, so I assumed it had something to do with it, to denote that it is not an "escape character" as wikipedia says. Anyways, still using MASM so I've never encountered the "\\". Night.
_________________
|
|
| Back to top |
|
 |
talkerzero Grandmaster Cheater
Reputation: 1
Joined: 24 Jul 2008 Posts: 560 Location: California
|
Posted: Sat Feb 28, 2009 12:58 am Post subject: |
|
|
If you just want to run a program, why not just use WinExec?
| Code: | #include <windows.h>
#include <stdio.h>
int main(){
if(WinExec("c:\\nexon\\maplestory\\maplestory.exe"))
return EXIT_SUCCESS;
else
printf("error: %u", GetLastError());
getchar();
return EXIT_FAILURE;
} |
|
|
| Back to top |
|
 |
talkerzero Grandmaster Cheater
Reputation: 1
Joined: 24 Jul 2008 Posts: 560 Location: California
|
Posted: Sun Mar 01, 2009 3:51 pm Post subject: |
|
|
| What's a legacy API? Can't find it on Google, lol.
|
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
|
| Back to top |
|
 |
crayzbeef Expert Cheater
Reputation: 0
Joined: 21 Jan 2007 Posts: 101
|
Posted: Fri Mar 06, 2009 2:44 am Post subject: |
|
|
| It's good practice to use / because \\ isn't multi-platform.
|
|
| Back to top |
|
 |
Zand Master Cheater
Reputation: 0
Joined: 21 Jul 2006 Posts: 424
|
Posted: Fri Mar 06, 2009 4:09 am Post subject: |
|
|
| crayzbeef wrote: | | It's good practice to use / because \\ isn't multi-platform. |
Yeah, if you don't want it to work.
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Fri Mar 06, 2009 2:56 pm Post subject: |
|
|
| crayzbeef wrote: | | It's good practice to use / because \\ isn't multi-platform. |
Are you stupid?
|
|
| Back to top |
|
 |
mushiehunter Master Cheater
Reputation: 0
Joined: 29 Jan 2007 Posts: 322
|
Posted: Tue Mar 17, 2009 8:03 am Post subject: |
|
|
| sponge wrote: | | What's up with the '\\' ? |
But yeah, just in-case you guys haven't realised yet, it's '\\' because '\' is used for other commands like \n (New line).
'\\' just makes it use a \ for use in writing text/directories.
|
|
| Back to top |
|
 |
|