Mailing Labels

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Mailing Labels

rbridgman
I have been using the following script to print mailing labels, but have recently upgraded the Dymo Label Printer to the 450 series and now my labels are blank:

labelprint
| application application1 window status bufferHolder lengthHolder name printname  args address1 printaddress1 address2 printaddress2 address3 printaddress3 |

application := OleAutomationObject createObject: 'Dymo.DymoAddIn'.
application1 := OleAutomationObject createObject: 'Dymo.DymoLabels'.
application invoke: 'Hide' withArguments:#() returnType: true.
application invoke: 'Open' withArguments:#('c:\labels\agent_label2.lwl') returnType: true.
(self subpartNamed: 'Name') selectAll.
(self subpartNamed: 'Name') copySelection.

window := CgWindow default.
status := window display
   clipboardRetrieve: window
           formatName: 'STRING'
           bufferReturn: (name := ReturnParameter new)
           privateIdReturn: ReturnParameter null.
status ~= ClipboardSuccess
   ifTrue: [
          Transcript cr; show: 'XmClipboardStatus...', status printString; cr.
          ^self].
printname := name value.

application1 invoke: 'SetField' withArguments: (Array with: 'TEXT' with: printname)  returnType: true.

(self subpartNamed: 'Address1') selectAll.
(self subpartNamed: 'Address1') copySelection.

window := CgWindow default.
status := window display
   clipboardRetrieve: window
           formatName: 'STRING'
           bufferReturn: (address1 := ReturnParameter new)
           privateIdReturn: ReturnParameter null.
status ~= ClipboardSuccess
   ifTrue: [
          Transcript cr; show: 'XmClipboardStatus...', status printString; cr.
          ^self].
printaddress1 := address1 value.
printaddress1 := 'Hi Roger'.
application1 invoke: 'SetField' withArguments:(Array with: 'TEXT_1' with: printaddress1) returnType: true.



(self subpartNamed: 'Address2') selectAll.
(self subpartNamed: 'Address2') copySelection.

window := CgWindow default.
status := window display
   clipboardRetrieve: window
           formatName: 'STRING'
           bufferReturn: (address2 := ReturnParameter new)
           privateIdReturn: ReturnParameter null.
status ~= ClipboardSuccess
   ifTrue: [
          Transcript cr; show: 'XmClipboardStatus...', status printString; cr.
          ^self].
printaddress2 := address2 value.
printaddress2 := 'testinggggg'.
application1 invoke: 'SetField' withArguments:(Array with: 'TEXT_2' with: printaddress2) returnType: true.


(self subpartNamed: 'Address3') selectAll.
(self subpartNamed: 'Address3') copySelection.

window := CgWindow default.
status := window display
   clipboardRetrieve: window
           formatName: 'STRING'
           bufferReturn: (address3 := ReturnParameter new)
           privateIdReturn: ReturnParameter null.
status ~= ClipboardSuccess
   ifTrue: [
          Transcript cr; show: 'XmClipboardStatus...', status printString; cr.
          ^self].
printaddress3 := address3 value.
application1 invoke: 'SetField' withArguments:(Array with: 'TEXT_3' with: printaddress3) returnType: true.


application invoke: 'Print' withArguments:#(1 true) returnType: true.

application releaseObject.
application1 releaseObject.
Reply | Threaded
Open this post in threaded view
|

Re: Mailing Labels

Paolo Bonzini-2
On 09/08/2009 10:27 PM, rbridgman wrote:
>
> I have been using the following script to print mailing labels, but have
> recently upgraded the Dymo Label Printer to the 450 series and now my labels
> are blank:

Sorry, this application is not for GNU Smalltalk.  We cannot help you here.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk