GUI for editing program file
Moderator: Forum Moderators
GUI for editing program file
How do I make a GUI that when opened, will have dropboxes, textboxes, etc, apply button at the bottom, that will allow me to change certain parameters/lines of a program file (which can be opened with notepad) once I click apply, rather than having to manually open the program and type in the changes each time.
Kinda like a program configuration GUI.
Like for example there is a line
movlw d'6'
I would like to have a textbox in the GUI where I can just type in the number I want to change d'6' to and when I click apply it will automatically edit the .asm file (which can be opened using notepad).
Kinda like a program configuration GUI.
Like for example there is a line
movlw d'6'
I would like to have a textbox in the GUI where I can just type in the number I want to change d'6' to and when I click apply it will automatically edit the .asm file (which can be opened using notepad).
- Elvish_Hunter
- Posts: 1575
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: GUI for editing program file
I must admit, I had to read your post several times to exactly understand what you were looking for. Then, I got it: what you want is the
In your case, if you want to replace d'6' with d'10', you'll have to type something like this in Bash:The -i switch tells the command to do the replacements in place (edit the original file); the exact command may vary depending on your needs, and one must always read the documentation and do a backup before copypasting code.
Now, I suppose that you're on Windows, since you're talking about Notepad: in this case, Windows users can get access to
sed
Unix command (it's not a GUI, though).In your case, if you want to replace d'6' with d'10', you'll have to type something like this in Bash:
Code: Select all
sed -i 's/movlw d\'6\'/movlw d\'10\'/' myfile.asm
Now, I suppose that you're on Windows, since you're talking about Notepad: in this case, Windows users can get access to
sed
either through Cygwin or the GnuWin32 projects.Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Re: GUI for editing program file
max_torch: You can also try using "find and replace" feature if notepad has that? It should be very close to what you asked for.
If notepad does not have that feature, you could try installing a better text editor. I guess it's common to recommend Notepad++ although I have no personal experience with that.
I can report that the ubuntu default text editor is more than adequate
If notepad does not have that feature, you could try installing a better text editor. I guess it's common to recommend Notepad++ although I have no personal experience with that.
I can report that the ubuntu default text editor is more than adequate
Re: GUI for editing program file
I like to use Geany, it is available on Linux, Windows and Mac.
Re: GUI for editing program file
max_torch:
I don't know how good your programming skills are, but i'd reccoment to change the programm (the one that you want to change) to have a textbox that lets you specify the value instead of hardcoding it in your source file.
I don't know how good your programming skills are, but i'd reccoment to change the programm (the one that you want to change) to have a textbox that lets you specify the value instead of hardcoding it in your source file.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: GUI for editing program file
You might look around for IDEs and apps which help you manage interfaces in the programming languages you are familiar with.
You might also check out Tcl/Tk as it’s easy to create interfaces with pure text files.
You might also check out Tcl/Tk as it’s easy to create interfaces with pure text files.
Wesnoth Bestiary ( PREVIEW IT HERE )
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer