Hey guys, I want to change the image in an image well. I’ve made a little app launcher, the user selects an app from a dropdown list and then that app opens, I was wondering how I could get a little image to appear next to the drop down menu.
on launched theObject
tell window 1
set title to "XG-Emulator"
set title of button "button1" to "Quit"
set title of button "button2" to "Emulate"
set title of button "button3" to "Stop Emulating"
set visible of button "button3" to false
set thePopupItems to {"Call of Duty SP", "Call of Duty MP", "World of Warcraft", "Call of Duty 4 SP", "Call of Duty 4 MP", "CoD United Offensive MP", "CoD United Offensive SP", "Medal of Honor", "Prey", "Quake 4", "Quake3", "Raven Shield"}
tell menu of popup button 1
delete every menu item
repeat with aMenuItem in thePopupItems
make new menu item at end of menu items with properties {title:aMenuItem}
end repeat
end tell
end tell
end launched
on clicked theObject
set currentMenuItem to title of current menu item of popup button 1 of window 1
if title of theObject = "Quit" then
quit
else if title of theObject = "Emulate" then
display dialog "Now emulating " & currentMenuItem
launch application ((path to me as text) & "Contents:Resources:emus:" & currentMenuItem & ".app")
tell button "button3" of window 1
set title to "Stop Emulating " & currentMenuItem
set visible to true
end tell
else if name of theObject = "button3" then
quit application currentMenuItem
end if
end clicked
on choose menu item theObject
delay 0
end choose menu item
-- Lets change the image.
on awake from nib theObject
set image of image view "imageDrop" of window "mainWin" to
end awake from nib
Thats my code, can anyone help.