Applescript application code not working

Discussion in 'Mac Programming' started by trainguy77, Jul 31, 2006.

  1. macrumors 68040

    trainguy77

    #1
    I am helping do some GUI changes to an application. I need to make the play/pause button change its alternate graphic depending if itunes is playing or paused. I have it so it changes it main image but not its alternate. This line seems to kill it.

    Code:
    set alternateimage of button "play" of mainWindow of myApp to image "pauseclicked.tif"
    Yet this line right above it works fine:
    Code:
    set image of button "play" of mainWindow of myApp to load image "pause.tif"
    set image of button "play" of window "miniMainWindow" to load image "pause.tif"
    What is wrong with the first of those code sets? It compiles fine just hangs when it goes to run that line. I remove that first line and it runs fine, just without alternate icons.
     
  2. macrumors 68040

    trainguy77

    #2
    any ideas? There must be someone who has written some applescript applications?
     
  3. macrumors member

    #3
    I'm not sure this will make a jot of difference, but the two lines differ in that the line that kills it does not have "to load image" but just "to image".
     
  4. macrumors 68040

    trainguy77

    #4
    I got it working a day or two after the op. It does need load....i was just trying different things. It had to do with the image file.
     

Share This Page