change a combo box in foreign application

Hi there,

I´m newbie trying to code a few helpers in AppleScript. My system is 10.4.11, to find the objects I use ‘UI Browser’.
I try to automate the application “Barcode Generator” by Blitz Tools.

  1. How can i change the acitve value of a combobox? I have something like this:
tell application "System Events"
    tell process "BarcodeGenerator"
        tell combo box 1 of group 3 of window "BlitzTools Barcode Generator"
            set currentitem to "Code 128"
        end tell
    end tell
end tell

This throws no error but either doesn´t change the active value.

  1. later there´s a save dialog in this application, i try to change the folder to e.g. desktop/my_test
    I don´t know how to perform that.

  2. The name of the file to save I give by ‘keystroke’. This works fine:

tell text field 1 of window "Save Barcode as EPS"
                keystroke item 2 of parts & "_" & item 1 of parts
            end tell

BUT, there´s a break of maybe 4 seconds before the filename is typed. How to solve this?

  1. is it possible to trim the value of a variable? This means, every space or linebreak is deleted on a variable before and after the real value. It´s like PHPs trim action.

Thank you very much for helping

w/regards
Michael

Model: iMac Intel Core2Duo 2,16 GHz
AppleScript: 1.10.7
Browser: Firefox 3.6.9
Operating System: Mac OS X (10.4)

Hi,

to point 1. now I have:


        tell combo box 1 of group 3 of window "BlitzTools Barcode Generator"
            click button 1
            keystroke (ASCII character 30) using {option down} -- up arrow key
            
            repeat 6 times
                keystroke (ASCII character 31) -- down arrow key
            end repeat
            keystroke return
        end tell

Problem: seems to work fine, Combo opens, jumps to first item, jumps 6 items down to what I want and closes.
BUT the new property is NOT submitted to the programm. It still uses the old value.

Any ideas?

w/regards
Michael