AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AHK BBCodeWriter v7.0.2 - An offline BBCode Editor
Goto page Previous  1, 2, 3 ... 14, 15, 16, 17, 18, 19  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
AGU
Guest





PostPosted: Tue May 29, 2007 10:28 am    Post subject: Reply with quote

Hi cuzabis,

glad you made it. Very Happy

Yeah, thanks to Autohotkey it's not very difficult to make such changes. Glad you like my little BBCodeWriter. Smile

Some words about your font size code. You don't need the loop in your code, because you replace all [size=*] BBCodes at once by using "All" within every StringReplace command.

You can simply delete the loop within your code.

Code:
  ; Convert FontSize formatting ################################################

  ; Trial different forum sizing!

  StringReplace, bbcode, bbcode, [size=1]
      , <span style="font-size:8pt; line-height: normal">, All
  StringReplace, bbcode, bbcode, [size=2]
      , <span style="font-size:10pt; line-height: normal">, All
  StringReplace, bbcode, bbcode, [size=3]
      , <span style="font-size:12pt; line-height: normal">, All
  StringReplace, bbcode, bbcode, [size=4]
      , <span style="font-size:14pt; line-height: normal">, All
  StringReplace, bbcode, bbcode, [size=5]
      , <span style="font-size:18pt; line-height: normal">, All
  StringReplace, bbcode, bbcode, [size=6]
      , <span style="font-size:24pt; line-height: normal">, All
  StringReplace, bbcode, bbcode, [size=7]
      , <span style="font-size:36pt; line-height: normal">, All

  StringReplace, bbcode, bbcode, [/size], </span>, All



Yes, the center preview code is easy. Smile I'll add it to a future release of BBcodeWriter. So when anybody else wants to use a custom button for a center tag, the preview routine will already know how to handle it.
_________________________
Cheers AGU a.k.a. AGermanUser
Back to top
cuzabis



Joined: 29 Jun 2006
Posts: 45

PostPosted: Mon Jun 04, 2007 5:38 pm    Post subject: Reply with quote

thanks A german User Smile

another one I am gonna try and figure out is [indent]
Back to top
View user's profile Send private message
cuzabis



Joined: 29 Jun 2006
Posts: 45

PostPosted: Fri Jun 08, 2007 11:01 pm    Post subject: Reply with quote

One thing I never noticed before. The clipboard gets lost.

I notice I will have text in my clipboard, and I will highlight some text I want bolded, for example, when I click BOLD, it wraps the highlighted text in {b} {/b}, then I try to paste what was in my clipboard, but it is lost.

I think all you would need is something simple like Temp = %CLIPBOARD% just before each function, and then a Clipboard = %temp% after each function...

I just happened to notice it when I was doing a weblink...

Also I am making an online forum poster, well I made one, but it is too ugly to post on here LOL, basically you hit a hotkey like CTRL-B and it puts in the BBCode for bold, it detects if text is highlighted, if so it bolds the highlighted text and sets the cursor outside the [.b] and [./b], if no text is selected it puts the cursor between the tags....
I was thinking maybe I could show it to you sometimes, and you can help me clean it up a bit, make it more appealing...
The biggest thing I am proud of is my URL editor, which when posting A weblink it brings up an editor... I will post it for now, if you can maybe clean it up a bit it might make a good addon for AHKBBCODE Wink
Code:

; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ;;;;;;;;;;URL EDITOR!;;;;;;;;;;;;;;
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

^!l:: ; CTRL+ALT+L gets er' rollin
lasttext = %clipboard%
Clipboard :=
text :=
weburl :=
webname :=
weburl2 :=
webname2 :=
sleep, 100
send, ^c
ClipWait, 0
if ErrorLevel
{


    Send, [url][/url]{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}
clipboard = %lasttext%
    return
}


text = %clipboard%
sleep, 200
web = http
ifinstring, text, %web%
{
Gui, Font, S8 Cblack , Verdana
Gui, Add, Text, x22 y31 w122 h21 +Right, Enter WebURL:
Gui, Add, Edit, x146 y30 w130 h20 Vweburl, %text%
Gui, Add, Text, x26 y60 w117 h21 +Right, Enter Site Name:
Gui, Add, Edit, x146 y60 w130 h20 Vwebname,
Gui, Add, Button, x120 y92 w57 h20 , G0
Gui, Font, S11 Cred Bold, Verdana
Gui, Add, Text, x66 y0 w183 h20 +Center, Cuzabis' URL Editor

Gui, Show, x326 y233 h127 w300, URL Editor
Send, {TAB}
RETURN

ButtonG0:
Gui, Submit

    send, [url=%weburl%]%webname%[/url]
clipboard = %lasttext%
GUI, Destroy
    return
}



else
Gui, Font, S8 Cblack , Verdana
Gui, Add, Text, x22 y31 w122 h21 +Right, Enter WebURL:
Gui, Add, Edit, x146 y30 w130 h20 Vweburl2, http://
Gui, Add, Text, x26 y60 w117 h21 +Right, Enter Site Name:
Gui, Add, Edit, x146 y60 w130 h20 Vwebname2, %text%
Gui, Add, Button, x120 y92 w57 h20 , GO
Gui, Font, S11 Cred Bold, Verdana
Gui, Add, Text, x66 y0 w183 h20 +Center, Cuzabis' URL Editor

Gui, Show, x326 y233 h127 w300, URL Editor
clipboard = %lasttext%
return

ButtonGO:
Gui, Submit


send, [url=%weburl2%]%webname2%[/url]
clipboard = %lasttext%
GUI, Destroy
return
Back to top
View user's profile Send private message
Pastilhas



Joined: 16 May 2007
Posts: 4

PostPosted: Sat Jun 09, 2007 1:45 am    Post subject: Reply with quote

Hi all

I love your program Razz

I have some minor problem im Preview.
I'm trying to change link color to violet but AHK don't even preview, can you help plz.

Code:
[url=http://www.autohotkey.com/][color=****]this forum[/color][/url]

****=violet

It´s supposed to show:
this forum

Thx

Pastilhas.

Sorry for my bad English.
Back to top
View user's profile Send private message
AGU
Guest





PostPosted: Sat Jun 09, 2007 4:40 pm    Post subject: Reply with quote

@Pastilhas

I can confirm this is a bug. I'll fix it in the next version. Which version of BBCodeWriter do you use? The compiled one or the .ahk source scripts?

If you're using the scripts you could fix it meanwhile for your installation by moving the "color converting" passage within phpbb/BBCodePreview.ahk below the "Image formatting" passage. Smile

@cuzabis
Well, I know what you mean. BBCodeWriter makes extensive use of the clipboard. So you have to pay attention while using it. I adressed this issue within the program under "help - clipboard"

Actually this behaviour is intended. I don't know what you intended to do, but as for your weblink, I would just copy the weblink within your Browser window and then switch to BBCodeWriter.
Now press one of the two URL buttons and BBCodeWriter pasted a completely formatted URL.

This is how it was meant. Copy your content from whatever window you want and then press any formatting option you like, to paste the formatted content. e.g. lets say you wanted to paste a bold formatted text:

  • Copy your text from any source
  • simply press "Bold" within BBCodeWriter to pasted it correctly formatted.

With the help of the 'tag compose mode' (Ctrl key) you can even apply more than one formatting option.

So when using the clipboard, you have to pay attention to your workflow. Could you maybe describe in detail what you we're planning to paste, bold, ... the complete workflow.

Now to your URL editor
I cleaned it up a little bit. Take a look if you like:
Code:
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ; Title:    URL EDITOR!           ;
; ; Date:     09.07.2007            ;
; ; Author:   cuzabis               ;
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ScriptName = Cuzabis' URL Editor

#SingleInstance force
#Persistent
#NoEnv

; ### GUI ##############
  Gui, Margin, 5, 5
  Gui, Font, S11 cRed Bold, Verdana
  Gui, Add, Text, xm+55 ym +Center, %ScriptName%
  Gui, Font, S8 cBlack Norm, Verdana
  Gui, Add, Text, xm+20 yp+30, Enter WebURL:
  Gui, Add, Edit, xp+120 yp-2 w130 h20 vWebUrl
  Gui, Add, Text, xm+20 yp+30 w117 h21, Enter Site Name:
  Gui, Add, Edit, xp+120 yp-2 w130 h20 vWebName
  Gui, Add, Button, xm+115 yp+30 w60 h25 gBtnGo +Default, Go
Return

; ### gLabels ##########
BtnGo:
  Gui, Submit
  SendInput, [url=%WebUrl%]%WebName%[/url]
  ; Restore clipboard and free memory
  Clipboard := ClipSaved
  ClipSaved =
Return

GuiClose:
  Clipboard := ClipSaved
  ClipSaved =
 
  ; Clear controls
  GuiControl,, WebUrl
  GuiControl,, WebName

  Gui, Cancel
Return

; ### Hotkey ###########
^!l:: ; CTRL+ALT+L gets er' rollin
  ; Save clipboard content
  ClipSaved := ClipboardAll
 
  ; Clear all variables
  Clipboard   =
  ClipContent =
  WebUrl      =
  WebName     =
 
  ; Check for highlighted text
  Sleep, 100
  Send, ^c
  ClipWait, 0
  If ErrorLevel ; No text highlighted
  {
    SendInput, [url][/url]{Left 6}
    ; Restore clipboard and free memory
    Clipboard := ClipSaved
    ClipSaved =   
    Return
  }
 
  ClipContent = %Clipboard%
  Sleep, 200
  ; Check if URL starts with 'http'
  StringLeft, URLStartsWith, ClipContent, 4
  If URLStartsWith = http
  {
    Gui, Show, Center Autosize, %ScriptName%
    GuiControl,, WebUrl, %ClipContent%
    GuiControl, Focus, WebName
  }
  Else
  {
    Gui, Show, Center Autosize, %ScriptName%
    GuiControl,, WebUrl, http://
    GuiControl,, WebName, %ClipContent%
    GuiControl, Focus, WebUrl
    Send, {END}
  }
Return

________________________
Cheers AGU a.k.a AGermanUser
Back to top
Pastilhas



Joined: 16 May 2007
Posts: 4

PostPosted: Thu Jun 14, 2007 10:11 am    Post subject: Reply with quote

Thx AGU

you are the best Smile

I´m using "BBCodeWriter v7.0.2 Compiled + NSIS Installer".

I will wait for your next version.

Bye
Back to top
View user's profile Send private message
cuzabis



Joined: 29 Jun 2006
Posts: 45

PostPosted: Thu Jun 14, 2007 7:39 pm    Post subject: Reply with quote

thanks again AGU Smile

very nice

The forum I use also supports indent

so I made this
Code:
  ; Convert CENTER Formatting
  StringReplace, bbcode, bbcode, [center], <center>, All
  StringReplace, bbcode, bbcode, [/center], </center>, All

  ; Convert Indent #############################################################
  StringReplace, bbcode, bbcode, [indent], <blockquote>, All
  StringReplace, bbcode, bbcode, [/indent], </blockquote>, All


of course in there is my center tag as well, but that does an indent...

here is them working


maybe in the next version could you implement buttons for these?? or maybe tell me how I might go about adding buttons, rather then using my customs?
Back to top
View user's profile Send private message
lef
Guest





PostPosted: Tue Aug 07, 2007 2:17 pm    Post subject: Reply with quote

there must be a "#" sign in [ color=#hexvalue][ /color] section of BBCodePreview.ahk
Code:
StringReplace, bbcode, bbcode, % ColorWithTags, <span style="color: #%ColorWithoutTags%">, All
Back to top
pipster
Guest





PostPosted: Fri Sep 28, 2007 12:26 pm    Post subject: Italian Translation Reply with quote

Hi, very good tool! Very Happy
I done a complete Italian translation for the text files.
Here's what I have edited:
- lang\lang_it.ini
- text\it_bbcode.txt
- text\it_customize.txt
- text\it_shortcuts.txt
- text\it_tip.txt
- CustomTags.ini (just changed default tooltips)

I've uploaded a rar archive with all these translated file here:
http://www.divshare.com/download/2140204-624

Please, feel free to use/modify and include it in any BBCodeWriter release.

Anyway I think I've found a little bug.
The "H_Gui" value in the [GuiDimension] section of file BBCodeWriter.ini increments by 10 everytime I exit the prog.

This cause a strange behaviour in the main window:
the status bar become higher everytime I reopen the program.

Can you notice that?
Back to top
Jewels



Joined: 02 Jan 2008
Posts: 1

PostPosted: Wed Jan 02, 2008 6:10 pm    Post subject: Error when trying to compile main.ahk Reply with quote

I am trying to recompile the scripts after updating smilies... but I am getting an error:

Processing script file: "C:\Documents and Settings\Owner\Desktop\BBCodev702_Source\main.ahk"
Invalid command: SetKeyDelay,
Error in script "C:\Documents and Settings\Owner\Desktop\BBCodev702_Source\main.ahk" on line 46 -- aborting creation process

This was after I removed the version number from the top that was giving me an error. Could someone please help me get this figured out? I've been trying to get it to work for about 12 hours... Crying or Very sad Thanks in advance...

I tried to compile it with autohotkey & nullsoft. Just so you know....
Back to top
View user's profile Send private message
Hunter.nl
Guest





PostPosted: Thu Jan 10, 2008 11:59 pm    Post subject: Reply with quote

First thanks for this excellent script!

AGermanUser wrote:
(...from the changelog of 24.04.2007):

+ added Ctrl-Shift-End hotkey for restoring BBCodeWriter.ini - hotkeys.ahk

This one troubled me some time, when I pressed this very key combination to select all text from the cursor until the end. That's the default behaviour I expected... Well, I managed to fix it myself (set it to Ctrl-Alt-Shift-R[eset] to avoid doublures.) But perhaps others are running into this also. First I really hadn't a clue of what was going on. No popup warning (tip) and all text lost... So my suggestion is that you add a warning, and change the hotkey.

Hunter, The Netherlands
Back to top
Rodox
Guest





PostPosted: Mon Jan 14, 2008 5:10 pm    Post subject: Reply with quote

Hi, I just ran into this program from Google, congrats! Laughing

I made a Spanish translation for your program, save the code as lang_es.ini and save it in the "lang" folder =)

Code:
; Traducción al español hecha por Rodox
; rodolopezdato@gmail.com

; Language strings
[Data]
LangPrfx = es
LangName = Español

[Gui1Menu]
; MenuBar
lang_gui1_filemenu = &Archivo
lang_gui1_editmenu = &Editar

; File Menu
lang_gui1_open = A&brir      Ctrl+O
lang_gui1_savepost = &Guardar      Ctrl+S
lang_gui1_saveaspost = Guardar &como...
lang_gui1_savesig = Guardar como &firma      Ctrl+G
lang_gui1_pref = Prefere&ncias
lang_gui1_exit = &Salir

; Edit Menu
lang_gui1_undo = Des&hacer      Ctrl+Z
lang_gui1_cut = Co&rtar      Ctrl+X
lang_gui1_copy = Co&piar      Ctrl+C
lang_gui1_paste = Pe&gar      Ctrl+V
lang_gui1_delete = Eli&minar      Del
lang_gui1_select = Selecc&ionar todo      Ctrl+A
lang_gui1_clear = Limpiar por&tapapeles      Ctrl+F

; Help Menu
lang_gui1_shortcut = Ata&jos
lang_gui1_clipboarduse = Uso de por&tapapeles
lang_gui1_customize = Personali&zar
lang_gui1_bbcode = B&BCode personalizado
lang_gui1_update = Verificar ve&rsión
lang_gui1_about = &Acerca de...

[Gui1ToolTips]
lang_gui1_TTBold = Negrita
lang_gui1_TTItalic = Cursiva
lang_gui1_TTUnderline = Subrayado
lang_gui1_TTQuote = Cita
lang_gui1_TTCode = Código
lang_gui1_TTUrl = URL
lang_gui1_TTUrlDesc = URL Descriptivo
lang_gui1_TTEmail = E-Mail
lang_gui1_TTImage = Imagen
lang_gui1_TTColor = Color de fuente
lang_gui1_TTSize = Tamaño de fuente
lang_gui1_TTListNum = Lista numerada
lang_gui1_TTLetter = Lista alfabética
lang_gui1_TTListUnNum = Lista sin orden
lang_gui1_TTListElement = Elemento de lista
lang_gui1_TTSmileys = Smileys
lang_gui1_TTPinned = Siempre encima

[Gui1Subroutines]
lang_gui1_MsgExit = ¿Quieres guardar tu post antes de salir?
lang_gui1_MsgEditSig = Editar firmas resetea los controles de edición.~n~~n~Esto significa que perderás el contenido actual del control~n~en caso de que no lo hayas guardado recientemente.~n~~n~¿Estás seguro que quieres continuar?
lang_gui1_MsgDelSig = ¿Estás seguro de querer eliminar?
lang_gui1_MsgBtnReset = Resetear control de edición
lang_gui1_MsgOverWrite = Sobreescribir
lang_gui1_MsgOpenRecentFile = ¿Estás seguro de querer abrir?
lang_gui1_MsgOpenRecentFileError = Archivo no encontrado, bloqueado, inaccesible, o memoria insuficiente.
lang_gui1_MsgCheckUpdates = ¿Quieres buscar actualizaciones?~n~~n~Esto abre una conexión a internet e intenta descargar~n~"version.txt"
lang_gui1_MsgNewUpdates = Nueva actualización encontrada:~n~~n~          ->   AHK BBCodeWriter version
lang_gui1_MsgUpdateVisit = ¿Visitar "http://www.autohotkey.com" para descargar la nueva versión?
lang_gui1_MsgNoNewUpdate = Estás usando la última versión. :)

[Gui1Controls]
lang_gui1_ChkSignature = Firma
lang_gui1_BtnEditSig = Editar
lang_gui1_BtnDelSig = Elim.
lang_gui1_BtnSend = &Copiar
lang_gui1_BtnPreview = &Previs.
lang_gui1_BtnReset = &Resetear
lang_gui1_BtnCustomize = Customize

[Gui1Titles]
lang_gui1_TtlGui1 = Sin_nombre
lang_gui1_TtlOpenPost = Abrir post
lang_gui1_TtlSavePost = Guardar post
lang_gui1_TtlSaveSig = Guardar firma
lang_gui1_TtlMsgExit = Salir
lang_gui1_TtlMsgEditSig = Atención
lang_gui1_TtlMsgDelSig = Atención
lang_gui1_TtlMsgBtnReset = Resetear
lang_gui1_TtlMsgOverWrite = Atención
lang_gui1_TtlMsgOpenRecentFile = Atención
lang_gui1_TtlMsgOpenRecentFileError = Error
lang_gui1_TtlMsgCheckUpdates = Buscar actualizaciones

[Gui2Controls]
lang_gui2_TxtColor1 = Rojo oscuro
lang_gui2_TxtColor2 = Rojo
lang_gui2_TxtColor3 = Naranja
lang_gui2_TxtColor4 = Marrón
lang_gui2_TxtColor5 = Amarillo
lang_gui2_TxtColor6 = Verde
lang_gui2_TxtColor7 = Oliva
lang_gui2_TxtColor8 = Cian
lang_gui2_TxtColor9 = Azul
lang_gui2_TxtColor10 = Azul oscuro
lang_gui2_TxtColor11 = Índigo
lang_gui2_TxtColor12 = Violeta
lang_gui2_TxtColor13 = Blanco
lang_gui2_TxtColor14 = Negro
lang_gui2_BtnCustomColor = personalizado

[Gui2Titles]
lang_gui2_TtlGui2 = Seleccionar color de fuente

[Gui3Controls]
lang_gui3_DDLSize = Muy pequeño|Pequeño|NormalGrande|Enorme
lang_gui3_BtnSubmitUserDefinedSize = Enviar

[Gui3Titles]
lang_gui3_TtlGui3 = Tamaño de fuente

[Gui4Controls]
lang_gui4_TxtAddSmiley = Agregar Smiley:

[Gui4Titles]
lang_gui4_TtlGui4 = Smileys

[Gui5Titles]
lang_gui5_TtlShortcuts = Atajo
lang_gui5_TtlClipboard = Tip
lang_gui5_TtlCustomize = Personalizar
lang_gui5_TtlBBCode = BBCode personalizado

[Gui6Subroutines]
lang_gui6_MsgBrowserExe = Por favor indique una ruta al archivo .exe del navegador.

[Gui6Controls]
lang_gui6_GrpGeneral = General
lang_gui6_TxtFontSize = Tamaño de fuente
lang_gui6_TxtLanguage = Idioma:
lang_gui6_TxtBrowser = .EXE del navegador:
lang_gui6_TxtHistory = Historia:
lang_gui6_BtnClearHistory = Borrar historia
lang_gui6_GrpCstmBBCodeTags = Botones Personalizados
lang_gui6_ChkCstmBtns = Mostrar botones para tags de BBCode personalizadas
lang_gui6_BtnOK = OK

[Gui6Titles]
lang_gui6_TtlGui6 = Preferencencias
lang_gui6_TtlChooseBrowser = Elige tu .exe de navegador preferido
lang_gui6_TtlMsgBrowserExe = Atención

[Gui7Controls]
lang_gui7_TxtThread = thread relacionado en el foro de Autohotkey en inglés:
lang_gui7_TxtForumLink = www.autohotkey.com/forum
lang_gui7_TxtHomepage = Página Web de AHK BBCodeWrite
lang_gui7_TxtGPL = Este programa está licenciado bajo los términos y condiciones de la licensia GNU General Public License.~n~Puedes encontrar una copia de la licensia en "gpl.txt" en el directorio de los scripts.~n~El código fuente puede ser encontrado en el thread de arriba.~n~~n~Los smileys usados en este programa fueron tomados del proyecto phpbb (http://www.phpbb.com)~n~y están licensiados bajo la GPL.

[Gui7Titles]
lang_gui7_TtlGui7 = Acerca de...

[Gui8Titles]
lang_gui8_TtlGui8 = Agradecimientos especiales para:

[Gui9Titles]
lang_gui9_TtlGui9 = Configurar tags de BBCode personalizadas
lang_gui9_TtlOpenIcon = Elegir ícono (16px*16px)
lang_gui9_TtlMsgAssignIcon = Ruta de ícono incorrecta

[Gui9Subroutines]
lang_gui9_MsgAssignIcon = Tu icono preferido debe estar en el subdirectorio "./phpbb/ico" del programa.

[Gui9Controls]
lang_gui9_GrpCstmBBCodeTags = Tags de BBCode personalizadas
lang_gui9_TxtStartTag = StartTag:
lang_gui9_TxtEndTag = EndTag:
lang_gui9_TxtToolTipTag = Tooltip:
lang_gui9_TxtIcon = Icono:
lang_gui9_TxtEnable = Activar:
lang_gui9_BtnCstmSave = Guardar
Back to top
automaticman



Joined: 27 Oct 2006
Posts: 648

PostPosted: Sun Feb 17, 2008 8:27 pm    Post subject: Reply with quote

? Is this script also useful for short forum posts?
Having kind of standard for the posts might also help orienting much faster among the posts.
Back to top
View user's profile Send private message
LeifG
Guest





PostPosted: Sat Mar 22, 2008 6:05 pm    Post subject: AGU are you still developing BBCodeEditor ? Reply with quote

I was just wondering cause I want to customize it and I have some questions for you.

Regards

LeifG
Back to top
AGU
Guest





PostPosted: Sun Mar 23, 2008 5:02 am    Post subject: Reply with quote

Hi LeifG,

Well, I don't develop it actively at the moment because I don't have the time to do so. Sorry.

But BBCodeWriter is GPL. So anybody interested in futher developement can take the code and start working. Wink

But maybe I can help you with your questions?
________________________
Cheers AGU a.k.a AGermanUser
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3 ... 14, 15, 16, 17, 18, 19  Next
Page 15 of 19

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group