Jump to content

WBF convention card editor beta


Cascade

Recommended Posts

I am making a WBF convention card editor.

 

Here is the result of a card I have made for myself Sample System Card

 

You can create your own card here www.ebridgenz.com/wbfccinput.php

 

by filling in a few blanks.

 

It is in the very early stages of development. There are the following limitations:

 

1. Currently it only creates the front of the convention card

 

2. There is no way to save your input. Although at least in my browsers using the back button gets me back to the data i have previously entered so I can check what the card looks like and then make any changes that are necessary

 

3. If you enter too much text the boxes will overflow - there is no checking

 

4. I have had a bug that I have not really fixed where occasionally the card generation fails. This bug appears to be in some code that someone else wrote to generate the pdf. I have tried to implement a work around (hack) but I am not sure what the consequences of that might be - i'd be very surprised though if it deleted your hard drive or anything like that as the code is working on the remote server.

 

5. probably some other things that i have forgotten or not encountered yet

 

You can create suit symbols by entering !s !h !d !c just like you do on bbo. This applies to most but not all fields - i couldn't think why you might need those for leads etc.

 

You can enter a new line in a text field with the two character sequence /n I have used this to make the list in the Special Bids that may Require Defense section.

 

Any other questions feel free to ask I may even answer.

 

My plan is to in roughly the following order

 

1. Investigate how I can save the data for later retrieval and editing. Probably using a database

 

2. Create the second page of the convention card

 

3. Create supplementary note pages

 

4. Include some flexibility in the formatting e.g. expand and contract fields depending on how much space you require in each section; allow the user some control over the font size and maybe face etc

Link to comment
Share on other sites

I am quite surprised that this wheel has not already been invented.  Still, that being the case I am sure that it will be appreciated.

It has been already done, both sides. I have been using a convention card editor that includes the WBF card and 30 foreign cards for several years:

 

www.conventioncards.com

 

It was made by Lee Edwards. Last updated September 10, 2007.

 

Larry

Link to comment
Share on other sites

I have not been especially happy with the editors, I have tried so far. So until somebody comes up with something really nice (Wayne? B)), I'll stick to my word template. Much to be said for what you see is what you get, when you are typing.
Link to comment
Share on other sites

I have not been especially happy with the editors, I have tried so far. So until somebody comes up with something really nice (Wayne? B)), I'll stick to my word template. Much to be said for what you see is what you get, when you are typing.

I share your opinion. The current CC editors are either not flexible enough, or aren't working properly. I also use the Word template and I'm quite happy about it. Just create some macro's (if you haven't done so for your system notes) to show the suit symbols and the result is fine.

Link to comment
Share on other sites

I long since lost the template and with various computer upgrades no longer have the software either but several years ago I used do my CCs on Harvard Graphics, and then after that on Lotus Freelance. It provided more flexibility than most bespoke CC programs because you could adjust the font to cram in more detail where required, including forcing in an extra line of script. I suppose that these days you would use coreldraw or powerpoint for the same effect.
Link to comment
Share on other sites

The macros are pretty easy. I'm including below what I use. These give you the suit symbols with the hearts and diamonds symbols in red and they change the color back to black for continued typing. If you want to install these, I'll outline the steps for you. You can either save them into your normal.dot file to be used on all of your documents, or you can attach them to the individual files in a similar process so if you send them to your partner, he or she will have the macros attached to the file (this is what I typically do, although I doubt my partners notice).

 

Installing the Suit Symbol Macros

 

1) Open up Microsoft Word (if attaching to a particular file, open up this file specifically)

2) Hit ALT-F11 to open the Visual Basic Editor. On the upper left part of the screen you will see the Project Explorer.

3) In the Project Explorer you will see Normal and any other files you have opened (including your particular file if you are going that route). Right-click Normal (or your particular file) and select Insert --> Module. The module should open up.

4) Copy the text I'm including below into the module and Save the file. There's a save button in the Visual Basic Editor just as in the normal Word window.

 

That's basically it. However, you have to find a way to run the macros. I prefer shortcut keys and others like toolbars. Here are the steps for each:

 

Adding a Shortcut Key to a Macro in Word

 

1) Go to your Word Window (i.e. if you were in the Visual Basic Editor close it or change windows to Word). Right-click on the toolbar (anywhere really) at the top of your screen and select Customize... at the bottom of the right-click menu.

2) On the bottom you will see Save In:, and two buttons that read Keyboard... and Close. Make sure that the Save In: drop down is set to where you have save the macros. That is to say, if you put your macros in Normal, then the Save In drop down needs to say Normal. If you saved them in a particular file, then the Save In drop down needs to be pointing to that file. Click on the Keyboard... button.

3) On the left you will see a Categories Area and on the right you will see a Commands Area. In the Categories Area scroll down and Select Macros. Then in the Commands Area select one of the macros from below.

4) Click in the Press new shortcut key area and then type a keystroke. I use CTRL-ALT-S for spades, CTRL-ALT-H for hearts, etc. The important part to remember is that you want to assign a keystroke that is intuitive so that you can remember and you DO NOT want to assign a keystroke used for other items. So if you put in CTRL-S for example, then you wouldn't have that available for Save as you are overwriting the keyboard command.

5) Hit Assign (Enter will do the same) and repeat for each of the suit symbols. Then close and you're done.

 

Adding a Toolbar with the Suit Symbols

 

1) This is an alternative way to enter them if you prefer working with the mouse. Go to the toolbars area and right-click and select Customize...

2) In the Customize... window click on the Toolbars tab. Click on the New... button.

3) Give your toolbar a name (e.g. SuitSymbols) and then click where you want it available (e.g. in your Normal file if you want it available always or in the particular file you want).

4) This will bring up an empty toolbar. We need to then add buttons. So click on the Commands tab of the Customize window. You will see a Categories Area and a Commands Area.

5) In the Categories Area select Macros. Then in the Commands Area on the right you should see the four macros from below.

6) Here's the tricky part. Click on one of the macros and then drag it onto your new toolbar. Repeat for all of the suit symbols.

7) You are nearly done, but I prefer to tell you how to make the toolbar look a little bit better. Now while you're still in Customize mode (it won't work if you've closed the Customize window), right click on one of the buttons. You will see a new menu with lots of Options. I prefer to put in the name of the macro, e.g. &SpadeSymbol (I don't know why Word likes an ampersand in front, but it does), default style (which only shows the image and no text), and to change the button image to the suit symbol (word has built-in button images including a spade, heart, diamond and club picture).

8) Now you can close up all the customize boxes. You can drag your toolbar and anchor it above or you can leave it free floating. Your choice. Just make sure to save your work and when you close, if it asks you to save Normal, then make sure to click Yes.

 

Hope that helps some people!

 

Code for the Macros

 

Sub Spade_Symbol()

'

' Spade_Symbol Macro

'

Selection.Font.Color = wdColorAutomatic

Selection.InsertSymbol Font:="Symbol", CharacterNumber:=-3926, Unicode:=True

End Sub

 

Sub Heart_Symbol()

'

' Heart_Symbol Macro

'

Selection.Font.Color = wdColorRed

Selection.InsertSymbol Font:="Symbol", CharacterNumber:=-3927, Unicode:=True

Selection.Font.Color = wdColorAutomatic

End Sub

 

Sub Diamond_Symbol()

'

' Diamond_Symbol Macro

'

Selection.Font.Color = wdColorRed

Selection.InsertSymbol Font:="Symbol", CharacterNumber:=-3928, Unicode:=True

Selection.Font.Color = wdColorAutomatic

End Sub

 

Sub Club_Symbol()

'

' Club_Symbol Macro

'

Selection.Font.Color = wdColorAutomatic

Selection.InsertSymbol Font:="Symbol", CharacterNumber:=-3929, Unicode:=True

End Sub

Link to comment
Share on other sites

Instead of a macro another alternative in word is to use the autocorrect feature.

 

You can easily set it up to autocorrect !s etc for . You can use whatever keystrokes make the most sense to you. I used to use something else which I forget but have now changed to the bbo shortcut.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...