#!/usr/bin/env python # Python script to be run in Moneydance to perform amazing feats of financial scripting from javax.swing import * from java.awt import GridLayout from javax.swing import JButton from javax.swing import JFrame from javax.swing import JOptionPane from javax.swing import JPanel import sys import time from com.infinitekind.moneydance.model import * from com.infinitekind.moneydance.model import OnlineInfo #root = moneydance.getRootAccount() root = moneydance.getCurrentAccountBook() onlineInfo = root.getOnlineInfo() serviceList = onlineInfo.getAllServices() services = [] for s in serviceList: services.append(s) selectedValue = JOptionPane.showInputDialog(None, "Select a service to delete", "Select a Service to Delete", JOptionPane.INFORMATION_MESSAGE, None, services, services[0]) if(selectedValue): service = serviceList[services.index(selectedValue)] service.deleteItem() print "Connection information successfully removed."