Announcement

Collapse
No announcement yet.

PrettyCommentContest? Nah.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • RizlaUK
    replied
    lmao, yea, you don't see much of the IR team since they hired Ulrich, no time to talk to us mere mortals, lol, unless someone steps out line and a warning needs to be issued

    HaHaHa (you know who you are)

    Leave a comment:


  • Imagine Programming
    replied
    Originally posted by RizlaUK View Post
    lol, true, i was just thinking "were hijacking everyone's threads" HaHaHA...... the pace of conversation, OMG its like being in my local with my *damaged* mates, lmao
    Haha well yes, let's tell them we're just trying to jam some life back
    into the conversations I havn't been at the pub with my mates for
    a while now, we should do that soon again lol

    Originally posted by RizlaUK View Post
    lol, yea, put it in the suggestions forum, but it will probably turn into a convo about yet more 'Random Gibberish', lmao
    Haha yeah, and then the IR moderator team (does it exist? YES IT DOES!) will probably erase it ^^

    Leave a comment:


  • RizlaUK
    replied
    lol, true, i was just thinking "were hijacking everyone's threads" HaHaHA...... the pace of conversation, OMG its like being in my local with my *damaged* mates, lmao

    They should rename 'General Chat' to 'Random Gibberish'
    lol, yea, put it in the suggestions forum, but it will probably turn into a convo about yet more 'Random Gibberish', lmao

    Leave a comment:


  • Imagine Programming
    replied
    Originally posted by RizlaUK View Post
    Code:
    You tought me well
    lol, yes Danielson, sand on, sand off
    Hahaha Oh my god, conversations take epic turns here, we were discussing
    the new game... well that thread turned into something random, now this thread
    is turning into something random, I love it

    They should rename 'General Chat' to 'Random Gibberish'

    Leave a comment:


  • RizlaUK
    replied
    Code:
    You tought me well
    lol, yes Danielson, sand on, sand off

    Leave a comment:


  • Imagine Programming
    replied
    Here's the source, I didn't copy the includes and stuff, just how I see it.
    So, it'll probably won't work for you
    Code:
    Procedure PrettyPrinter(szInput.s, szOutput.s, Overwrite.b, StripComments.b, *lpCallbackProcedure)
      Protected szCommandlineString.s = "", hFile, PrettyPrinter, PFlags, PString.s
      If(FileSize(szInput)<0)
        MessageBox_(WindowID(#Main),"Selected file could not be found!", "Error", #MB_ICONERROR)
        ProcedureReturn 0
      EndIf 
      Protected Script.s = FixedTempDir()+"HW2_PrettyPrinter.js"
      szCommandlineString = Enquote(Script) + " " + Enquote(szInput)
      If(Overwrite=0)
        szCommandlineString + " " + Enquote(szOutput)
      Else 
        szCommandlineString + " -o"
      EndIf 
      If(StripComments=1)
        szCommandlineString + " -s"
      EndIf 
      szCommandlineString + " -verbose"
      hFile = OpenFile(#PB_Any, Script)
      If hFile
        WriteData(hFile, ?HW2_PrettyPrinter, (?HW2_End-?HW2_PrettyPrinter))
        CloseFile(hFile)
      Else
        ProcedureReturn -1
      EndIf 
      PFlags        = #PB_Program_Open | #PB_Program_Read | #PB_Program_Hide 
      PrettyPrinter = RunProgram(FixedSys32Dir()+"cscript.exe", szCommandlineString, GetPathPart(szInput), PFlags)
      While ProgramRunning(PrettyPrinter)
        PString = ReadProgramString(PrettyPrinter)
        If PString
          If *lpCallbackProcedure And FindString(LCase(PString),"microsoft",1)=0 ;Screw them! :p It's the script I'm interested in!
            CallFunctionFast(*lpCallbackProcedure, PString) ; The callback procedure should recieve only 1 string.
          EndIf 
        EndIf 
      Wend 
      If *lpCallbackProcedure
        CallFunctionFast(*lpCallbackProcedure, "+OK Ready...")
      EndIf 
      CloseProgram(PrettyPrinter)
      DeleteFile(Script)
      ProcedureReturn 1
    EndProcedure

    Leave a comment:


  • Imagine Programming
    replied
    Originally posted by RizlaUK View Post
    HaHaHaha, was that meant to help

    1: Bas, that was evil

    2: @mystica, just to confuse you even more, something like this

    3: or, you could "JUST DO YOUR HOMEWORK!!"

    HAHAHA
    1: You tought me well Haha
    2: Hahahahaha XD
    3: Oh dam, I totally forgot that was even an option!

    Leave a comment:


  • RizlaUK
    replied
    I run the tempfile with cscript.exe, cscript.exe [script.js] [args]
    I run cscript.exe in #PB_Program_Open and #PB_Program_Read
    I use a While ProgramRunning(ProgramHandle) : dostuff : Wend to get the
    lines cscript outputs I put those in the listview control
    Need more?
    HaHaHaha, was that meant to help

    Bas, that was evil

    @mystica, just to confuse you even more, something like this

    program loop
    Code:
      ; Executes the PB compiler with the /? option and displays the output (windows version)
      ; For Linux/MacOS change the "/?" to "-h" and the "\" to "/" in the compiler path.
      ;
      Compiler = RunProgram(#PB_Compiler_Home+"\Compilers\pbcompiler", "/?", "", #PB_Program_Open|#PB_Program_Read)
      Output$ = ""
      If Compiler  
        While ProgramRunning(Compiler)
          Output$ + ReadProgramString(Compiler) + Chr(13)
        Wend
        Output$ + Chr(13) + Chr(13)
        Output$ + "Exitcode: " + Str(ProgramExitCode(Compiler))     
      EndIf
      MessageRequester("Output", Output$)
    datasection
    Code:
      DataSection
        MapLabel:
        IncludeBinary "Data\map.data"
      EndDataSection
    and you need to copy the datasection to disk with "CreateFile" and a few little pointer tricks

    @T3STY, stop asking people to make scripts for your homework
    Write yourself a script instead
    or, you could "JUST DO YOUR HOMEWORK!!"

    HAHAHA

    Leave a comment:


  • Imagine Programming
    replied
    Originally posted by mystica View Post
    [email protected], that was fast!
    Okay, so you did it in PB, yeh? But what principles did you use to go about it? Did you use command-line instructions inside the PB code, 'cause I can't figure on how you could employ a drag/drop scenario on the Jscript, especially from PB.
    Time to spill on the secret-details, Imagine. C'mon man, give it up! Or else I'll have to send ASIO around to torture you.
    Hahah I included the HW2_PrettyPrinter.js into the datasection, on conversion
    I write it to a tempfile which will later be deleted again

    I run the tempfile with cscript.exe, cscript.exe [script.js] [args]
    I run cscript.exe in #PB_Program_Open and #PB_Program_Read
    I use a While ProgramRunning(ProgramHandle) : dostuff : Wend to get the
    lines cscript outputs I put those in the listview control
    Need more?

    *Edit, on the go I reported a bug at Mikail
    Last edited by Imagine Programming; 03-14-2010, 02:27 PM.

    Leave a comment:


  • mystica
    replied
    Originally posted by Centauri Soldier View Post
    Nice comments buddy. Maybe you come over and paint my kitchen next.
    Originally posted by Imagine Programming View Post
    It'll be black and green then though :o
    Hahaha. I like it!




    Originally posted by Imagine Programming View Post
    Too late, I'm done
    clikyclick!
    [email protected], that was fast!
    Okay, so you did it in PB, yeh? But what principles did you use to go about it? Did you use command-line instructions inside the PB code, 'cause I can't figure on how you could employ a drag/drop scenario on the Jscript, especially from PB.
    Time to spill on the secret-details, Imagine. C'mon man, give it up! Or else I'll have to send ASIO around to torture you.
    Last edited by mystica; 03-14-2010, 01:48 PM.

    Leave a comment:


  • Imagine Programming
    replied
    Originally posted by Centauri Soldier View Post
    So I'm not the only one who programs with a black background. Doesn't it let the mind breathe a little more than the white?
    Oh yes, it's so lovely on the eyes. I configured all my scripting editors the same
    way, Notepad++, PB, AMS IR editor, AMS Editor, all black backgrounds

    @T3STY, stop asking people to make scripts for your homework
    Write yourself a script instead

    Leave a comment:


  • Centauri Soldier
    replied
    So I'm not the only one who programs with a black background. Doesn't it let the mind breathe a little more than the white?

    Leave a comment:


  • T3STY
    replied
    Originally posted by Imagine Programming View Post
    People, if possible, avoid doing stuff manually by
    writing a script for it XD
    Can you build a script that does my homework for me ?

    Leave a comment:


  • Imagine Programming
    replied
    Originally posted by Centauri Soldier View Post
    Nice comments buddy. Maybe you come over and paint my kitchen next.
    It'll be black and green then though :o

    Leave a comment:


  • Centauri Soldier
    replied
    Nice comments buddy. Maybe you come over and paint my kitchen next.

    Leave a comment:

Working...
X