Skip to main content
gamedev.net
🔒 Locked

automating processes

Started by Saberball 2 replies 1.2k views
Original Post
Saberball
Saberball
ok first off let me say that im not entirely sure that im posting this in the right area. Ok now to explain what i want to do. I want write a program in c++ that displays a grid of icons/images in a touchscreen display that I can touch to activate a process such as starting a group of programs or compile a program and then test it or something like that. The way I had thought to do this is create a display using c++/opengl/sdl. Then whenever I touch one of the buttons I would load and run the a script that would execute the appropriate commands. I understand that this may be a little difficult to understand seeing as im not good at explaining things so I'll give a few simple examples just to help people understand what im thinking. I have three displays two normal displays and one touch screen display. 1.) I want to open a Visual C++ 2005 project in one screen and internet explore open to a tutorial page or something im using to help in this project in another screen. So I touch the appropriate image on the touchscreen and run the appropriate script to do it. 2.) I have two Visual C++ 2005 projects open one in each screen. I want to compile the project in screen 1 and then run it through some test values. So I touch the appropriate image on the touchscreen and it runs the appropriate script to do that. 3.) I want to long into one of my schools linux computer so I run the appropriate script to launch putty and select ssh as well as the appropriate server and connect. Once its up I want to go to the project directory compile it and test it. Ok know that I've explained what I want to do its time to ask my actual question. First if this is how I would do this or if there's some other more efficient way in which to do it. Second which is mostly the scripting part I have a pretty good understanding of C++ so thats not a problem right now I just need to know what scripting language I should use and a link to a good tutorial for it. The last thing I can think of right now is: is there a easy way to run scripts from C++ or should I just run them as a shell from the program. Thanks in advance for any help or advice that you could give me.
Kylotan
Kylotan
The display part should be easy enough in SDL. You just need to load in the relevant graphics, draw them to the screen, and collect the input. I don't know how the touchscreens work, but I expect they're much like mice in terms of how you use them. All you then have to do is deduce which graphic they touched, and run the appropriate script.

Ask on the Alternative Game Libraries forum if you have any problems with the SDL part.

The scripting part of this could be done in pretty much any language but you may as well just use DOS/Windows batch files for it.

eg.
- to open this website in the default browser, put this in a batch file:
start http://www.gamedev.net
- to open a Putty session called 'Session':
"C:\Program Files\Putty\Putty" -load "Session"

However, getting Putty to perform certain commands when you log in is significantly more difficult, as is getting any given application to act in a certain way. If you absolutely need that sort of functionality then you may require some sort of macroing program.
ToohrVyk
ToohrVyk
Quote:
Original post by Kylotan
However, getting Putty to perform certain commands when you log in is significantly more difficult, as is getting any given application to act in a certain way. If you absolutely need that sort of functionality then you may require some sort of macroing program.


Putty lets you specify a remote command to be run. If you write a script on your linux box to handle the compiling and testing, then you only need to set up your session so that it runs exec scriptname.

Otherwise, see the -m command-line option.
Saberball
Saberball
Thanks for the help so far. I had thought about using batch files but wanted be able to automate process as well as loading applications. I think that I have found the language that I will probably use and it is Autoit. Ok time for a little more of discription of how I was thinking of doing this. First you would put all your scripts in a subdirectory of the applications folder called scripts. The program would then read in the names of all the files/folders in that directory and display them on images on the screen. When someone touched the image the program would call ShellExecute(...) on the script running it. This would essential be a control system/script manager. I have a pretty good idea as to how to accomplish most of this. However I am left with a few questions. (on a side note you could run any script and even shortcuts.)

The first question I have would be will ShellExecute work to run the script. Second is does anyone have any experience with Autoit and know of a good site with tutorials for it besides the home page. The last question at this point would be could someone point me in a direction to a tutorial or othe info on reading in all the files/folders names of a directory. Keep in mind I'd have to be able to determine if its a file or directory when reading it in so that I can determine what to do with them.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.