Hi
excuse my ignorence but could someone please explain to me how to cancel the panel ?
in the script below, aas when I set up my idea of it here it just freezes and I have to force quit, have tried useing on panel end , lack of knowledge plays a big part here.
on clicked theObject
if name of theObject is "Info" then
tell window "Main"
set theDay to name of current menu item of popup button "theDay"
set theWeek to name of current menu item of popup button "theWeek"
end tell
(* Information Results *)
if (theDay is "1") and (theWeek is "A") then
set content of text field "myDialogText" of window "myPanel" to "1 A"
display (window "myPanel") attached to window "Main"
end if
end if
end clicked :
Closing a panel is VERY fundamental, and should be something that you should easily find an answer to in any of the most common resources for applescript studio. Searching this forum for “close panel”, I found many posts which covered the syntax for closing a panel. Of course, without knowing the syntax used to close/cancel/hide a panel, you’d not know what exact phrase to search for. I would then recommend that you refer to apple’s documentation, either online or locally by selecting “Help > Documentation” from the main menu in Xcode. Using the search field on any apple developer web page is a valuable resource, as well. A search for “panel applescript” will return many relavent pages with complete syntax details and many examples of most commands.
We’re all happy to help, but you could probably save yourself the time and frustration of waiting for our responses by just loading a web page or two and looking up simple concepts like this yourself.