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] A question
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Mon Nov 19, 2007 2:18 pm    Post subject: [Delphi] A question Reply with quote

Hey.
I want my delphi program to run a .exe file from Programs and Files.
But since theres a lot different Programs and files folders, like Programmer (in my case).
Is there some code thats made for Programs and Files?
I hope you understand what I mean.
Back to top
View user's profile Send private message
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Mon Nov 19, 2007 2:28 pm    Post subject: Reply with quote

Programs and file or Program Files?
All you have to do is load the exe, I don't think you will have the same name for an exe (or is the problem it takes to long to find it?)

_________________
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Mon Nov 19, 2007 2:30 pm    Post subject: Reply with quote

Well, Im gonna make a launcher for WoW.
So it has to go to C:\Programs and Files\World of Warcraft\.
But theres different folders, in my case its.
C:\Programmer\World of Warcraft\.
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Mon Nov 19, 2007 2:33 pm    Post subject: Reply with quote

do a recursive search for WoW.exe on all drives
_________________
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Mon Nov 19, 2007 2:39 pm    Post subject: Reply with quote

appalsap wrote:
do a recursive search for WoW.exe on all drives

Wouldnt that be kinda stupid when its a launcher?
If you have to search for the WoW.exe all the time you start the launcher.
But if thats a good way, you got any code?
Back to top
View user's profile Send private message
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Mon Nov 19, 2007 2:41 pm    Post subject: Reply with quote

How bout you use common dialog to let the user choose the exe?
_________________
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Mon Nov 19, 2007 2:42 pm    Post subject: Reply with quote

World Of Warcraft is an installed game which usually leads to having install paths and such stored in the registry (at the same location for everyone) that will point to the path of the game. You could try using that instead.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Mon Nov 19, 2007 2:42 pm    Post subject: Reply with quote

Please explain some more Smile
Ive just come from VB6 to Delphi. Heh
Back to top
View user's profile Send private message
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Mon Nov 19, 2007 2:44 pm    Post subject: Reply with quote

Or you can make a document (text document) and have them put in a url and just load it, although it will look awkward Rolling Eyes

I can help you do common dialog with vb6, not delphi though

_________________
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Mon Nov 19, 2007 2:45 pm    Post subject: Reply with quote

That could be an idea Smile.
Back to top
View user's profile Send private message
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Mon Nov 19, 2007 2:50 pm    Post subject: Reply with quote

If your project has an installer to it, you could have the user specify the path of their installed WoW, and then have it save in a file for later use (such as loading the game, and it could be edited easily with notepad if the user changed directories)
_________________
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Mon Nov 19, 2007 3:02 pm    Post subject: Reply with quote

Blader wrote:
If your project has an installer to it, you could have the user specify the path of their installed WoW, and then have it save in a file for later use (such as loading the game, and it could be edited easily with notepad if the user changed directories)


No need to get that nuts lol. Can just use an ini or another style of a configuration file (xml, cfg, etc.) and have the user define the path inside it. You can create a GUI to point to the location and save it into that file as well.

I suggest you take a look into your registry though before taking extreme measures as I can almost guarantee you the install path for a game such as WoW should be there.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Mon Nov 19, 2007 3:04 pm    Post subject: Reply with quote

Hehe
It's easier then looking inside the registry o.o

_________________
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Nov 19, 2007 3:43 pm    Post subject: Reply with quote

Or, make it a Dynamic launcher:

Give it three forms:

Main,
Config,
Launcher

~~

Main - contains buttons to pop up the Config, and the Launcher; this runs on startup

~~

Config - from here, the user specifies which programs he/she wants to run, and the respective directories; the Config will write these out to an INI file:

Code:

WOW.exe C:\Programmer\World of Warcraft
Freecell.exe C:\Windows\System32


~~

Launcher - there is a button, and a table which has two columns, an exe name, and a path; when the form loads, it opens up the .ini file (if it exists), and reads in the data; the button launches the application respectively selected in the table

~~

As a programmer, you should know exactly what you want to do. That should help you out.
Back to top
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Mon Nov 19, 2007 4:13 pm    Post subject: Reply with quote

Add 'Registry' to your uses list. Use the system registry to find where the file is installed. Or, you can use an open dialog and let the user search for the file. Then, add ShellAPI to your uses list. Use ShellExecute() to start the program using SW_SHOW as the last flag.
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
Goto page 1, 2  Next
Page 1 of 2

 
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