Dymo Label Printer - Has Applescript Support - I Need Help

The applications suite is below. I do not know how to use basically anything in Applescript. If someone could explain how these functions and classes are supposed to be used that would be great. Just FYI I know C, PHP, and some C++ so you don’t have to be too specific with everything, just how these things work in Applescript. I have included my aim name in my profile if anyone would like to help one on one that would be great too. Thanks a lot.

DYMO Label Suite: DYMO Label classes

redrawLabel: redraw label
redrawLabel reference – the object for the command

openlabel: open a label file
openlabel reference – the object for the command
in Unicode text – file name to open

printLabel2: print current label without Print Dialog
printLabel2 reference – the object for the command

printlabel: print current label
printlabel reference – the object for the command

Class address: An Address object
Plural form:
addresses
Properties:
printRTF [r/o] – All of the properties of the superclass.
barcode location barcode none/barcode above/barcode below – position of a barcode

Class horizontal line: A horizontal line object
Plural form:
horizontal lines
Properties:
printline [r/o] – All of the properties of the superclass.

Class print object: An abstract print object.
Plural form:
print objects
Properties:
item [r/o] – All of the properties of the superclass.
width small real – object’s width
name Unicode text – object’s name
xPosition small real – object’s x position
yPosition small real – object’s y position
rotation r90/r180/r270/none – object’s rotation
object text Unicode text – object’s text
height small real – object’s height

Class counter: A counter object
Plural form:
counters
Properties:
printtext [r/o] – All of the properties of the superclass.
afterText Unicode text – text after counter
printLeadingZeros boolean
beforeText Unicode text – text before counter
formatWidth integer – width of output
startValue integer – counter’s start value
stepValue integer – counter’s increment value
currentValue integer [r/o] – current counter value

Class image: An Image object
Plural form:
images
Properties:
print object [r/o] – All of the properties of the superclass.
imageFileName Unicode text – load image from a file
border width none/thick/thin – width of image’s border
border color color – color of image’s border

Class printtext: Parent class for Counter, DateTime, and CurverText objects
Plural form:
printtexts
Properties:
print object [r/o] – All of the properties of the superclass.
disableShrinkToFit boolean – disable shrink-to-fit or not
remainedLinesFontSize small real – font size
firstLineUnderline boolean – underline
remainedLinesFontColor color – font color
remainedLinesUnderline boolean – underline
firstLineFontColor color – font color
firstLineFontSize small real – font size
backgroundColor color – background color
alignment center block/right/center/left – horizontal alignment
remainedLinesFontName Unicode text
firstLineFontName Unicode text – font name
vertAlignment center/bottom/top – vertical alignment
drawBackground boolean – draw background
mirrorOutput boolean – mirror text or not
printVertically boolean – print text vertically or not

Class printline: A line object. You can not create this object. Try horizontal or vertical line instead.
Plural form:
printlines
Properties:
print object [r/o] – All of the properties of the superclass.
line color color – line’s color
style ls5pt/ls1pt/ls2pt/ls3pt/ls4pt/none – line’s style

Class application: An application’s top level scripting object.
Plural form:
applications
Elements:
print object by name, by numeric index, before/after another element, as a range of elements, satisfying a test
vertical line by name, by numeric index, before/after another element, as a range of elements, satisfying a test
address by name, by numeric index, before/after another element, as a range of elements, satisfying a test
ellipse by name, by numeric index, before/after another element, as a range of elements, satisfying a test
barcode by name, by numeric index, before/after another element, as a range of elements, satisfying a test
rtfText by name, by numeric index, before/after another element, as a range of elements, satisfying a test
horizontal line by name, by numeric index, before/after another element, as a range of elements, satisfying a test
rectangle by name, by numeric index, before/after another element, as a range of elements, satisfying a test
image by name, by numeric index, before/after another element, as a range of elements, satisfying a test
counter by name, by numeric index, before/after another element, as a range of elements, satisfying a test
dateTime by name, by numeric index, before/after another element, as a range of elements, satisfying a test
curvedText by name, by numeric index, before/after another element, as a range of elements, satisfying a test
document by name, by numeric index, before/after another element, as a range of elements, satisfying a test
window by name, by numeric index, before/after another element, as a range of elements, satisfying a test, by ID
Properties:
application [r/o] – All of the properties of the superclass.
print variable object list [r/o]
clipart folder Unicode text [r/o] – folder of clipart files
labels folder Unicode text [r/o] – folder of labels files
app folder Unicode text [r/o] – application location
address book folder Unicode text [r/o] – folder of Address Book files
MRUList list [r/o] – MRU files list

Class dateTime: A date-time object
Plural form:
dateTimes
Properties:
printtext [r/o] – All of the properties of the superclass.
afterText Unicode text – text after date-time
dateFormat integer – date format
beforeText Unicode text – text before date-time
timePrinted boolean – is time printed?
use24HourTimeFormat boolean – time is printed using 24 hours format

Class printRTF: Parent class for Text and Address objects
Plural form:
printRTFs
Properties:
print object [r/o] – All of the properties of the superclass.
alignment center block/right/center/left – horizontal alignment
disableShrinkToFit boolean – disable shrink-to-fit or not
content text – object’s content
vertAlignment center/bottom/top – vertical alignment
drawBackground boolean – draw background
outline boolean – draw only outline of symbols instead of solid
mirrorOutput boolean – mirror text or not
printVertically boolean – print text vertically or not
shadow boolean – draw a shadow
backgroundColor color – background color

Class vertical line: A vertical line object
Plural form:
vertical lines
Properties:
printline [r/o] – All of the properties of the superclass.

Class rectangle: A rectangle object
Plural form:
rectangles
Properties:
print object [r/o] – All of the properties of the superclass.
borderColor color – color of rectangle’s border
border none/thick/thin – width of rectangle’s border
isFilled boolean – is rectangle filled
fillColor color – fill color

Class ellipse: An ellipse object
Plural form:
ellipses
Properties:
print object [r/o] – All of the properties of the superclass.
borderColor color – color of ellipse’s border
border none/thick/thin – width of ellipse’s border
isFilled boolean – is ellipse filled
fillColor color – fill color

Class curvedText: A curved text object
Plural form:
curvedTexts
Properties:
printtext [r/o] – All of the properties of the superclass.
centerMode top/bottom
displayMode bottomArc/fullCircle/topArc
centeredOnLabel boolean

Class barcode: A barcode object
Plural form:
barcodes
Properties:
print object [r/o] – All of the properties of the superclass.
alignment center block/right/center/left – alignment
barcodeText Unicode text – barcode data
fontName Unicode text – font name of human readable text
hrPosition none/top/bottom – position of human readable text
barcodeType Code128Auto/EAN13/Code2of5/Code128B/Code128C/
Code128EAN/Code39LibraryRight/Code29CS/CodabarLibraryLeft/ITF14/PLANET/
Code39LibraryLeft/Code128A/Code39/CodabarLibraryRight/EAN8/UPCE/Codabar/
POSTNET/UPCA – barcode 's symbology
linkedTo Unicode text – name of object witch data will be used as barcode’s data
fontSize small real – font size of human readable text
barcodeSize small/medium/large – size of bars

Class rtfText: A Text object
Plural form:
rtfTexts
Properties:
printRTF [r/o] – All of the properties of the superclass.

But what is it that you are trying to accomplish? If you just want to learn AppleScript, there are much better applications to start with (the Finder perhaps?) and if you are trying to do something specific, you’ll find you’ll get more help if you clearly explain what it is that you want to do.

Jon

The AppleScript Language Guide, while rather dated, is a good place to pick up the essentials for scripting. You might also want to take a look at this tutorial. If you still have questions, someone on this forum can probably help. Good luck!

– Rob

While on this topic here’s something I am trying to do.
Export data from Filemaker to a .csv file, open Dymo Label, delete all data there, import the .csv file and print labels.
I’ve looked at the dictionary for Dymo Label and can’t find “import” anywhere. Does this mean it’s not possible to do? We tried the label printing directly from FMP but, as always, it has difficulty with printing labels. This is FM7 on OS X 10.3.5,.

Stephen

I ended up using GUI scripting. It is a hack basically, but it works.
You will probably want to grab Apples UI inspector, or even better Prefab’s UI Scripting App.

set list_from_file to read aFile using delimiter “;”
repeat with i from 1 to (count of list_from_file)

– I did this so the entire address is saved as one line with semi-colons at the ends, then
– each line of the address is separated by ~ and here it gets replaced with a return again
set the_address to my replace_chars(item i of list_from_file, “~”, return)

tell application “DYMO Label”
– You will need to have check what the fields names really are using one of the UI inspectors; Here it is only address 1
set object text of address 1 to the_address
set content of address 1 to the_address
printLabel2
end tell
end repeat

replace chars function:
on replace_chars(this_text, search_string, replacement_string)
set AppleScript’s text item delimiters to the search_string
set the item_list to every text item of this_text
set AppleScript’s text item delimiters to the replacement_string
set this_text to the item_list as string
set AppleScript’s text item delimiters to “”
return this_text
end replace_chars

This worked for me. For what I needed to do it was an OK solution, I have since wrote an application to do it without the Dymo App… If you have any more questions about the script be sure to post…

-Jon