Script truncated in save / edit sequence

1 view
Skip to first unread message

Ralf B. Lukner

unread,
Feb 28, 2011, 12:46:22 AM2/28/11
to iLuaBox
I have a script of ~3660 characters (w spaces counted) and 86
paragraphs. If I save the input window (and thus the script) and
subsequently edit the script, the last two characters are truncated.
I can reenter that last line and the script works fine.
Unfortunately this means I must store the scripts in another
application. Any suggestions for avoiding the script truncation after
a save input / edit?

Tom Skwara

unread,
Feb 28, 2011, 3:13:08 PM2/28/11
to ilu...@googlegroups.com
Try setting _INPUTBUFFERSIZE to higher value (i.e. 10000).  The buffer size setting helps keep the screen highly responsive.

One thing worth mentioning is that changing the values of _INPUTBUFFERSIZE or _OUTPUTBUFFERSIZE is not persistent between sessions.  Persisting any value can be accomplished by adding code to your start-up script ('hello.lua' by default).

Tom Skwara
MobileApp Systems


Ralf B. Lukner

unread,
Mar 1, 2011, 12:06:09 AM3/1/11
to iLuaBox
Set _INPUTBUFFERSIZE=10000 . Confirmed that it was set in both
extras.lua and my script (by print'ing it). It made no difference at
all (file still cut off at exactly the same location)
--Ralf
> > a save input / edit?- Hide quoted text -
>
> - Show quoted text -

Tom Skwara

unread,
Mar 1, 2011, 8:11:24 AM3/1/11
to ilu...@googlegroups.com
Unfortunately I am unable to reproduce the problem.

Just to be clear, is it the last two characters being truncated and not characters from the beginning?  The reason I want to be clear is that iLuaBox truncates characters from the top as the buffer fills past the assigned limit.  There must be something else going on here (hidden control character maybe?).

Please consider posting your script for closer examination and test.  You can also send it to sup...@mobileappsystems.com if you wish.

Tom Skwara
MobileApp Systems


Eduardoo

unread,
Mar 1, 2011, 11:38:58 AM3/1/11
to iLuaBox
I had a similar problem. The culprit was an international character
(ñ) that I was using in a comment. (I write my comments in Spanish).
Ilua replaced the ñ with strange characters every time I opened the
source file, and some characters where truncated at the end of the
program.

Regards

Eduardo


On Mar 1, 8:11 am, Tom Skwara <tskw...@mobileappsystems.com> wrote:
> Unfortunately I am unable to reproduce the problem.
>
> Just to be clear, is it the last two characters being truncated and not characters from the beginning?  The reason I want to be clear is that iLuaBox truncates characters from the top as the buffer fills past the assigned limit.  There must be something else going on here (hidden control character maybe?).
>
> Please consider posting your script for closer examination and test.  You can also send it to supp...@mobileappsystems.com if you wish.

Ralf B. Lukner

unread,
Mar 2, 2011, 8:53:00 AM3/2/11
to iLuaBox
here is my script:

-- COPD.lua Template
-- Progressive airflow limitation caused by airway
-- and parenchymal inflammation
-- RBL 2/27/11
ptName="J0000"
ptAge="68 yo"
ptSex="male"
ptSmokingStatus=" w a 50 pk-yr smoking \nhistory and "
--ptBrPmh=nil
ptBrPmh={"CAD"}
ptPrLoc="presents to the EC w c/o "
ptCCCourse="chronically worsening "
ptCC="dyspnea"
ptCCDur=6
ptCCDurUnits="w"
ptHpi="The pt was in "
if ptSex=="male" then
   ptHpi=ptHpi .. "his "
else if ptSex=="female" then
   ptHpi=ptHpi .. "her "
end
--
--Key ROS
ptROS={"+Cough","+Sputum Production","+DOE"}
--
-- Output the template
--ilua.cls(0)
print(ptName)
ps=ptAge .. " " .. ptSex
if ptSmokingStatus then
    ps=ps .. ptSmokingStatus
end
if not ptBrPmh then
    ps=ps .. " w no significant PMHx "
else 
    ps=ps .. " w a PMHx of "
--    ps=ps .. ptBrPmh.concat(ptBrPmh,", ")
end

print(ps)
print(ptPrLoc)
print(ptCCCourse .. ptCC .. " of")
print(ptCCDur .. ptCCDurUnits .. " duration.")

ps=ptHpi
print(ps)

ps=[["
COPD Exacerbation
1. Admit to:

2. Diagnosis: Exacerbation of COPD

3. Condition:

4. Vital Signs: q4h. Call physician if P >130; R >30, <10; T >38.5°C;
O2 saturation <90%.

5. Activity: Up as tolerated; bedside commode.

6. Nursing: Pulse oximeter. Measure peak flow with portable peak flow
meter bid and chart with vital signs. No sedatives.

7. Diet: No added salt, no caffeine. Push fluids.

8. IV Fluids: D5 1/2 NS with 20 mEq KCL/L at 125 cc/h.

9. Special Medications:

-Oxygen 1-2 L/min by NC or 24-35% by Venturi mask, keep O2 saturation
90-91%.

Beta-Agonists, Acute Treatment:

-Albuterol (Ventolin) 0.5 mg and ipratropium (Atrovent) 0.5 mg in 2.5
mL NS q1-2h until peak flow meter ≥200-250 L/min, then q4h prn OR

-Levalbuterol (Xopenex) 0.63-1.25 mg by nebulization q6-8h prn.

-Albuterol (Ventolin) MDI 2-4 puffs q4-6h.

-Albuterol/Ipratropium (Combivent) 2-4 puffs qid.

Maintenance Corticosteroids and Anticholinergics:

-Methylprednisolone (Solu-Medrol) 60-125 mg IV q6h or 30-60 mg PO qd.
Followed by:

-Prednisone 20-60 mg PO qd.

-Triamcinolone (Azmacort) MDI 2 puffs qid or 4 puffs bid.

-Beclomethasone (Beclovent) MDI 4-8 puffs bid with spacer, followed by
gargling with water OR

-Flunisolide (AeroBid) MDI 2-4 puffs bid OR

-Ipratropium (Atrovent) MDI 2 puffs tid-qid OR

-Fluticasone (Flovent) 2-4 puffs bid (44 or 110 mcg/puff).

Aminophylline and Theophylline (second line therapy):

-Aminophylline loading dose, 5.6 mg/kg total body weight over 20 min
(if not already on theophylline); then 0.5-0.6 mg/kg ideal body weight/
hr (500 mg in 250 mL of D5W); reduce if elderly, or heart or liver
disease (0.2-0.4 mg/kg/hr). Reduce loading to 50-75% if already taking
theophylline (1 mg/kg of aminophylline will raise levels by 2 mcg/mL)
OR

-Theophylline IV solution loading dose, 4.5 mg/kg total body weight,
then 0.4-0.5 mg/kg ideal body weight/hr.

-Theophylline long acting (Theo-Dur) 100-400 mg PO bid-tid (3 mg/kg
q8h); 80% of daily IV aminophylline in 2-3 doses.

Acute Bronchitis

-Trimethoprim/sulfamethoxazole (Septra DS) 160/800 mg PO bid or
160/800 mg IV q12h (10-15 mL in 100 cc D5W tid) OR

-Cefuroxime (Zinacef) 750 mg IV q8h OR

-Ampicillin/sulbactam (Unasyn) 1.5 gm IV q6h OR

-Azithromycin (Zithromax) 500 mg x 1, then 250 mg PO qd x 4 or 500 mg
IV q24h OR

-Clarithromycin (Biaxin) 250-500 mg PO bid OR

-Levofloxacin (Levaquin) 500 mg PO/IV qd [250, 500 mg].

10. Symptomatic Medications:

-Docusate sodium (Colace) 100 mg PO qhs.

-Famotidine (Pepcid) 20 mg IV/PO bid OR

-Lansoprazole (Prevacid) 30 mg qd.

-Acetaminophen (Tylenol) 325-650 mg PO q4-6h prn headache.

11. Extras: Portable CXR, PFTs with bronchodilators, ECG.

12. Labs: ABG, CBC, SMA7, UA. Theophylline level stat and after 12-24h
of infusion. Sputum Gram stain and C&S, alpha 1 antitrypsin level,
high sesitivity CRP."]]
print(ps)


On Mar 1, 7:11 am, Tom Skwara <tskw...@mobileappsystems.com> wrote:
> Unfortunately I am unable to reproduce the problem.
>
> Just to be clear, is it the last two characters being truncated and not characters from the beginning?  The reason I want to be clear is that iLuaBox truncates characters from the top as the buffer fills past the assigned limit.  There must be something else going on here (hidden control character maybe?).
>
> Please consider posting your script for closer examination and test.  You can also send it to supp...@mobileappsystems.com if you wish.

Tom Skwara

unread,
Mar 2, 2011, 7:26:26 PM3/2/11
to ilu...@googlegroups.com
Line 19 should be changed to use a valid Lua syntax 'elseif' instead of 'else if'.

Line 76 contains the character  '≥'.   ry using '=>' instead.    

Tom Skwara
MobileApp Systems


Ralf B. Lukner

unread,
Mar 5, 2011, 10:15:55 AM3/5/11
to iLuaBox
Perfect. Thank you. That corrected my issue.
--Ralf
> >>>> - Show quoted text -- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages