ADSIC talk:Editing Manual and Tutorial

From AcaDec Scores and Information Center
Jump to navigationJump to search

New Table Generator[edit]

Since Stanley (and others I'm sure) was having such troubles with my pos table convertor, I figured I'd just quickly write a web-based one to make things a little easier. It can be found here. My question is, since this does what we need, should I go around the site and get rid of all the evidence of my previous VB disaster or just leave it in place? I'm not saying this needs to be a new standard, but it's certainly more convenient than the current system of saving the script as a vbs file, creating in.txt, running the script, copy and pasting, blah blah blah BLAH. Thoughts? It would be nice to get a site-wide editor approval on this. Also, if anyone has any requests/contributions/whatever just poke me. - Adam 01:52, 8 January 2008 (PST)

  • Amazing!! I have no idea how to create such sites...perfect for everyone! One quick note: the example input runs off the page; perhaps it should be placed below the input box (and moves down/disappears when the table is generated). Also, let's see if we can get this placed on the ADSIC website itself. Great job, Adam. --Oh, it's PHP...gotta learn that too. ---Collegebookworm
    • That's probably because your screen resolution is too low. I'll modify things a bit to accommodate those with 1024x768 resolutions. Also changed the color scheme a little to make it easier on the eyes. - Adam 14:42, 8 January 2008 (PST)
      • Actually I have 1280x1024...hmm, now it's showing properly, IDK why it was so wide before...perhaps your resolution is even larger?? - Collegebookworm
      • Adam has compensation issues. gil 19:14, 8 January 2008 (PST)
      • Getting rid of the old script is a good idea (new one is more straightforward, portable). I thought I gave you the FTP password too? gil 19:14, 8 January 2008 (PST)
      • You did, but I haven't the slightest idea where it is so I just found a nice free bannerless php-able host instead. Also, I'm not sure where I would have put it once I got into the ftp account anyway. But then again, I have yet to have a chance to snoop around in there anyway, so maybe it's pretty self explanatory. Anyway, this should do for now. You can move it if you want, or I can move it when/if you resend me the password. - Adam 01:24, 9 January 2008 (PST)

Old Stuff[edit]

Since I am techie impaired, can someone please tell me how to save things with a .vbs extension on windows XP? Drewagon 21:52, 13 June 2007 (PDT)

  1. Open up Notepad (Start > All Programs > Accesories ).
  2. Copy and paste the code into Notepad.
  3. Go to File > Save As
  4. Go to Save As Type > All Files
  5. Click on the "File name" text box.
  6. Type the name of the file to save it as (doesn't really matter... Score automator... Fluffy cows... whatever)
  7. Lastly, make sure to include .vbs at the end of your file name
  8. Then just hit "Save" and you're good to go
  • I'll see what I can do about turning this into an executable thus making it more user-friendly. Also, I need to make it a little more intelligent. At the moment it's rather lame.

- Adam 09:05, 19 June 2007 (PDT)

  • I got the VBScript to create Wikitable Sortables, and this script is no longer than the existing one.

EDIT: oh! and are the existing tables already being converted? My User:Collegebookworm page hadn't yet, so I ran it through the formula. Seems to have worked just fine.

dim fso, oread, owrite, path
set fso = createobject("scripting.filesystemobject")
path = Left(WScript.ScriptFullName, Len(WScript.ScriptFullName) - Len(WScript.ScriptName))
set oread = fso.opentextfile(path + "in.txt", 1)
blah = oread.readall
tmp = split(blah, vbCrLf)
set oread = nothing
set owrite = fso.opentextfile(path + "out.txt", 2, true)

owrite.writeline "{| class = ""wikitable sortable"" "

for i = 0 to ubound(tmp)
	if i = 0 then 
		ntmp = replace(tmp(i), vbtab, vbCrLf + "! style=""background:#cccccc;text-align:center"" | ")
		ntmp = "! style=""background:#cccccc;text-align:center"" | " + ntmp
		owrite.writeline ntmp
	elseif i = 1 then 
		ntmp = replace(tmp(i), vbtab, vbCrLf + "| ")
		ntmp = "|- " + vbCrLf + "| style=""background:#ffcc33"" | " + ntmp
		owrite.writeline  ntmp
	elseif i = 2 then
		ntmp = replace(tmp(i), vbtab, vbCrLf + "| ")
		ntmp = "|- " + vbCrLf + "| style=""background:#8995a9"" | " + ntmp
		owrite.writeline  ntmp
	elseif i = 3 then
		ntmp = replace(tmp(i), vbtab, vbCrLf + "| ")
		ntmp = "|- " + vbCrLf + "| style=""background:#bb8f60"" | " + ntmp
		owrite.writeline  ntmp
		ntmp = replace(tmp(i), vbtab, vbCrLf + "| ")
		ntmp = "|- " + vbCrLf + "| " + ntmp
		owrite.writeline  ntmp
	end if
	ntmp = ""

owrite.writeline "|}"

set owrite = nothing
set oread = nothing
set fso = nothing