OKScript Tip #1: Control-R We all know that CONTROL-R (i.e. holding down the CONTROL or "CTRL" key while touching the "R" key) allows us to talk back to the last person with whom we spoke privately. We can automate this by creating the following button: BUTTON Ctrl-R Black OKbridge ^r Note: this is a carot symbol, then an "r". Note also that there is no "{enter}" at the end of this line. This is so that you can DIRECT the text with this button, and then hit another button for the actual message that you're sending. This is particularly useful for saying "Thanks", "You're welcome" or "good-bye"...things that need to be said as quickly as possible so as to catch the person before they leave, or respond while their own remarks are still fresh. For this reason, you may wish to put this button very close to your "Bye", "You're welcome" and/or "Thanks" buttons, for fast access. This may be something like: BUTTON Thnx Olive OKbridge Thank you! :) {enter} BUTTON UrWlcm Red OKbridge You're welcome. :) {enter} BUTTON Ctrl-R Black OKbridge ^r BUTTON Bye! Green OKbridge Good-bye! {enter} ========================================================= OKScript Tip #2: ICQ You can make OKScript .OKS files that direct responses to your ICQ rather than to OKBridge. Just substitute "Send" where you would normally type: "OKbridge". This will help you reply quickly in your ICQ Message function. Try creating an .OKS file entitled "ICQ.OKS", with lines such as: PLACE 3 364 1 -1 BUTTON UrW Green Send You're welcome! :) {enter} BUTTON Thnx Red Send Thank you. :) {enter} BUTTON Bye! Navy Send Good bye! Hope to hear from you again soon! {enter} BUTTON GdNite Olive Send Good night. Sleep well! {enter} Hope you find this helpful. :) ========================================================= OKScript Tip #3: DELAYing Tactics Sometimes, we will want to DELAY part of a message. Typically, we'll be telling a prepared joke, and want to leave some time between the setup of the joke and its punch line. BUTTON Pre-Empts OKbridge "The only defence against a pre-empt..." {enter} PUT "...is an overbid!" :) {enter} This will put both lines onscreen more or less simultaneously. To delay the 2nd one, we will use the DELAY command, followed by a number expressing the number of THOUSANDTHS of seconds we'd like to pause. To illustrate: BUTTON Pre-Empts OKbridge "The only defence against a pre-empt... {enter} DELAY 2000 PUT ...is an overbid!" :) {enter} Here we see the "DELAY 2000" line pausing for 2 full seconds (i.e. 2,000 thousandths of a second) before the second line appears onscreen. In Tip #4, we will see another application of the DELAY command. ========================================================= OKScript Tip #4: Out of Spec Occasionally, we may find ourselves in a situation where we need to hop in and out of the Spectators' Loft after each hand. Our purpose might be to act as a commentator/coach, to congratulate the players on a fine bid or play, or to re-arrange the seating as a team captain. Getting into spec is no problem. We could simply design a button that says: BUTTON Spec Teal OKbridge /SPEC {enter} Getting OUT of spec can be tricky. The old slash command, "/SPEC OFF", doesn't work in the newer versions of OKWin. Instead, then, we will use the following button: BUTTON Out Black OKbridge ~L{down}{down}{down}{down}{down}{down}{down}{down}{down}{enter} Note: that is 10 "{downs}" followed by an {enter}, with no spaces anywhere after "~L". It should also be on one long line...not broken up into two or more, as you may see here. Once we hit this Out button, we'll see the usual reminder that we'll be allowed to come out of the Spectators' Loft only after completion of the hand. We normally would have to hit ENTER to remove this reminder message. But we can automate this, by DELAYING an enter to give the system time to process our request and flash the reminder onscreen. This gives us: BUTTON Out Black OKbridge ~L{down}{down}{down}{down}{down}{down}{down}{down}{down}{enter} DELAY 3000 Put {enter} The DELAY 3000 pauses for 3 full seconds. If your particular connection to OKBridge is a fast one, you can reduce this number down to 2000 or 1000. Note that there is only ONE space between "Put" and the "{enter}". Try this one out! :) ========================================================= OKScript Tip #5: Reminders When playing in tourneys (regular, Novice-Mentor or on Ambassador Day) we are expected to load a convention card and greet each new pair of opponents with a brief description of the system that we are using. BUTTON Hello Red OKbridge Hi, opps! SAYC here. {enter} The above line will accomplish the latter, but we might forget to load our convention card. We might also like to RECORD the hands for discussion immediately after the tourney (until the complete hand records arrive with our scores via email). We record hands by hitting "FILE" at the top left of our OKWin, then "RECORDING", and give the file a distint name ending in ".REC". Personally, I like to use the date for this: "06051999.REC" for June 5th, 1999, as an example. The trick, though, is to REMEMBER to load the convention card and turn on the recording! We could do this by showing ourselves a message whenever we hit the "Hello" button above. We start by defining a variable called "MyUserName" near the top of our .OKS file: Macro MyUserName Kaltica You would, of course, use your OWN OKBridge username instead of "Kaltica" here. Next we send a message to ourselves, jogging our memory. Our "Hello" button would now read: BUTTON Hello Red OKbridge Hi, opps! SAYC here. {enter} PUT -%MyUserName%{tab} Turn on Recorder and load cc! {enter} This solution works fine, except that now we will be reminded every round! One or two reminders should do, don't you think? We *could* go into our .OKS file to put a hyphen before the PUT line, turning it into a mere remark: BUTTON Hello Red OKbridge Hi, opps! SAYC here. {enter} - PUT -%MyUserName%{tab} Turn on Recorder and load cc! {enter} The problem with this solution is that we would have to remember to REMOVE that hyphen before we used our .OKS file again. Reminders are for those of us who FORGET, not for those who REMEMBER to do things! :) The answer is to have a variable called "Reminder". When it is ON, we ARE reminded. When it is OFF, we are no longer annoyed with these messages. We start by adding the following lines near the top of our .OKS file: Macro Reminder On Menu Pd|Reminder|On OKbridge Let Reminder On PUT -%MyUserName%{tab}Reminder is now set to %Reminder%. {enter} Menu Pd|Reminder|Off OKbridge Let Reminder Off PUT -%MyUserName%{tab}Reminder is now set to %Reminder%. {enter} The "Macro Reminder On" line creates the Reminder variable, and turns it ON by default. The Menu and Let lines add an option to our "Hi" menu option which allows us to turn the Reminder On or Off with mouse clicks. Having done this, we now change our PUT line to make it CONDITIONAL on what the Reminder variable says. Just copy and paste these lines into your .OKS file: BUTTON Hello Red OKbridge Hi, opps! SAYC here. {enter} IF NOCASE %Reminder% EQ On PUT -%MyUserName%{tab} Turn on Recorder and load cc! {enter} FI While it isn't important to understand HOW this works, here is a brief explanation for the curious: "IF NOCASE %Reminder% EQ On" means that if the value (with it not mattering whether "On" or "Off" is in upper or lower case here) of Reminder EQuals "On" we WILL execute the PUT line. Otherwise, we will NOT show it. The "FI" simply means that we are FInished with this consideration. Do NOT forget this "FI"! Now, we will be reminded to turn on our Recording and load our convention card until such time as we go to "Hi...Reminder...Off" to turn it off. The next time we use our tourney .OKS file, the same reminder mechanism will be in place until, again, we disable it by using the "Hi...Reminder...Off" menu option. Try this! :) ========================================================= OKScript Tip #6: More Reminders Bridge being a game which tends to command our complete attention, we may need to remind ourselves of some pressing upcoming engagement. We may need to remind ourselves to, say, start dinner at 5:00 P.M. our time. The reminder could say anything (e.g. "feed cat", "walk dog", "tape Star Trek", etc.), really. We can program such a reminder into our OKScript! This can be done with a "Do AT" line that includes the time that we wish to see this reminder. On many systems, this time may need to be expressed in "military" time (i.e. add 12 hours for any time after noon and before midnight). You may need to test this on YOUR particular computer, though. To do so, trying inserting the following lines into the very bottom of your .OKS file: Do AT 17:00 WINDOW OKbridge PUT -%MyUserName%{tab} Rememember: Prepare dinner! {enter} At 5:00 P.M., *if you have this .OKS file running*, it will automatically remind you of the need to commence dinner preparations. The "WINDOW OKbridge" line focuses OKScript's attention on OKbridge, directing the text there. Due to the "PUT -%MyUserName%{tab}" prefix, this reminder will be seen ONLY by YOU, as long as you have set the "MyUserName" variable to your own OKBridge username via a "Macro" line near the top of your .OKS file: Macro MyUserName Kaltica Of course, you will use your OWN username instead of "Kaltica" in the line above. You will want to test this out on your particular computer. Some systems require that the time be expressed in SECONDS, so the "Do AT" line *may* need to read: Do AT 17:00:00 Later, you can revise the reminder to prompt you of some other important event: Do AT 23:00 WINDOW OKbridge PUT -%MyUserName%{tab} Bed time! Early day tomorrow! {enter} You can even have more than one such event. In fact, you can have as many as TEN "Do AT" events in one .OKS file. For convenience, we suggest putting these at the BOTTOM of your .OKS file so that you can access and revise them quickly. Don't forget that the times that you enter are LOCAL (i.e. YOUR time), not necessarily PDST ("OKBridge" time). Times before 10:00 A.M. should start with a zero (e.g. 06:00 is 6:00 A.M.) or two (e.g. 00:30 is 30 minutes past midnight), so as to have 2 characters for the hour number. Try this one. It's fun! :) ========================================================= OKScript Tip #7: Yet more Reminding We can set our .OKS to remind us PERIODICALLY, lest one reminder be missed or be insufficient. The following "DO EVERY" statement will remind us to check on dinner ever 2 minutes: Do EVERY 00:02 Window OKbridge PUT -%MyUserName%{tab} Remember to check on dinner! {enter} The "00:02" means do this every 2 minutes. "02:00" would mean to this every two HOURS. "Window OKbridge" focuses OKScript on sending the text to our OKWin screen. The last line merely directs the reminder to us personally, as long as we have a MACRO line near the top of our .OKS file such as: MACRO MyUserName Kaltica ...with our own username instead of "Kaltica". We can turn on and off this particular reminder by creating a Reminder variable... MACRO Reminder Off ...near the top of your .OKS file, and then appropriate buttons: BUTTON RemindOn Red OKbridge -%MyUserName%{tab} Reminder ON. {enter} Let Reminder On BUTTON RemindOff Blue OKbridge -%MyUserName%{tab} Reminder OFF. {enter} Let Reminder Off ...or, better yet, menu options: Menu Pd|Reminder|On OKbridge -%MyUserName%{tab} Reminder ON. {enter} Let Reminder On Menu Pd|Reminder|Off OKbridge -%MyUserName%{tab} Reminder OFF. {enter} Let Reminder Off If you use menu options, I might suggest putting them under "Pd", where we have such things as: Menu Pd|GoodLuckPard OKbridge Good luck, %Partner%. ...with "MACRO Partner Janice" (or whatever our regular partner's first name is) defined near the top of our .OKS file. Now we revise our "DO EVERY" statement to have it flash the message onscreen ONLY if the Reminder variable is ON. We would see: Do EVERY 00:02 IF Reminder EQ On Window OKbridge PUT -%MyUserName%{tab} Remember to check on dinner! {enter} FI This means: Every two minutes, if the Reminder variable EQuals "On", PUT onto the OKBridge window the following text. Then we are FInished. (Actually, though, "FI" is merely "IF" spelled backwards, marking the end of that exercise.) One last word about these reminders: do NOT have TWO of them "maturing" at the exact same moment. Your system may get confused, and the messages are likely to be garbled in the process. ========================================================= OKScript Tip #8: Away From Keyboard Imagine that you are going to leave the table for a moment. It is good etiquette to say "brb" for "Be right back" and then "b" ("back") when you return. But what if someone arrives while you are away, starts talking to you, and is chagrined by your failure to respond? We can handle this by setting up an "ON EVERY" statement to issue a statement periodically that we are away from our keyboard ("afk") and will return shortly. We don't want to issue this "afk" notice TOO often, lest we annoy the other other players. About once every 3 to 5 minutes should be about right. Let us start by setting up a "MyUserName" variable for our OKBridge username and another variable called "Away", setting it to "Here" to start. MACRO MyUserName Kaltica - use your OWN OKBridge username instead of "Kaltica" MACRO Away Here Now we'll make a menu option that we will hit whenever we are leaving: Menu Pd|BeRightBack OKbridge I will be right back. {enter} Let Away Gone PUT -%MyUserName%{tab}Away is now set to %Away%. {enter} This menu option announces our departure and sets the "Away" variable to "Gone", alerting us to this new setting. Next, we'll construct a menu option that we will use upon our return to the table: Menu Pd|IamBack OKbridge I am back. {enter} Let Away Here PUT -%MyUserName%{tab}Away is now set to %Away%. {enter} This one resets the "Away" variable to "Here" and informs us of having done so. Now, at the bottom of our .OKS file, we will enter: Do Every 00:04 IF NOCASE %Away% EQ Gone PUT AUTOMATED MESSAGE: %MyUserName% is "afk". Back soon! {enter} FI After "Do Every" we have a time, describing the INTERVAL between these messages. "00.04" will flash this message every 4 minutes. On some systems, we need to include the seconds, so we may need to put in "00.04.00" for this effect. Please test this on your own system to be sure. "If NOCASE %Away% EQ Gone" means "if the Away variable EQuals `Gone' then do the following..." The put line is then executed, sending the message onscreen. To FInish this "IF" loop, we write "IF" backwards, "FI". Done! Now let us see how we would use this. Before leaving the table, we hit the "Pd"..."BeRightBack" menu option. This flashes "I will be right back." on our screen. It also activates the "Away" variable to "Gone". Four minutes later (and every four minutes after that), the "AUTOMATED" message will appear onscreen. When you come back to the table you will hit "Pd"..."IamBack", announcing your return. This will turn OFF any subsequent messages as it resets "Away" to "Here". Try out this useful tip on your system. You may find it VERY useful. :) One last word about these reminders: do NOT have TWO of them "maturing" at the exact same moment. Your system may get confused, and the messages are likely to be garbled in the process. ========================================================= OKScript Tip #9: Oops and UNDO Occasionally we will make errors in the bidding or play that require immediate correction. The typical case is a mismouse. In OKWin, we can ask for an UNDO via "PLAYING"..."UNDO". "No problem," you say. Well... The challenge is to get this request for an UNDO onto the table as QUICKLY as possible, before the next player bids or plays a card. "PLAYING"..."UNDO" is not nearly as quick as hitting a big UNDO button on our OKScript panel. Another problem with "PLAYING"..."UNDO" is that it asks PUBLICLY for an Undo. This means that PARTNER can see our request. Now, if the request is declined, Partner may face an ethical challenge, knowing that your bid or play was inadvertent. Would it not be better if Partner did NOT see the Undo request? To solve both of these problems, we suggest making a LARGE "UNDO" OKScript button. We can do this via this line: BUTTON UNDO 60 Teal OKbridge =UNDO, please! {enter} PUT {%}One second, please. I'm asking the opps for an UNDO. {enter} The "60" will control the size, in screen dots ("pixels") of the UNDO button. We can adjust this up (for larger) or down (for a small button). The second line sends a message explaining any delay to the spectators. Remember that, because it is is a special character, we must enclose the "%" in brace (i.e. squiggly) brackets: "{" and "}". The ONLY person at the table (aside from Observers) who does NOT know of our request for an Undo is PARTNER...which is as it should be. While the UNDO button will quickly handle any errors in BIDDING or PLAYING, we would like an "OOPS" button to deal with errors in our STATEMENTS. Perhaps our system garbled the last message we sent. Or perhaps we accidentally sent our message to the wrong person (CONTROL-R occasionally has this effect, if someone breaks in with a private message at an inopportune time). BUTTON OOPS 60 Olive OKbridge Oops! Please ignore my last message. Slight technical glitch. {enter} In your .OKS file, of course, this will be one long line, not broken up into two. Now, when you send a message to the wrong person, you can hit your CONTROL-R button (see Tip #1) and your OOPS button in rapid succession. Problem solved! :) ========================================================= OKScript Tip #10: Come back to us, Barbara Lewis Hari Krishna Beauregard ****************************************************** Imagine playing at a table and seeing a person disconnected by the system. Often, such players don't immediately know that they HAVE been disconnected! This is particularly true of newer OKBridge members. You could type in a message to the Lobby, calling them back to your table. The errant player might miss this, though, in the flurry of text that s/he sees in the Lobby. We would like to send them a quick and PRIVATE message which will appear in RED on their screen. Assuming both of you have OKWin 4.0, try adding these lines to your .OKS file (ignore the explanatory lines that start with hyphens): MACRO MyUserName Kaltica - Instead of "Kaltica", enter YOUR username here. MACRO Errant Wintaka - Instead of "Wintaka", type in your regular partner's - OKBridge USERNAME (not their real name) here. This - Macro line should go near the top of your .OKS file, - along with all your other MACRO lines. Menu Pd|ComeBack|EnterName Get Errant Please enter the disconnected person's username: Window OKbridge PUT -%Errant%{tab} %Errant%, the system disconnected you. Please come back! {enter} - The above PUT line will be ONE long line, not broken into - two lines, in your .OKS file. The Menu line creates a menu option to hit when the person is disconnected. The Get line will ask you for the OKBridge username of the person, using Partner's username as a default. "Window OKbridge" focuses OKScript's attention on OKBridge, so that they next PUT line will go to the person's whose name you just entered. Later, you can reiterate this message via "Pd"..."ComeBack"..."CallThemBack", in case they don't see or don't respond to your original entreatment. Menu Pd|ComeBack|CallThemBack OKbridge -%Errant%{tab} %Errant%, the system disconnected you. Please come back! {enter} - The above menu option will be ONE long line, not - broken into two lines, in your .OKS file. Ain't OKScript FUN? :) ------------------------------------------ P.S. In case your were wondering "Come back to us, Barbara Lewis Hari Krishna Beauregard" is a song by American folk singer John Prine. P.P.S. Bear in mind that, at our age, "regular partner" may refer to the one that DOES drink hir prune juice! :)) ========================================================= --------- The OKScript Program --------- OKScript can be downloaded from Mike ("Mikezzz" on OKBridge) Mardesich's site at: http://home1.gte.net/yweare/oks-home.htm ------------------------------------------