AutoHotkey Community

It is currently May 27th, 2012, 9:25 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 273 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11, 12, 13 ... 19  Next
Author Message
 Post subject:
PostPosted: July 23rd, 2006, 6:25 am 
...and finally:

Image


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 20th, 2006, 5:44 pm 
Offline

Joined: February 12th, 2005, 8:31 pm
Posts: 82
Ok, new version 6.5

Quote:
20.08.2006
+ changed preview.html in BBCodePreview.ahk - new logo to get smaller header (thx Mart)
+ fixed some minor errors in html code and style.css
+ using #IfWinActive directive inside hotkeys.ahk instead of old method
+ removed "clipboard flush" when starting the script - disadvantages outweighed the benefits
+ added drag&drop support for edit control (thx laszlo)
+ updated "Credits GUI"
+ updated OpenRecentFile subroutine - shows error if file cannot be found/was deleted
+ updated FontSize GUI - easier formatting with buttons instead of DropDownList - similar to ColorGUI


It took some time because I was busy. But now it's ready. ;)

Take a closer look at the drag&drop support. Don't know if it works perfectly.

_________________
Cheers
BBCodeWriterToDo-ListCopyPassage


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 20th, 2006, 5:58 pm 
Online
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
AGermanUser wrote:
+ removed "clipboard flush" when starting the script - disadvantages outweighed the benefits


Thanks! I wanted it .. I will upgrade to this version soon! :D

Regards, :)

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2006, 3:12 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
Nice work!

Concerning the caret size: As I wrote in my drag-post, there are two limitations with the method used in determining the size and position of the insertion caret:

(1) If the text is a single line, the position difference of the first and second line does not work (of course), so the script falls back to the default caret size.

(2) The used messages cannot move the caret after the last character in the edit control. The script detects this and moves the caret by other means, but there is no easy way to find the width of the last char, so again, a default width is used.

If you want general solutions, they are quite complicated, but in your case at least the first one is easier: When you read Preferences/EdtFontSize you know the size (eight), which can be used to set the height of the caret. If later you allow the user to dynamically change the display font, you still know the size, so there is no need for the script to determine it. Of course, there are some variations dependent on the font, so you should set the display font something fixed, like Tahoma or Verdana or MS Sans Serif. If you set it to Arial Unicode MS, it leaves a larger gap between lines.

You could read the font metrics from the font file, but I don't know the format. Maybe someone helps deciphering the font files. The flashing selection version of the text dragging script does not have the above problems, so it is easier (but uglier) to use.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2006, 4:19 pm 
Offline

Joined: November 3rd, 2005, 4:01 pm
Posts: 6
Hi AGU,

Great update!

This is an old problem that I finally got the time to look at. The current filename of a post is lost when the BBCodeWriter window is restored from the taskbar after the Copy button is pressed. The next Save following the restore does not work properly and needs to be a Save As to re-set the filename.

A suggested fix to the BtnSend subroutine is to change this
Code:
  Gui, 1:Show, Minimize, %ScriptName%
to this
Code:
  Gui, 1:Show, Minimize
or to be more conservative it could be changed to this
Code:
  WinGetTitle, Gui1WinTitle, %ScriptName%
  Gui, 1:Show, Minimize, %Gui1WinTitle%
In my usage there have not been problems with either change.

Cheers,
rf


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2006, 6:37 pm 
Offline

Joined: February 12th, 2005, 8:31 pm
Posts: 82
@roundfile
Thx. I'll look into it. I think I'll stick to your conservative solution. :)

@laszlo
Thx for having a look into it. I must have missed limitation #1 when reading the drag post. Sorry. I found out it was because of the fact that I just wrote one line when testing it.

Thank you also for making further thoughts about it. Nevertheless I decided to remove the drag&drop support within the next (soon-to-be released) version of BBCodeWriter because of many side effects/bugs that occured here on my system.

For example the buttons within the title bar won't be animated any more. It also crashed in some way that I couldn't click anything within the window. It was in highlighting mode all the time. I had to kill the process to get rid of BBCodeWriter.
So I came to the conclusion that it's very dangerous ;) to create Mouse hotkeys or that it brings at least unwanted side effects.
I have to accept that the edit control doesn't provide drag&drop support. Adding it will always be a workaround which might be buggy in some kind of way.
Maybe someday Chris will add another Gui control that supports drag&drop by design. Until then drag&drop will be on the todo list again. :mrgreen:

_________________
Cheers
BBCodeWriterToDo-ListCopyPassage


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2006, 9:37 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
It is surprising that there are side effects of mouse dragging. If the left button is pressed outside of an edit control, only the following is executed:
Code:
^LButton::                                               ; Duplicate-drag
LButton::                                                ; Move-drag HOTKEYS
   MouseGetPos mX, mY, Win, Ctrl                            ; Info about pointer location
   If (InStr(Ctrl,"Edit") <> 1) {                           ; Clicked not in Edit control
      Send {Blind}{LButton Down}                            ; Standard mouse action, ^ is kept
      Return                                                ; No drag
   }
Return

^LButton Up::                                            ; Selection moved at releasing button
LButton Up::
   SetTimer Cursor, OFF                                     ; Stop flashing selection, insertion point
   Splashimage Off                                          ; Remove insertion caret
   Send {Blind}{LButton Up}                                 ; Standard act, ^ kept (~LButton has bug)
   If (InStr(Ctrl,"Edit") <> 1 OR c < c1 OR c2 <= c)        ; Clicked not in Edit, or in selection
Return
You could try SendInput, SendPlay instead of Send ( = SendEvent), or leave SetKeyDelay to its default. If there are problems still, we have to tell Chris.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 22nd, 2006, 5:12 pm 
Offline

Joined: February 12th, 2005, 8:31 pm
Posts: 82
Next version 6.6

Quote:
22.08.2006
+ added another part to statusbar - shows used tags within ComposeMode
+ removed drag&drop support - too many side effect/bugs - sorry for that
+ updated MsgBox when exiting script - clipboard won't be restored anymore
+ added 'Check for updates' option to HelpMenu
+ fixed BtnSend subroutine - Window lost WinTitle when pushing 'Copy' button (thx roundfile)


I removed drag&drop support because it makes the script very unstable.

@Laszlo
I can't reset SetKeyDelay to default, because I need it within the script. Concerning the bugs that occured it's maybe a side effect of the complex script. I tried to reproduce it but wasn't successfull. Nevertheless the script crashed once.

Have you experienced the bugs with the animated buttons in the WinTitle? As you already described the current solution holds some limitations. As long as there's no stable, all-the-time working solution for drag&drop support I think I'll resign on it.

@roundfile
In the end I decided for your easy solution. Works well. Thanks again for reporting the bug.

_________________
Cheers
BBCodeWriterToDo-ListCopyPassage


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 9th, 2006, 3:27 pm 
this application is exactly what iam looking for, but for some reason the code is not interpreted while using the preview function

my original code looks like:
Code:
[b]Preflop:[/b] Hero is BB with K:spade:, T:heart:
[color:#666666][i]7 folds[/i], SB calls, Hero checks.

[b]Flop:[/b] (2.00 SB) K:club:, T:diamond:, 4:heart: [color:#0000FF](2 players)
SB checks, [color:#FF0000]Hero bets, SB calls.

[b]Turn:[/b] (2.00 BB) Q:spade: [color:#0000FF](2 players)
SB checks, [color:#FF0000]Hero bets, [color:#FF0000]SB raises, [color:#FF0000]Hero 3-bets, [color:#FF0000]SB caps, Hero calls.

[b]River:[/b] (10.00 BB) 2:spade: [color:#0000FF](2 players)
[color:#FF0000]SB bets, Hero calls.

[b]Final Pot:[/b] 12.00 BB


the preview result is:
Quote:
Preflop: Hero is BB with K , T
7 folds, SB calls, Hero checks.

Flop: (2.00 SB) K , T , 4 (2 players)
SB checks, Hero bets, SB calls.

Turn: (2.00 BB) Q (2 players)
SB checks, Hero bets, SB raises, Hero 3-bets, SB caps, Hero calls.

River: (10.00 BB) 2 (2 players)
SB bets, Hero calls.

Final Pot: 12.00 BB


please consider me as a stupid normal user, i am not a developer or similar:
do i need to make some settings to get the right interpretation for the codes, and if yes where?

every help is appreciated, thx


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 9th, 2006, 6:36 pm 
Offline

Joined: November 3rd, 2005, 4:01 pm
Posts: 6
Hi AGU,

A suggestion to improve the URL Descriptive feature is to use highlighted text, if any, as the URL link text. You may want to implement it differently but the code segment below illustrates the idea.

Code:
BtnUrlDesc:
  Gui +OwnDialogs 
  PasteURL =
  URLDescription =
  ;Check whether some text was highlighted
  GuiControl, 1:Focus, EdtComment
  Send, ^c
  If Clipboard is not space
    URLDescription = %Clipboard%
  Clipboard =
  Inputbox, PasteURL, Enter URL, e.g. http:`/`/www.google.com,,,120
  If Errorlevel = 0
    {
      Inputbox, URLDescription, Enter Linktext, e.g. Google,,,120,,,,, %URLDescription%
      Control, EditPaste, [url=%PasteURL%]%URLDescription%[/url], Edit1, %ScriptName%
      GuiControl, 1:Focus, EdtComment
    }
Return


Cheers,
rf


Report this post
Top
 Profile  
Reply with quote  
PostPosted: September 13th, 2006, 3:59 pm 
Hi all, first want to tell AGU that I use your script all the time and I love it. I'm a trainee at Bleepingcomputer.com learning how to help people when their machines get hijacked. I write all my posts with the BBCodewriter.

One thing I would like to customize is the way links are displayed in preview. On the Bleepingcomputer BB links are shown underlined and when the mouse hovers over them they change color like this.

Bleepingcomputer also supports a different set of smileys. I think I may be able to figure out how to customize that.

However, my knowledge of coding is almost non-existent, so I would very much appreciate it if one of the experts here could tell me in simple steps, how to change the way links are displayed on preview, as described above.

TIA --

Dave


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 13th, 2006, 9:28 pm 
@DaveM59

Thx for the compliment. :) About your links/urls:
Simply change style.css within the phpbb subfolder. Find the code
Code:
a.postlink:link   {text-decoration: none; color : #006699;}
a.postlink:visited {text-decoration: none; color : #5493B4;}
a.postlink:hover {text-decoration: underline; color : #DD6900;}
Simply change it to your needs. text-decoration is for the underlining and color is for the font color. Any questions?


Quote:
Bleepingcomputer also supports a different set of smileys. I think I may be able to figure out how to customize that.
Is it just other pictures for the same emoticons or do you have additional smiley strings?
The pictures for already existing smiley strings could be changed within BBCodePreview.ahk (You'll need the source code for this) starting at line 393. It's commented with
Code:
; Convert Smileys  ###########################################################


Change the URLs within the StringReplace commands and reference other smileys:
Code:
StringReplace, bbcode, bbcode, :arrow:, <img src="phpbb/smileys/icon_arrow.gif" alt="Arrow" />, All

This changes only the Preview mode.

To change the appearance of the GUI you would have to make changes to BBCodeEditor.ahk
The smiley icons are assigned beginning from line 1022
Code:
  ; Assign icons to buttons
  SetButtonGraphic(WinHandle, "1", A_ScriptDir "\phpbb\ico\smileys\icon_biggrin.ico", 16, 16, IMAGE_ICON)
  SetButtonGraphic(WinHandle, "2", A_ScriptDir "\phpbb\ico\smileys\icon_smile.ico", 16, 16, IMAGE_ICON)
  SetButtonGraphic(WinHandle, "3", A_ScriptDir "\phpbb\ico\smileys\icon_sad.ico", 16, 16, IMAGE_ICON)
  ...
You'll need .ico files for this.
Adding new smileys means more work to do. You would have to add code to GUI4. Adding more buttons, glabels, subroutines, copy the icons and gifs (for preview) within the correct folders, ...
Tell me if this is what you need. I'll try to explain the steps needed for this.

@roundfile
I'll check you suggestion. When I use the "URL descriptive" feature the URL is already copied to the clipboard so that I can paste it within the InputBox

Quote:
... is to use highlighted text, if any
You mean highlighted text within the edit control of the BBCodeWriter GUI?

@debakel3
I answered you posting in the german forum
___________________________
Cheers
AGU


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 13th, 2006, 10:24 pm 
Offline

Joined: November 3rd, 2005, 4:01 pm
Posts: 6
AGU wrote:
@roundfile
I'll check you suggestion. When I use the "URL descriptive" feature the URL is already copied to the clipboard so that I can paste it within the InputBox

roundfile wrote:
... is to use highlighted text, if any

You mean highlighted text within the edit control of the BBCodeWriter GUI?
Correct. I typically highlight the link text in the edit control, click URL Descriptive, then copy-and-paste the URL. Your use case is slightly different in that you already have the URL on the clipbooard. Maybe copying the highlighted link text could be delayed until after the Paste URL InputBox to keep your URL on the clipboard long enough to be pasted.

Cheers,
rf


Report this post
Top
 Profile  
Reply with quote  
PostPosted: September 13th, 2006, 10:35 pm 
Hello AGU,

Thanks very much for the reply. No questions regarding the preview appearance of links, that looks pretty simple. I'll work on it later today and let you know if I have any trouble.

The smileys are of several kinds. There are some where the same code shows a different smiley on screen. For example, :) Others that are in your set are not in the bleepingcomputer set, for example :D And then there are smileys that exist in that set, but not in yours, for example :cold: which shows the smiley face in a scarf and wool cap, shivering.

The steps you outlined seem pretty clear but I'll probably run into some difficulties trying to do them all, esecially the ones necessary to show the smileys correctly on preview. If I decide to attempt this customization I will ask for more detailed instructions.

I very much appreciate your willingness to help.

Cheers,
Dave


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 13th, 2006, 10:37 pm 
Aha :) now I understand. I'll check it and will come up with a solution. :mrgreen:
___________________
Cheers
AGU


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 273 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11, 12, 13 ... 19  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], nomissenrojb, SKAN, Stigg and 8 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group