on awake from nib theObject
set theList to {"Web'N'Walk Box compact", "Web'N'Walk Card", "Novatel Merlin Xpress"}
tell theObject
repeat with eachItem in theList
make new combo box item at end of combo box items with data eachItem
end repeat
set current item to 1
end tell
end awake from nib
second Combobox:
on awake from nib theObject
set theList to {"HSDPA - Regular", "HSDPA - Business"}
tell theObject
repeat with eachItem in theList
make new combo box item at end of combo box items with data eachItem
end repeat
set current item to 1
end tell
end awake from nib
I have 1 Button - how can I tell the button to some action if 1 item of comboBox 1 and 1 item of combbox 2 have been choosen?
Instead of using two popups I have used 1 Matrix and 1 Popup and a button…
on clicked theObject
if name of theObject is "theMainButton" then
tell window "main"
set PopupButtonItem to title of current menu item of popup button "thePopupButton"
set theMatrixItem to name of current cell of matrix "theMatrix"
end tell
-- Check Huawei E220 gprsinternet
if (PopupButtonItem is "Web'N'Walk Box compact") and (theMatrixItem is "HSDPA - Regular") then
tell application "Internet Connect"
activate
set configName to "Huawei MOBILE"
connect PPP configuration 1 to telephone number "gprsinternet"
quit
end tell
end if
-- Check Huawei E220 business.gprsinternet
if (PopupButtonItem is "Web'N'Walk Box compact") and (theMatrixItem is "HSDPA - Business") then
tell application "Internet Connect"
activate
set configName to "Huawei MOBILE"
connect PPP configuration 1 to telephone number "business.gprsinternet"
quit
end tell
end if
-- Check Huawei E630
if (PopupButtonItem is "Web'N'Walk Card plus") and (theMatrixItem is "HSDPA - Regular") then
tell application "Internet Connect"
activate
set configName to "Huawei MOBILE"
connect PPP configuration 1 to telephone number "gprsinternet"
quit
end tell
end if
-- Check Huawei E630
if (PopupButtonItem is "Web'N'Walk Card plus") and (theMatrixItem is "HSDPA - Regular") then
tell application "Internet Connect"
activate
set configName to "Huawei MOBILE"
connect PPP configuration 1 to telephone number "business.gprsinternet"
quit
end tell
end if
-- Check Merlin
if (PopupButtonItem is "Web'N'Walk Card express") and (theMatrixItem is "HSDPA - Regular") then
tell application "Internet Connect"
activate
set configName to "Huawei MOBILE"
connect PPP configuration 1 to telephone number "gprsinternet"
quit
end tell
end if
-- Check Merlin
if (PopupButtonItem is "Web'N'Walk Card express") and (theMatrixItem is "HSDPA - Regular") then
tell application "Internet Connect"
activate
set configName to "Huawei MOBILE"
connect PPP configuration 1 to telephone number "business.gprsinternet"
quit
end tell
end if
end if
end clicked
on awake from nib theObject
--your code here
end awake from nib