Page 1 of 1
Code sharer
Posted: Mon May 12, 2014 4:54 pm
by MaxV
Hello,
I'm writing a software to share Livecode scripts with syntax highlithing. I obtained my goal on HTML, now I'm upgrading it with phpbb version (like this forum). This is a possible result:
on mouseUp
#copy text
set the text of field field1 to temp
copy word 1 to -1 of field field1
set the visible of field "avviso" to true
wait 1 second
set the visible of field "avviso" to false
end mouseUp
Do you have any idea to mantain code indentation (spaces)?

Re: Code sharer
Posted: Mon May 12, 2014 7:00 pm
by magice
I'm not sure if this will work or not, but maybe something like this:
Code: Select all
replace space with " " in myVariable
Re: Code sharer
Posted: Tue May 13, 2014 10:35 am
by MaxV
No, it works only on html, not on this forum.
Re: Code sharer
Posted: Tue May 13, 2014 12:21 pm
by LCNeil
Hi Max,
Its a great idea to have code indentation in forum post. Unfortunately, the default phpBB install does not support indentation/tabs but I have since added a custom indent BBCode that allows indentation. This is should now be available from the custom BBcode menu bar. If you wish to add this to your LiveCode script, the following is the code used
Please see below your script with indentation applied-
on mouseUp
#copy text
set the text of field field1 to temp
copy word 1 to -1 of field field1
set the visible of field "avviso" to true
wait 1 second
set the visible of field "avviso" to false
end mouseUp
Kind Regards,
Neil Roger
--
RunRev Support Team ~
http://www.runrev.com
——
Re: Code sharer
Posted: Tue May 13, 2014 4:04 pm
by MaxV
PERFECT! Great idea! Thank you!
You can see the result here:
http://forums.runrev.com/viewtopic.php?f=9&t=20389
Re: Code sharer
Posted: Tue May 13, 2014 4:40 pm
by MaxV
Today I can't upload script on
http://livecodeshare.runrev.com/ (using revonline), however the stack
code sharer is here:
https://www.dropbox.com/s/a8ow1xk1iluln ... r.livecode
Re: Code sharer
Posted: Wed Nov 02, 2016 12:21 pm
by MaxV
LCNeil wrote:Hi Max,
Its a great idea to have code indentation in forum post. Unfortunately, the default phpBB install does not support indentation/tabs but I have since added a custom indent BBCode that allows indentation. This is should now be available from the custom BBcode menu bar. If you wish to add this to your LiveCode script, the following is the code used
...
Kind Regards,
Neil Roger
--
RunRev Support Team ~
http://www.runrev.com
——
Hi Neil,
what do you think of
http://qbnz.com/highlighter/ ? It's a mod for phpbb to add sytax highlighting to every code posted (it supports over 100 programming languages).
If you confirm me that it could be applied to this forum, I could start to work on the livecode parser file.
Please let me know
Re: Code sharer
Posted: Wed Nov 02, 2016 9:27 pm
by [-hh]
@MaxV
Great code, as always
@Neil
The new indent-tag is really useful, one now doesn't has to use this often lists.
For single lines I used option-space (this works, is effectively your ' ').
Hope you are fine (and the LC user offspring).