|05-29-2012, 06:02 PM||#1|
Join Date: Jul 2009
Pop Up Button - applescript : (
Leopard 10.5.8, intel
I'm trying to get to grips with a script that lifts information out of an Excel spreadsheet, and populates a web page entry form. Then it saves and does the same again, i.e. returns to the next line of data in Excel and carries on entering.
To explain step by step: My code is copying one Excel cell at a time and storing as a variable (always called typistSomething). Then it enters all the variables quickly, one after the other. All is well, I am just having problems with changing pop up buttons! I've paired down my code to try to work on the problem area. In the following example, you have to imagine that I've just copied a media type ("Movie") to the clipboard, then the pop up button I get to needs to be changed to "Movie" from its default blank state. I don't think I can 'set' a pop up button like I'm trying to. Please help.
set typistType to «class ktxt» of ((the clipboard as text) as record) --enter type to Entry Form activate application "Safari" tell application "System Events" tell process "Safari" set pop up button "Please select the type of video file" of group 6 of UI element 1 of scroll area 1 of group 1 of UI element 1 of scroll area 1 of group 1 of window "Video Metadata" to keystroke typistType end tell end tell
Any help gratefully received... I am afraid I really am a total beginner with applescript.
|Display Modes||Rate This Thread|