Skip to main content
Inspiring
July 13, 2009
質問

Posting code

  • July 13, 2009
  • 返信数 6.
  • 9046 ビュー

I have just spent an exceedingly frustrating half-hour trying to post a few lines of JS to help out an Indesign user. I originally

tried via email; this worked, up to a point, except that some of the spaces used to format the code legibly appeared as HTML codes

at the forum and in the email notification. I then tried to edit the post and could not get the edit box to show what I put there. I

gave up and attached the code as a txt file.

Does anyone have a foolproof method of posting code at the forum?

Noel

    このトピックへの返信は締め切られました。

    返信数 6

    July 14, 2009

    that's ok. the love and undying devotion of my many fans are all the thanks i need!

    but i could use some evil minions. can you handle a death ray?

    July 14, 2009

    dave milbut wrote:

    that's ok. the love and undying devotion of my many fans are all the thanks i need!

    but i could use some evil minions. can you handle a death ray?

    Don't do it, he'll give you one of those "career chips" and if you've ever seen futurama--it hurts!

    July 14, 2009

    lol

    July 14, 2009

    wait a second! there's no points available for this thread! now i'm all demotivated, don'tchaknow. so ignore everything i've said here... or post a new thread with some shiny points and i'll post it again...

    July 14, 2009

    Quick, edit your posts and delete the answers so you can hold the information hostage to redeem for points!

    July 14, 2009

    sorry, but going back to my post 3 copying and pasting that code out to wordpad reveals unformatted text and it pastes clean with no extra chars. so i stand by my easy (easier) answer: click to get the html editor, surround your code with <pre></pre> and you're done.

    pwillener
    Legend
    July 14, 2009

    Instructions how to post code have also been discussed in this topic http://forums.adobe.com/message/2061677

    class HelloWorldApp {
        public static void main(String[] args) {
            System.out.println("Hello World!"); // Display the string.
        }
    }
    Ildhund作成者
    Inspiring
    July 14, 2009

    pwillener wrote:

    Instructions how to post code have also been discussed in this topic http://forums.adobe.com/message/2061677

    class HelloWorldApp {
        public static void main(String[] args) {
            System.out.println("Hello World!"); // Display the string.
        }
    }
     
    

    Thanks, Pat. I'd forgotten about that thread.

    To get what I've now got, I had to

    (a) Select 'Show Full Editor'

    (b) Click twice on the 'Quote' icon to get your post to appear in its own box

    (c) Click on the 'Insert' icon and select Syntax Highlighting > Java

    (d) Click twice on the resulting box to get a cursor inside it.

    (e) Paste (Ctrl-V on my Windows system) to place the contents of the clipboard inside the box.

    It was these dual clicks that were frustrating me. There is no indication at all that a click has done anything, and so many things at this site take so long to get processed that I've learnt to wait several seconds to see if something happens before doing anything else.


    class HelloWorldApp {     public static void main(String[] args) {         System.out.println("Hello World!"); // Display the string.     } }

    Now I'll have to submit this to see whether copying from the code box produces plain text or text with embellishments. I think I'm getting there.

    Noel

    pwillener
    Legend
    July 14, 2009

    Ildhund wrote:


    Now I'll have to submit this to see whether copying from the code box produces plain text or text with embellishments.

    No, copying from a post will copy all the formatting.

    I just clicked on the insert.png button, then selected Syntax Highlighting -> Java.

    July 13, 2009

    that seemed to work, and retain spaces (3 spaces before the indented "alert" statement).

    July 13, 2009

    save it to a text file and attach it? or better, host it on your own site and link to it. then you don't have to wait for it to sit queued.

    Ildhund作成者
    Inspiring
    July 13, 2009

    save it to a text file and attach it?

    That's what I ended up doing... It shouldn't be necessary, though. I just can't seem to get the order of clicking things right at

    the forum.

    Noel

    July 13, 2009
    It shouldn't be necessary, though.

    agreed. if it's code (and you specifically tell the system it's code!) then they shouldn't touch it!