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 


ShellExecute() wont open MS..

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Fri Feb 27, 2009 12:20 am    Post subject: ShellExecute() wont open MS.. Reply with quote

Code:
ShellExecute( 0, "open", 0, "C:\\Nexon\\MapleStory\\MapleStory.exe", 0, SW_SHOWNORMAL );


Compiles fine, but doesnt open MapleStory...why not? Embarassed
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
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Fri Feb 27, 2009 12:22 am    Post subject: Reply with quote

What's up with the '\\' ?
_________________
Back to top
View user's profile Send private message
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Fri Feb 27, 2009 12:26 am    Post subject: Reply with quote

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
View user's profile Send private message
Bizarro
I post too much
Reputation: 0

Joined: 01 May 2007
Posts: 2648

PostPosted: Fri Feb 27, 2009 12:46 am    Post subject: Reply with quote

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
View user's profile Send private message
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Fri Feb 27, 2009 1:01 am    Post subject: Reply with quote

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
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Fri Feb 27, 2009 1:28 am    Post subject: Reply with quote

Eh, wasn't familiar with path naming conventions and their intricacies.
_________________
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Fri Feb 27, 2009 1:46 am    Post subject: Reply with quote

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
View user's profile Send private message
talkerzero
Grandmaster Cheater
Reputation: 1

Joined: 24 Jul 2008
Posts: 560
Location: California

PostPosted: Sat Feb 28, 2009 12:58 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
talkerzero
Grandmaster Cheater
Reputation: 1

Joined: 24 Jul 2008
Posts: 560
Location: California

PostPosted: Sun Mar 01, 2009 3:51 pm    Post subject: Reply with quote

What's a legacy API? Can't find it on Google, lol.
Back to top
View user's profile Send private message Visit poster's website
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Sun Mar 01, 2009 5:56 pm    Post subject: Reply with quote

http://en.wikipedia.org/wiki/Legacy_system
_________________
Back to top
View user's profile Send private message
crayzbeef
Expert Cheater
Reputation: 0

Joined: 21 Jan 2007
Posts: 101

PostPosted: Fri Mar 06, 2009 2:44 am    Post subject: Reply with quote

It's good practice to use / because \\ isn't multi-platform.
Back to top
View user's profile Send private message
Zand
Master Cheater
Reputation: 0

Joined: 21 Jul 2006
Posts: 424

PostPosted: Fri Mar 06, 2009 4:09 am    Post subject: Reply with quote

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
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Fri Mar 06, 2009 2:56 pm    Post subject: Reply with quote

crayzbeef wrote:
It's good practice to use / because \\ isn't multi-platform.


Are you stupid?
Back to top
View user's profile Send private message
mushiehunter
Master Cheater
Reputation: 0

Joined: 29 Jan 2007
Posts: 322

PostPosted: Tue Mar 17, 2009 8:03 am    Post subject: Reply with quote

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