-
January 20th, 2010, 12:33 AM
#1
Using Config Files
Hello all,
I am currently in the process of figuring out a way to make a media program automatically open a file and change settings using a config file. I have the source code of the media program, and I know that I am going to need to alter it to read from a config file. I was wondering if anyone could tell me, or at least explain to me how to effectively use them. I am thinking that to make this happen, I need to set some new variables in the source code of the program, and after reading the config file, to use these new variables to hold the values. Then I could somehow simulate user actions to load the file and change settings. I know this isn't all very clear, but I was wondering if someone could give me a little information on config files, and what carriage returns are.
-
January 20th, 2010, 04:56 AM
#2
Re: Using Config Files
I recommend AutoIt. See http://www.autoitscript.com/autoit3/
Here is a script written for AutoIt:
Code:
Run("C:\foo_dir\foo.exe some_argument")
WinWaitActive("foo")
AutoItSetOption("SendKeyDelay", 50)
Send("Hello, world!{ENTER}")
Sleep(1000)
Send("How do you do?{ENTER}")
-
January 20th, 2010, 05:26 AM
#3
Re: Using Config Files
Originally Posted by olivthill2
I would recommend a good C++ programming book. The task at hand is not very hard to do.
-
January 20th, 2010, 05:33 AM
#4
Re: Using Config Files
Which one?
So far, I have not seen any good programming books about simulated keystrokes, mouse movement and manipulation of windows from other applications.
-
January 20th, 2010, 05:40 AM
#5
Re: Using Config Files
Originally Posted by olivthill2
Which one?
So far, I have not seen any good programming books about simulated keystrokes, mouse movement and manipulation of windows from other applications.
This post is not about simulating keypresses or something. It's about changing some sourcecode and reading settings from a file and applying them. If you have the sourcecode of a program you don't need to 'simulate' keyclicks, you can simply call the function that actually does the work.
-
January 20th, 2010, 06:02 AM
#6
Re: Using Config Files
Yes, you are right. Excuse me.
If you have the source code, you can read, parse a script file, and prepare a list of messages to be sent after WM_CREATE.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|