Post by jfb on Mar 13, 2007 14:26:03 GMT -5
To anyone interested,
Here is an updated version of my Utility Launcher program...
This is version 1.0, if you will. The button layout is different than the previous (so called, development) version. I think it is now less confusing, more intuitive. As I make improvements, I'll post them to this thread. Also, I've made a fairly nice icon for this program, if anybody is interested, I suppose I could email it to you (or something like that)...
If anybody else wants to make changes or improvements, thats great. Please post them to this thread...
So, here it is, with no fluff, the TW version of Utility Launcher: The idea is to load a list of frequently used utilities where they can be run and stored under one (1) desktop icon. I have been using my JB version of this program for awhile now and I find it quite handy. But I am using this TW version more and more. The TW code is quite a bit different than the JB code, but in some ways it is much cleaner. And the final TW result is, of course, much smaller than the JB version...
(If I must say so myself: this is some beautiful code...)
(I see that my code structure is lost in this posting, oh well, its beautiful code on my end...)
Hint: don't use/click/depend on the Listbox too much to navigate; it gets confusing...
Thanks,
JFB
Here is a link to the current JB version:
justbasic.conforums.com/index.cgi?board=shared&action=display&num=1168759617
Here you can download a fully compiled (working) version of this program:
www.jfbpage.com/
Here is an updated version of my Utility Launcher program...
This is version 1.0, if you will. The button layout is different than the previous (so called, development) version. I think it is now less confusing, more intuitive. As I make improvements, I'll post them to this thread. Also, I've made a fairly nice icon for this program, if anybody is interested, I suppose I could email it to you (or something like that)...
If anybody else wants to make changes or improvements, thats great. Please post them to this thread...
So, here it is, with no fluff, the TW version of Utility Launcher: The idea is to load a list of frequently used utilities where they can be run and stored under one (1) desktop icon. I have been using my JB version of this program for awhile now and I find it quite handy. But I am using this TW version more and more. The TW code is quite a bit different than the JB code, but in some ways it is much cleaner. And the final TW result is, of course, much smaller than the JB version...
(If I must say so myself: this is some beautiful code...)
'Utility Launcher, by James F. Bays, March 2007
'Updated to version 1.0, April 2007
window mainWindow, "Utility Launcher", 50, 50, 400, 370;
'icon "ul3.ico";
static mainStaticText1, "Utility Up To Run", 30, 20, 354, 20;
static mainStaticText2, "Utilities List", 30, 85, 52, 20;
textbox mainTextbox, "", 30, 45, 328, 25;
listbox mainListbox, "", 30, 110, 328, 140;
button mainButtonRun, "Run", 30, 255, 218, 30;
button mainButtonSkip, "Skip", 257, 255, 100, 30;
button mainButtonAdd, "Add Item", 30, 305, 90, 20;
button mainButtonRemove, "Remove Item", 128, 305, 90, 20;
button mainButtonAbout, "About", 288, 305, 70, 20;
endgui;
array string u[20];
string utility, path, item;
string c1, c2, c3, c4, c5, c6, c7, c8, c9, c10;
int result, count, c, writeResult, run, compare;
path = "C:\\";
openfileread path & "list.txt";
do;
readfile utility, result;
if result <> 0;
additem mainListbox, utility;
u[count] = utility;
count = count + 1;
endif;
loop until result == 0;
settext mainTextbox, u[0];
closefile;
sub mainButtonAddClick;
if count >= 20;
messagebox "Utility List Is Full (20).";
else;
getopenfilename utility;
len utility, result;
if result <> 0;
u[count] = utility;
additem mainListbox, u[count];
if count == 0;
settext mainTextbox, u[count];
endif;
gosub saveList;
if writeResult == 0;
messagebox "Error: Failed To Write List.";
endif;
else;
messagebox "No Utility Was Chosen.";
endif;
endif;
count = count + 1;
endsub;
sub mainButtonRemoveClick;
len u[run], result;
if result <> 0;
questionbox "Remove This Utility From The List? \n" & u[run], result;
if result == 6;
do;
u[run] = u[run + 1];
len u[run], result;
run = run + 1;
loop until result == 0;
gosub saveList;
messagebox "Program Must Be Restarted To Save Changes.";
end;
endif;
else;
messagebox "Create A Utility List First.";
endif;
endsub;
sub saveList;
c = 0;
openfilewrite path & "list.txt";
do;
len u[c], result;
if result <> 0;
writefilepad u[c], writeResult;
c = c + 1;
endif;
loop until result == 0;
closefile;
endsub;
sub mainButtonAboutClick;
c1 = " Utility Launcher (TW Version) 1.0 ";
c2 = "\n by James F. Bays (2007) ";
c3 = "\n ";
c4 = "\n Thistle-Win Language v. 1.4 ";
c5 = "\n(c) Thomas and Alyce Watson (2005) ";
c6 = "\n ";
c7 = "\n FASM Assembler/Linker ";
c8 = "\n(c) Thomasz Grysztar (1999-2005) ";
c9 = "\n ";
c10 = "\n All Applicable Rights Reserved ";
messagebox c1 & c2 & c3 & c4 & c5 & c6 & c7 & c8 & c9 & c10;
endsub;
sub mainListboxClick;
getitem mainListbox, item;
compare = 0;
do;
stringcompare u[compare], item, result;
if result == 0;
settext maintextbox, item;
run = compare;
exitdo;
else;
compare = compare + 1;
endif;
loop while compare < 20;
endsub;
sub mainButtonRunClick;
len u[run], result;
if result <> 0;
runfile u[run], "";
gosub mainButtonSkipClick;
else;
messagebox "Create A Utility List First.";
endif;
endsub;
sub mainButtonSkipClick;
run = run + 1;
if run >= 20;
run = 0;
endif;
len u[run], result;
if result == 0;
run = 0;
endif;
settext mainTextbox, u[run];
endsub;
(I see that my code structure is lost in this posting, oh well, its beautiful code on my end...)
Hint: don't use/click/depend on the Listbox too much to navigate; it gets confusing...
Thanks,
JFB
Here is a link to the current JB version:
justbasic.conforums.com/index.cgi?board=shared&action=display&num=1168759617
Here you can download a fully compiled (working) version of this program:
www.jfbpage.com/