Clicking a Pop Up Button in Quicken

Thanks to this forum I was able to get some help on some GUI scripting I am doing in Quicken. I am try to setup an automated process that will download my transactions from my bank and put them into my registers automatically. I have been able to get the GUI scripting functioning to a point where I have opened the "Download Transactions" window however I am unable to get the script to click on or select an item in the pull down menu. Below is the script that causes the error:

tell application "System Events"
tell process "Quicken 2006"
tell menu bar 1
tell menu bar item "Online"
tell menu "Online"
click menu item "Download Transactions…"
tell window "Download Transactions"
tell pop up button 1
tell menu 1
click menu item 1
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell

I used the UI Inspector to confirm the heirarchy, so I am not sure what I am doing wrong. Any suggestions here?

Powerbook G4 17 1.33 Ghz, Mac OS X (10.4.5)

Posted on Apr 2, 2006 8:56 PM

Reply
8 replies

Apr 2, 2006 9:31 PM in response to Jason Beck

It looks like you're doing well, good job! Scripting popup menus is a little different than scripting regular menus. You must actually click a popup button to reveal its menu before attempting to click one of its items.

So in your case, just insert "click" on a line between "tell pop up button 1" and "tell menu 1." I'm just working on theory here, there may be something else preventing the popup from working.

Edit I forgot one other thing, it looks like your nesting is off. There may be an issue with telling the menu bar to tell something to a window. You should probably "end tell" the blocks so that the tell menubar bit is completely separate from the tell window bit. Something like this should work:

click here to open this script in your editor <pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">tell application "System Events" to tell process "Quicken 2006"
tell menu bar 1
tell menu "Online" of menu bar item "Online"
click menu item "Download Transactions…"
end tell
end tell
tell window "Download Transactions"
tell pop up button 1
click
click menu item 1 of menu 1
end tell
end tell
end tell</pre>

Apr 3, 2006 8:17 PM in response to Michael Henley

Thanks for the tips. Unfortunately the script keeps getting caught at the pop-up window line. I've tried several different ways of scripting it but it keeps getting stuck at the same spot with the same error. I plan on getting "AppleScript: The Missing Manual" to help me learn more about AppleScript, but until then, can you think of any other ways to make this work?

Apr 4, 2006 7:20 PM in response to Michael Henley

I'm back. I am running the UI Elements Inspector and when I hover the cursor over the pull-down menu in the "Download Transactions" window of Quicken 2006 I get:

<AXApplication: “Quicken 2006”>
<AXWindow: “Download Transactions”>
<AXPopUpButton>

Attributes:
AXRole: “AXPopUpButton”
AXRoleDescription: “pop up button”
AXParent: “<AXWindow: “Download Transactions”>”
AXWindow: “<AXWindow: “Download Transactions”>”
AXTopLevelUIElement: “<AXWindow: “Download Transactions”>”
AXPosition: “x=23 y=175”
AXSize: “w=261 h=20”
AXEnabled: “1”
AXFocused (W): “0”
AXValue: “(null)”

Actions:
AXPress - press


Now if I go to click one of the menu items in that pull-down, I see:

<AXApplication: “Quicken 2006”>
<AXWindow: “Download Transactions”>
<AXPopUpButton>
<AXMenu>
<AXMenuItem: “ Checking”>

Attributes:
AXRole: “AXMenuItem”
AXRoleDescription: “menu item”
AXParent: “<AXMenu>”
AXEnabled: “1”
AXPosition: “x=24 y=176”
AXSize: “w=239 h=19”
AXTitle: “ Checking”
AXHelp: “(null)”
AXSelected (W): “1”
AXMenuItemCmdChar: “(null)”
AXMenuItemCmdVirtualKey: “(null)”
AXMenuItemCmdGlyph: “(null)”
AXMenuItemCmdModifiers: “0”
AXMenuItemMarkChar: “✓”
AXMenuItemPrimaryUIElement: “(null)”

Actions:
AXCancel - cancel
AXPress - press


Does this help? I look forward to your suggestions.

Thanks!

Apr 6, 2006 7:45 PM in response to Jason Beck

Normally the popup button is the front-most window right? Have you tried just using a keystroke? I've found these few keystrokes helpful:

keystroke tab
keycode 32 --that's the spacebar
keystroke left
keystroke down
keystroke right
keystroke up

Normally, when axpress, click, and select don't work, I usually resort to keystrokes and if statements.

if the visible of window 1 is true then
keystroke tab
keycode 32
else
delay 1.5
keystroke tab
keycode 32
end if

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Clicking a Pop Up Button in Quicken

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.