Here's what I have managed to put together. It works (of a sort) when I loop through the cPanel page, still doesn't read my users from the .csv file. I'm sure there's a more efficient way to structure this:
Code:
' cPanel email account quota change script v1.0 by Sean Murray (sean@baynetsystems.com)
' Copyright 2009 Bay Area Network Systems, LLC - http://baynetsystems.com
' In order for this script to work, you need to be logged into cpanel in the
' HOME>MAIL>EMAIL ACCOUNTS section of cPanel using the domain account login. (not root!)
' example: http://mydomain.com:2083/frontend/x3/mail/pops.html?domain=mydomain.com
VERSION BUILD=6210326 RECORDER=FX
TAB T=1
SET !ENCRYPTION NO
' Define your MS-DOS compatible CSV file.
' There should only be 1 column with usernames in your CSV file.
' This file typically lives in the iMacros/Datasources folder
' located in your "my documents" folder
CMDLINE !DATASOURCE MYFILENAME.csv
' Define the number of columns in your CSV file.
' In this example, we define the CSV as having 50 lines.
' Make sure that the 1st line in your CSV file is empty (blank).
SET !DATASOURCE_COLUMNS 150
' Nothing to define here.
SET !LOOP 2
SET !DATASOURCE_LINE 1
' Change mydomain.com to your actual domain.
' Make sure to leave the leading *%40 before the domain name.
TAG POS={{!LOOP}} TYPE=SPAN ATTR=ID:quota-txt-*%40MYDOMAIN.org CONTENT={{!COL1}}
' Change the CONTENT number to what you want the new quota to be.
' For example, if you want a 1000MB quota (1GB), choose: CONTENT=1000
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:quotaform ATTR=ID:quota CONTENT=250
' Nothing to define here.
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:quotaform ATTR=VALUE:Change
TAG POS=1 TYPE=A ATTR=TXT:Go<SP>Back
TAB T=1
URL GOTO=http://mail.MYDOMAIN.ORG:2082/frontend/x3/mail/pops.html?domain=MYDOMAIN.ORG
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=NAME:itemsperpage CONTENT=%100
' We'll make it easy on the server and wait 1 second in between imports.
' You can safely delete this last line if you really want to.
WAIT SECONDS=1
Where I am now is running the macro as above ignores my users in the csv and loops once to change the quota for user#2 on my cPanel listing and stops.
Play->Loop to max of 100, begins with user #2 on the cPanel listing and updates the quota for five total cPanel users (showing 100 per page) and then returns the following error, but again ignoring my .csv listing.
TypeError: this.dataSource[line - 1] is undefined, line 28
[I think I might be veering more into iMacro than cPanel territory here.]