FastLaunchSorter   |   About   |   Screenshots

		
localize
configfolder$="FastLaunchGUI"
configfolder_check$=system$("find /boot/apps/System/FastLaunchGUI/FastLaunchGUI\n")
configfolder_ready$=system$("basename "+configfolder_check$)
number=0
if(configfolder$=configfolder_ready$)then
else
	Outpu$=system$("mkdir /boot/apps/System/FastLaunchGUI")
fi
configfolder$="temp"
configfolder_check$=system$("find /boot/apps/System/FastLaunchGUI/temp\n")
configfolder_ready$=system$("basename "+configfolder_check$)
if(configfolder$=configfolder_ready$)then
else
	Outpu$=system$("mkdir /boot/apps/System/FastLaunchGUI/temp")
fi
button_copy1$=">"
button_copy2$="<"
button_copy3$="<<"
button_copy4$="- 00"
Programmname$="FastLaunchSorter"
Version$="1.2 / 05.10.2006"
Entwickler$="Christian Albrecht"
Nickname$="Lelldorin"
Url_Label$="BeSly Projects"
Url_Text$="http://www.besly.de"
Hpt_Fenster$=Programmname$
Lade_Fenster$=""
B_Breite = peek("desktopwidth")
B_Hoehe = peek("desktopheight")
F_Hoehe1=((B_Hoehe/2)-225)
F_Hoehe2=((B_Hoehe/2)+225)
F_Breite1=((B_Breite/2)-300)
F_Breite2=((B_Breite/2)+300)
F_minBreite=600
F_maxBreite=600
F_minHoehe=450
F_maxHoehe=450
Prg_Ordner$="/boot/apps/System"
Prg_Fenster()
dim part$(1)
inloop = true
while(inloop)
	msg$ = message$
	if (split(msg$, part$(), ":|") > 2) then
		PartOne$=part$(1)
		PartTwo$ = part$(2)
		PartThree$ = part$(3)
	fi
	if (split(msg$, part$(), ":|") > 3) then
		PartFour$ = part$(4)
	fi
	if (msg$ <> "") print msg$
	switch msg$
		case Hpt_Fenster$+":_QuitRequested|"
			window close Hpt_Fenster$
			window close "View_Ueber"
			window close "View_Hilfe"
		break
		case translate$(Hpt_Fenster$+":Program:Quit")+"|"
			window close Hpt_Fenster$
			window close "View_Ueber"
			window close "View_Hilfe"
		break
		case translate$("FastLaunchSorter:Program:About")+"|"
			ueber()
			break
		case "Beenden_View_Ueber|"
			window close "View_Ueber"
		break
		case translate$("FastLaunchSorter:Program:Help")+"|"
			hilfe()
		break
		case "Beenden_View_Hilfe|"
			window close "View_Hilfe"
		break
		case ">|"
			listbox add "listbox_right", item$
		break
		case "<|"
			listbox remove "listbox_right", val(PartThree$)
		break
		case "<<|"
			listbox clear "listbox_right"
		break
		case "- 00|"
			DROPBOX CLEAR "Number"
			n=0
			i=0
			n = listbox count "listbox_right"
			for i = 1 to n
				Item$= listbox get$ "listbox_right", i
				item_count$=right$(Item$, len(Item$)-2)
				Output$=system$("cp -d /boot/home/config/FastLaunch/"+"\""+Item$+"\""+" /boot/apps/System/FastLaunchGUI/temp/"+"\""+item_count$+"\"")
				Output$=system$("rm /boot/home/config/FastLaunch/"+"\""+Item$+"\"")
				Output$=system$("cp -d /boot/apps/System/FastLaunchGUI/temp/"+"\""+item_count$+"\""+" /boot/home/config/FastLaunch/"+"\""+item_count$+"\"")
			next i
			listbox clear "listbox_left"
			number=0
			auslesen()
			Output$=system$("rm -r /boot/apps/System/FastLaunchGUI/temp")
			Output$=system$("mkdir /boot/apps/System/FastLaunchGUI/temp")
			listbox clear "listbox_right"
		break
		case "sort|"
			DROPBOX CLEAR "Number"
			n=0
			i=0
			n = listbox count "listbox_right"
			for i = 1 to n
				number=number+1
				number$=str$(number)
				if(number<10)then
					number$=str$(0)+number$
				fi
				item_count$= listbox get$ "listbox_right", i
				Output$=system$("cp -d /boot/home/config/FastLaunch/"+"\""+item_count$+"\""+" /boot/apps/System/FastLaunchGUI/temp/"+number$+"\""+item_count$+"\"")
				Output$=system$("rm /boot/home/config/FastLaunch/"+"\""+item_count$+"\"")
				Output$=system$("cp -d /boot/apps/System/FastLaunchGUI/temp/"+number$+"\""+item_count$+"\""+" /boot/home/config/FastLaunch")
			next i
			listbox clear "listbox_left"
			number=0
			auslesen()
			Output$=system$("rm -r /boot/apps/System/FastLaunchGUI/temp")
			Output$=system$("mkdir /boot/apps/System/FastLaunchGUI/temp")
			listbox clear "listbox_right"
		break
		case "listbox_left:_Select:"+PartThree$+"|"
			n=0
			i=0
			n = LISTBOX COUNT "listbox_left"
			for i = 1 to n
				if(i = val(PartThree$)) then
					listbox select "listbox_left", i
					item$ = LISTBOX GET$ "listbox_left", i
					break
				fi
			next i
		break
		case translate$("FastLaunchSorter:FastLaunch:Activate")+"|"
			Outpu$=system$("open /boot/home/config/ZetaMenu/Preferences/ZETA\ Menu")
		break
		case translate$("FastLaunchSorter:FastLaunch:Open Directory")+"|"
			Outpu$=system$("open /boot/home/config/FastLaunch")
		break
		case "button1|"
			textedit clear "Text_Ausgabe"
			textedit add "Text_Ausgabe", translate$("Use this Button to copy a selected entry into memory.")
		break
		case "button2|"
			textedit clear "Text_Ausgabe"
			textedit add "Text_Ausgabe", translate$("Use this Button to delete an entry from the menory.")
		break
		case "button3|"
			textedit clear "Text_Ausgabe"
			textedit add "Text_Ausgabe", translate$("Use this Button to delete all entry´s from memory.")
		break
		case "button4|"
			textedit clear "Text_Ausgabe"
			textedit add "Text_Ausgabe", translate$("Then you press this Button the entry´s will be change in your FastLaunch Folder using numbers in front of the application names.")
		break
		case "Zahl:0|"
			textedit clear "Text_Ausgabe"
			textedit add "Text_Ausgabe", translate$("If you have allready sort your entry´s, you can add other entry´s past the sorted.")
			textedit add "Text_Ausgabe", "\n"
			textedit add "Text_Ausgabe", translate$("Select that number the last entry have, so the next one get the following number.")
		break
		case "Number:"+PartTwo$+"|"
			number=val(PartTwo$)
		break
		case "button5|"
			textedit clear "Text_Ausgabe"
			textedit add "Text_Ausgabe", translate$("With this Button you can cut the numbers from the sortet entry´s.")
			textedit add "Text_Ausgabe", "\n"
			textedit add "Text_Ausgabe", translate$("To do that copy the sortet entry´s to the memory and press the '-00' Button.")
		break
		case "button6|"
			textedit clear "Text_Ausgabe"
			textedit add "Text_Ausgabe", translate$("Add a new application into FastLaunch.")
		break
		case "button7|"
			textedit clear "Text_Ausgabe"
			textedit add "Text_Ausgabe", translate$("Delete a selected entry from FastLaunch.")
		break
		case "button_add|"
			Datei$ = FILEPANEL "Load-File", "Select Application", "/boot/apps"
			Output$=system$("ln -s "+Datei$+" /boot/home/config/FastLaunch")
			listbox clear "listbox_left"
			DROPBOX CLEAR "Number"
			auslesen()
		break
		case "button_delete|"
			n=0
			i=0
			n = LISTBOX COUNT "listbox_left"
			for i = 1 to n
				if(i = val(PartThree$)) then
					listbox select "listbox_left", i
					Datei$ = LISTBOX GET$ "listbox_left", i
					break
				fi
			next i
			Output$=system$("rm /boot/home/config/FastLaunch/"+Datei$)
			listbox clear "listbox_left"
			DROPBOX CLEAR "Number"
			auslesen()
		break
		default:
	end switch
	if(window count<1) inloop = false
	sleep 0.1
wend
sub Prg_Fenster()
	window open F_Breite1,F_Hoehe1 to F_Breite2,F_Hoehe2, Hpt_Fenster$, "BeSly Software - "+Programmname$
	window set Hpt_Fenster$, "MinimumTo", F_minBreite,F_minHoehe
	window set Hpt_Fenster$, "MaximumTo", F_maxBreite,F_maxHoehe
	draw set "bgcolor", 216,216,216, Hpt_Fenster$
	menu "Program", translate$("About"), "A", Hpt_Fenster$
	menu "Program", translate$("Help"), "H", Hpt_Fenster$
	menu "Program", translate$("Quit"), "Q", Hpt_Fenster$
	menu "FastLaunch", translate$("Activate"), "P", Hpt_Fenster$
	menu "FastLaunch", translate$("Open Directory"), "D", Hpt_Fenster$
	view 0,20 to 270, 400, "View_left", Hpt_Fenster$
	draw set "bgcolor", 216,216,216, "View_left"
	draw text 30, 30, "FastLaunch", "View_left"
	LISTBOX 30,40 TO 250,370, "listbox_left", 1, "View_left"
	BUTTON 30,410 TO 50,420, "button_add", "+", Hpt_Fenster$
	BUTTON 60,410 TO 80,420, "button_delete", "-", Hpt_Fenster$
	TOOLTIP "button_add", "Add new entry"
	TOOLTIP "button_delete", "Delete selcted entry"
	BUTTON 280,60 TO 320,70, button_copy1$, ">", Hpt_Fenster$
	BUTTON 280,100 TO 320,110, button_copy2$, "<", Hpt_Fenster$
	BUTTON 280,140 TO 320,150, button_copy3$, "<<", Hpt_Fenster$
	DROPBOX 275,180 TO 320,190, "Number", "", Hpt_Fenster$
	BUTTON 280,220 TO 320,240, button_copy4$, "- 00", Hpt_Fenster$
	TOOLTIP button_copy1$, "copy entry"
	TOOLTIP button_copy2$, "delete entry"
	TOOLTIP button_copy3$, "delete all entry´s"
	TOOLTIP "Number", "sort past number"
	TOOLTIP button_copy4$, "cut entry -00"
	view 330,20 to 600, 400, "View_right", Hpt_Fenster$
	draw set "bgcolor", 216,216,216, "View_right"
	draw text 20, 30, "Memory", "View_right"
	LISTBOX 20,40 TO 240,370, "listbox_right", 1, "View_right"
	BUTTON 250,410 TO 350,430, "sort", "sort", Hpt_Fenster$
	TOOLTIP "sort", "sort selected entry´s"
	auslesen()
end sub
sub ueber()
	REM ###### Fenstergröße #######
	F_Hoehe_Ueber1=((B_Hoehe/2)-100)
	F_Hoehe_Ueber2=((B_Hoehe/2)+100)
	F_Breite_Ueber1=((B_Breite/2)-100)
	F_Breite_Ueber2=((B_Breite/2)+100)
	window open F_Breite_Ueber1,F_Hoehe_Ueber1 to F_Breite_Ueber2,F_Hoehe_Ueber2, "View_Ueber", "About"
	window set "View_Ueber", "MinimumTo", 260,200
	window set "View_Ueber", "MaximumTo", 260,200
	window set "View_Ueber", "look", "modal"
	draw text 15, 25, "FastLaunch Sorter", "View_Ueber"
	draw text 15, 60, "Version:      ", "View_Ueber"
	draw text 130, 60, Version$, "View_Ueber"
	draw text 15, 80, translate$("Developer:      "), "View_Ueber"
	draw text 130,80, Entwickler$, "View_Ueber"
	draw text 15, 100, translate$("Nickname:      "), "View_Ueber"
	draw text 130, 100, Nickname$, "View_Ueber"
	draw text 15, 120, translate$("Homepage:      "), "View_Ueber"
	texturl 130,112, "Homepage", Url_Label$, Url_Text$, "View_Ueber"
	BUTTON 90,160 TO 170,180, "Beenden_View_Ueber", translate$("close"), "View_Ueber"
end sub
sub hilfe()
	REM ###### Fenstergröße #######
	F_Hoehe_Hilfe1=((B_Hoehe/2)-150)
	F_Hoehe_Hilfe2=((B_Hoehe/2)+150)
	F_Breite_Hilfe1=((B_Breite/2)-150)
	F_Breite_Hilfe2=((B_Breite/2)+150)
	window open F_Breite_Hilfe1,F_Hoehe_Hilfe1 to F_Breite_Hilfe2,F_Hoehe_Hilfe2, "View_Hilfe", "Help"
	window set "View_Hilfe", "MinimumTo", 300,300
	window set "View_Hilfe", "MaximumTo", 300,300
	window set "View_Hilfe", "look", "modal"
	BUTTON 10,20 TO 50,30, "button1", ">", "View_Hilfe"
	BUTTON 10,50 TO 50,60, "button2", "<", "View_Hilfe"
	BUTTON 10,80 TO 50,90, "button3", "<<", "View_Hilfe"
	BUTTON 10,110 TO 80,120, "button4", "sort", "View_Hilfe"
	DROPBOX 5,140 TO 50,150, "Zahl", "", "View_Hilfe"
	DROPBOX ADD "Zahl", "0"
	BUTTON 10,170 TO 50,180, "button5", "- 00", "View_Hilfe"
	BUTTON 10,200 TO 30,220, "button6", "+", "View_Hilfe"
	BUTTON 40,200 TO 60,220, "button7", "-", "View_Hilfe"
	textedit 100,20 TO 280,230, "Text_Ausgabe", 0, "View_Hilfe"
	textedit color "Text_Ausgabe", "bgcolor", 216,216,216
	textedit set "Text_Ausgabe", "editable", false
	textedit add "Text_Ausgabe", translate$("Press the buttons to get informations!")
	BUTTON 100,260 TO 200,280, "Beenden_View_Hilfe", translate$("Close"), "View_Hilfe"
end sub
sub auslesen()
	InhaltDatenbank$=system$("ls -G -1 /boot/home/config/FastLaunch")
	ndb=0
	db=0
	dim SplitDirDatenbank$(1)
	ndb = split(InhaltDatenbank$, SplitDirDatenbank$(), "\n")
	for db = 1 to ndb-1
		listbox add "listbox_left", SplitDirDatenbank$(db)
	next db
	n=0
	i=0
	DROPBOX ADD "Number", "0"
	n = LISTBOX COUNT "listbox_left"
	for i= 1 to n
		DROPBOX ADD "Number", str$(i)
	next i
end sub