home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- set n to the clickOn
- set the castNum of sprite n to the castNum of sprite n + 1
- updateStage()
- set theFile to the name of cast the castNum of sprite 15
- printText(theFile)
- set the castNum of sprite n to the castNum of sprite n - 1
- end
-
- on printText theFile
- global CDPath
- set readObject to FileIO(mnew, "read", CDPath & "mainmenu\articles\" & theFile)
- if objectp(readObject) then
- set theText to readObject(mReadFile)
- readObject(mdispose)
- else
- alert("File not found : " && readObject & RETURN & CDPath & "mainmenu\articles\" & theFile)
- end if
- if objectp(printer) then
- printer(mdispose)
- else
- openXLib(CDPath & "mainmenu\pmatic.dll")
- end if
- set printer to PrintOMatic(mnew)
- printer(mRegister, "10056779-130")
- set propFont to "arial"
- printer(mReset)
- set w to printer(mGetPageWidth)
- set h to printer(mGetPageHeight)
- printer(mSetTextFont, propFont)
- printer(mSetTextStyle, "normal")
- printer(mSetTextSize, 10)
- set start to 1
- set end to the number of chars in theText
- repeat while start < end
- printer(mNewPage)
- printer(mTextBox, 0, 0, w, h, 0)
- set count to printer(mAppendText, char start to end of theText)
- set start to start + count
- end repeat
- if printer(mDoJobSetup) = 1 then
- updateStage()
- printer(mPrint)
- printer(mdispose)
- closeXLib(CDPath & "mainmenu\pmatic.dll")
- end if
- end
-