Updated version of the Apple ID-creating Script

usher.br's picture

usher.br

Joined: Nov 30, 2015
Your rating: None (4 votes)

I have updated the script to work with versions 11.2.2 and 11.3

You can find the updated version here: https://github.com/brandonusher/Apple-ID-AppleScript

I have tested the creation process with the updated version while creating ~3,000 IDs and I only ran into one issue I couldn't fix, which is as follows:

  • Sometimes AppleScript won't be able to find the iTunes window, so it breaks. To fix this, just edit the spreadsheet to remove the IDs it has already created and run the script again.

If you have any questions, feel free to ask and I can try to help you out Smile

Top
duffjay's picture

duffjay

Joined: May 6, 2014
WWW

Agreed

Your rating: None
jerrybutler wrote:

Thanks for posting the proper lines. It ran for me last night, failed out at some point, but thats always been the case. Now, if Apple would just get real and generate institutional Apple IDs for us from a CSV, then we'd have something. They are still in denial somewhere in the corporate culture. Making us play games like this script, and looking the other way instead of giving us decent tools..

Preaching to the choir...

Top
dkubilos's picture

dkubilos

Joined: Apr 15, 2014

Unable to Verify that iTunes is Open at the iBooks App Store Pag

Your rating: None

This script has been incredible for us. New error though has me stuck.

Unable to Verify that iTunes is Open at the iBooks App Store -

iTunes is at the iBooks App Store and the iBooks icon is visible.

Any guidance much appreciated.

What tool is freely available that can display the UI elements on the page?

DK

Top
usher.br's picture

usher.br

Joined: Oct 11, 2013

Script Update

Your rating: None

Good Morning Everyong (PST here),

I updated the script last night to fix the issues of the "iBooks page not loaded", but it clearly being there.

Also, if you don't mind. If you have issues, please go to https://github.com/brandonusher/Apple-ID-AppleScript/issues to submit issues or see if someone has a similar issue and it also makes for easier tracking on my end for what I need to do on the script.

Top
dkubilos's picture

dkubilos

Joined: Apr 15, 2014

Big Thanks!

Your rating: None

Brandon, thank you and I will post issues on the github site.

I am surprised by how different the script can act on different machines. I am running script on 5 identical mac Airs connected to same WiFi network.

Should I look at network differences, processes, memory use...?

BiG thanks again.

DK

Top
pwldp's picture

pwldp

Joined: Sep 19, 2014

thanks for script and another error

Your rating: None

I'm run the script on:

OS X: 10.9.5
Region: Poland
Preffered language: English
AppleScript Editor: 2.6.1
iTunes: 11.4

I got error:
"Unable to verify that iTunes is open at the iBooks App Store Page"

Any solution?

Regards
pwldp

Top
usher.br's picture

usher.br

Joined: Oct 11, 2013

Fixes

Your rating: None

@dkubilos I'm not sure what to tell you. My iMac (Mid 2009 running 10.9 and iTunes 11.4) goes through 2-3 Apple IDs every minute.

@pwldp I just updated the script a day or so ago to fix that issue. Please redownload and try again

Top
pwldp's picture

pwldp

Joined: Sep 19, 2014

csv end of lines

Your rating: None

Hi,
According to http://stackoverflow.com/questions/10748453/replace-comma-with-newline-i..., I found that csv file should have ^J as an end of line.
You can change end of lines by:
```sed 's/^/\^J/g' appleids.csv > appleids_valid_newlines.csv```
where ^J is ctrl+v+j

Additionaly I've created Python script which generates csv file.
get it from: https://gist.github.com/pwldp/740b08ae23166c0d10ea
where end of line is ^ and you have to change it by sed.
I don't know how to insert proper end of line in this screipt?!


pwldp
Top
pwldp's picture

pwldp

Joined: Sep 19, 2014

Unable to verify that iTunes is open at the iBooks App Store Pag

Your rating: None

I get latest version of the script and the eror is the same.
Maybe Polish version of iTunes is different that English?
There is a screenshot: https://app.box.com/s/fzp2kraz0ivvb811e28o


pwldp
Top
pwldp's picture

pwldp

Joined: Sep 19, 2014

debug itunes, filling forms

Your rating: None

Hi again,

Another problems:

My Polish version page "Terms And Conditions..." is different than orginal and the script doesn't recognize it.

The script doesn't properly 'enter' date of birth. In my version should be:
```tell me to FillInPopup("Day", pop up button 1 of group 1 of group 13 of theForm, userBirthDay, 31)
tell me to FillInPopup("Month", pop up button 1 of group 2 of group 13 of theForm, userBirthMonth, 12)```
After that change is OK.

I have problem filling form: "Provide a Payment Method". Fields: "Apt., suite, bldg.", "Postcode", "Town" aren't filled. In my version there is no field "Province".

How can I debug those forms to get names of fields and pages.

I presume that all are Polish iTunes version problem.
Coul you give me some directions to better understand the script?

Thank you for any help.


pwldp
Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

Account Status field?

Your rating: None

I was hit with an error loading the fields.

set item loopCounter of columnContents to item columnToGet of item loopCounter of fileContents

"error "Can’t get item 22 of {\"email+record_16"...} number -1728 from item 22 of {\"email+record_16",....

22 is "account status".

Top
pwldp's picture

pwldp

Joined: Sep 19, 2014

Account Status field?

Your rating: None
janeitzey wrote:

I was hit with an error loading the fields.

set item loopCounter of columnContents to item columnToGet of item loopCounter of fileContents

"error "Can’t get item 22 of {\"email+record_16"...} number -1728 from item 22 of {\"email+record_16",....

22 is "account status".

Do you have comma at the end of data row?

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

Yes, it's the subsequent

Your rating: None

Yes, it's the subsequent records that do not have commas at the end of the record. Records 17 - 30 do not end with commas. I'm not sure why that.

Thanks for having me look at that.

Is account status supposed to be filled in? I haven't seen in the iTunes 11.3 where that is used.

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

I'm going back through the

Your rating: None

I'm going back through the older posts to read about Account Status and the splitter group 1 issue.

Top
pwldp's picture

pwldp

Joined: Sep 19, 2014

Yes, it's the subsequent

Your rating: None
janeitzey wrote:

Yes, it's the subsequent records that do not have commas at the end of the record. Records 17 - 30 do not end with commas. I'm not sure why that.

Thanks for having me look at that.

Is account status supposed to be filled in? I haven't seen in the iTunes 11.3 where that is used.

Hi,
account status is used during script work. And in csv file it should be empty.

I've created pull request to brandonushers script.
Could you test my version of the script from: https://github.com/pwldp/Apple-ID-AppleScript?

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

The "POL" localization stops

Your rating: None

The "POL" localization stops the script every time.

The CAN folder one runs into the same issue with detecting iBooks "iBooks" of group 1 of UI element 1 of scroll area 1 of splitter group 1 of splitter group 1 of window 1 of application process "iTunes". I tried commenting out the verification and that didn't help it along.

It also got stuck on the "I have read these terms..." agreement button.

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

The newest official script

Your rating: None

The newest official script seems to get me stuck on the "I have read these terms..." which I can manually correct in a dry run, but then gets stuck not finding the Email field.

tell me to FillInField("Email", text field "email@example.com" of group 2 of theForm, appleIdEmail)
-- 'ascr'\'err '{ '


':'utxt'("System Events got an error: Can’t get text field \"email@example.com\" of group 2 of UI element 1 of scroll area 1 of splitter group 1 of splitter group 1 of window \"iTunes\" of application process \"iTunes\"."), 'errn':-1728, 'erob':'obj '{ 'form':'name', 'want':'txtf', 'seld':'utxt'("email@example.com"), 'from':'obj '{ 'form':'indx', 'want':'sgrp', 'seld':2, 'from':'obj '{ 'form':'indx', 'want':'uiel', 'seld':1, 'from':'obj '{ 'form':'indx', 'want':'scra', 'se…

Still messing around with it.

Top
pwldp's picture

pwldp

Joined: Sep 19, 2014

The "POL" localization stops

Your rating: None
janeitzey wrote:

The "POL" localization stops the script every time.

The CAN folder one runs into the same issue with detecting iBooks "iBooks" of group 1 of UI element 1 of scroll area 1 of splitter group 1 of splitter group 1 of window 1 of application process "iTunes". I tried commenting out the verification and that didn't help it along.

It also got stuck on the "I have read these terms..." agreement button.

Oh gosh.. I forget to remove POL!
Edit the script and set: ``` property iTunesCountryCode : ""```. It is located near 40th line.

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

That script is also getting

Your rating: None

That script is also getting hung up on "I have read the terms..." (which I can manually correct) and not finding the Email field on the user page.

Top
pwldp's picture

pwldp

Joined: Sep 19, 2014

The newest official script

Your rating: None
janeitzey wrote:

The newest official script seems to get me stuck on the "I have read these terms..." which I can manually correct in a dry run, but then gets stuck not finding the Email field.

tell me to FillInField("Email", text field "email@example.com" of group 2 of theForm, appleIdEmail)
-- 'ascr'\'err '{ '


':'utxt'("System Events got an error: Can’t get text field \"email@example.com\" of group 2 of UI element 1 of scroll area 1 of splitter group 1 of splitter group 1 of window \"iTunes\" of application process \"iTunes\"."), 'errn':-1728, 'erob':'obj '{ 'form':'name', 'want':'txtf', 'seld':'utxt'("email@example.com"), 'from':'obj '{ 'form':'indx', 'want':'sgrp', 'seld':2, 'from':'obj '{ 'form':'indx', 'want':'uiel', 'seld':1, 'from':'obj '{ 'form':'indx', 'want':'scra', 'se…

Still messing around with it.

It seems that email field has anothe location that ins the script.
What language/region do you use?
Please send me screenshot of this page.


pwldp
Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

US/EnglishiTunes 11.3

Your rating: None

US/English
iTunes 11.3

Screenshot
screenshot

Top
pwldp's picture

pwldp

Joined: Sep 19, 2014

US/EnglishiTunes 11.3

Your rating: None
janeitzey wrote:

US/English
iTunes 11.3

Screenshot
screenshot

My "Provide Apple ID Details" page seems the same except day and month are interchanged.
My iTunes version is 11.4.
Maybe you should upgrade your iTunes?

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

No luck. Same two issues.

Your rating: None

No luck. Same two issues.

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

I'm running 10.8.5 if that

Your rating: None

I'm running 10.8.5 if that makes any difference.

Top
mpm42's picture

mpm42

Joined: Sep 23, 2014

Got it working. Some info that might help someone.

Your rating: None

Apple scripting is new to me. I won't be much help to resolve your specific issues, but I thought I'd list what I had to do to get it working for me in the US.

Mac Mini
OS X 10.9.4
Itunes 11.2.2

Download the batch script from the github and .csv from github.
Open the .csv in MS Excel 2013 (I was on my PC) and fill in all information.

When you enter the security questions into the form and the read me says copied "exactly as typed below" they don't mean to include the "- " in front of the spaces. As an example "What is the last name of your favorite elementary school teacher?" is correct. "- What is the last name of your favorite elementary school teacher?" is NOT correct.

I wasn't sure what they wanted entered for "account status" so I left that column blank and it worked fine. For the state just use the two letter initial, ie "NY" not "NY - New York" as its listed in iTunes.

Now that the .csv is done, save it and then open it in a text editor (Notepad++ on pc, Sublime Text on OS X). Make sure excel didn't put in TWO THOUSAND ROWS worth of blank values. This will choke the script. Save again.

Next we need to fix an issue where its asking for a Provence and Postal Code instead of a State and zip. (I've posted issue in github to be fixed, so by the time you are reading this you may be able to skip this step.)
-Open Enterprise iOS Apple ID Creator.applescript in your text editor.
-Go to line 1057 and replace line 1057 through 1069 with

try
set frontmost of application process "iTunes" to true --Verify that iTunes is the front window before performking keystroke event
set focused of pop up button "Select a state" of group 2 of group 10 of theForm to true
keystroke addressState
on error
set errorList to errorList & "Unable to set State drop-down to " & addressState
end try
---
try
set value of text field "Zip" of group 3 of group 10 of theForm to addressZip
on error
set errorList to errorList & "Unable to set Zip Code field to " & addressZip
end try

-save the script

-Go to your mac (if you're not already working on it)
-Open Itunes 11.2.2
-Go to the folder where you have your script and .csv saved. Double click the script and it will launch AppleScript Editor.
-Hit Run.
-It will ask you to select the .csv,
-choose the file with all your info
The program should now throw an error about being unable to control blah blah blah (sorry, didn't write down the exact error, but it has to do with universal access)
-Go to System Preferences
-Open Security & Privacy
-Choose Accessibility in the list on the left hand side.
You should see AppleScript Editor greyed out in the right hand side.
-Click lock icon
-Check the box next to AppleScript editor
-Click lock icon again.

Now when you hit "Run" in the Applescript Editor it should actually run the script. It will ask if you want to do a dry run or actually create the IDs. I suggest doing a dry run of an ID or two just to make sure all info gets entered correctly.

Some other things that absolutely did not work:
Itunes 10.7 on OS X 10.9.4
Itunes 11.2.2. on OS X 10.6.8

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

I did not get any

Your rating: None

I did not get any notifications about Accessibility on this computer. I tried my Mavericks machine and it got to the form perfectly. Then it started messing up password part and skipped security questions, but I'm making progress.

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

I changed "FillInKeyStroke"

Your rating: None

I changed "FillInKeyStroke" for password fields to "FillIinField" and I got the form filled out all the way to the end.

Now it's hung up on the Continue button for the form.

Woohoo!

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

My last error was "Retype

Your rating: None

My last error was "Retype your password" was actually labeled "Verify Password."
It won't tab over to the verify because it either doesn't know the name or it's wrong.

The rest of the form is filled out perfectly.

10.9.4
iTunes 11.4

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

I have a working script for

Your rating: None

I have a working script for 10.9.4 and iTunes 11.4.

I'm happy to email it to someone to post on their git.

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

Looks like it won't let any

Your rating: None

Looks like it won't let any of my accounts be created. Even manually. It says contact iTunes Support at www.apple.com/support/itunes/ww/.

I'm not sure if I'm being blocked or what.

Top
mpm42's picture

mpm42

Joined: Sep 23, 2014

Did you whitelist your IP

Your rating: None

Did you whitelist your IP with apple?

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

I'm in talks to do that now.

Your rating: None

I'm in talks to do that now.

Top
usher.br's picture

usher.br

Joined: Oct 11, 2013

New commits

Your rating: None

I have updated the script to fix an issue with the Canadian version getting into the main US version.

Also I merged a pull request from pwldp

Top
cjackson's picture

cjackson

Joined: Jan 7, 2014
WWW

Apple detecting scripts!

Your rating: None

Hi all, I just wanted to give you a heads up, in case this happens elsewhere or in the future.

I set IDs all the time for schools all over the City, but today I encountered something strange.
One of my schools had their purchase of iPads a while back, but we're only today ready to have them set up. The IDs were also created a while back, verified and enrolled into MDM.

All iPads wer set up,but 2 of them didn't receive any deployed apps. I thought it was odd, so attempted to purchase a free app directly on iPad just to check the basics. I got an error stating my Apple ID had been disabled. After speaking with my contact at Apple I got the following response.

"Looks like the accounts have been disabled because you used a script to set them up. Not sure why but I have re-enabled them. You should be able to proceed."
...naturally Apple won't provide any tools to help genuine customers set up Apple IDs for shared devices in schools.

Also, while I am sharing... It seems that deployment seems to have stopped working for all devices with Apple IDs created prior to iOS8. Not because of iOS8 but because the terms and conditions for the AppStore /iTunes have changed. All accounts need to accept the T&C before it continues to work again. And it's painful as the likely method is to visit each iPad and buy a free app just to get and accept the T&C prompt.

Again Apple contacted. No en-mass method of solving issue.

Fun and games!

Christian Jackson
@cjacksonuk

Top
coronado's picture

coronado

Joined: Jul 26, 2014

Apple detecting scripts!

Your rating: None

I've experienced this account lock a few times, and after contacting Apple they have been able to unlock the accounts (mostly by "reset" all accounts belonging to a certain domain).

Several times I've got the explanation that Apple can lock files "created by scripts" when they contain a lot of digits. So, if you hav first names or last names containing a digit you are observed and can be locked out with no further notice.

Also, when a lot of accounts share same in formation; same setup on recover questions and answers, same date of birth and so on, then you are observed.

So Apple is not detecting scripts per se, but they actually trace series of accounts that seems to be created automatically with some special characteristics. This is a automatic procedure, and therefore it is pretty simple for Apple to reset - when you got contact with the right person.

Top
dkubilos's picture

dkubilos

Joined: Apr 15, 2014

Script

Your rating: None

I'd love to see it. If you could email it me. dkubilos@oxnarsd.org

I am on 10.9.5 and iTunes 11.4

Your Zip code edit fixed an issue.

But now. . .

Script won't continue on errors.

"Can't get UI element "Provide Payment Method" error shows and script halts.

Thank you

DK

Top
IOS's picture

IOS

Joined: Sep 30, 2014

Security Questions

Your rating: None

I am having an issue with the security questions.
The first question goes in fine but question 2 and 3 are having issues.
In the csv file I have for question 1 What was the name of your first pet?
In the csv file I have for question 2 What is your favorite children's book?
In the csv file I have for question 3 What is the name of your favorite sports team?
When the script runs it selects for question 2 Who was your favorite film star or character in school? and for question 3 it selects What was the first album that you purchased?
After the page is filled out the script stops with errors. I click review and the dialog box says Unable to fill Second Security Question. I click manually correct and select the correct question then it says Unable to fill Third Security Question. I click manually correct and select the correct question and then the script continues.
I have tried doing a cut and past of the question from the read.me into the csv and manually typing in the question exactly the way it shows in iTunes with the same result.
Any idea how to get all 3 security questions working properly?

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

dkubilos@oxnarsd.org

Your rating: None

I was not able to email you my script. The email address got returned.

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

I posted a copy on Pastebin

Your rating: None

I posted a copy on Pastebin for anyone running iTunes 11.4 and OSX 10.9.4. That is what my system was running when I made 90 accounts yesterday.

http://pastebin.com/MwVQQftA

Top
janeitzey's picture

janeitzey

Joined: Sep 23, 2014

Sorry, that one only lives

Your rating: None

Sorry, that one only lives for an hour. Here is an AppleScript formatted, permanent, unlisted link.

http://pastebin.com/PDf8wZ5Q

Top
kezza47's picture

kezza47

Joined: Oct 2, 2014

Would anybody using this in

Your rating: None

Would anybody using this in the UK be able to post a copy of the script they are using? Really struggling with the localisation parts on the billing info page.

Also on the uk store it doesn't get past the Free button or agree to terms and conditions checkbox. These have to be manually entered at the moment. (If i change to store to US these work)

Thanks

Tom

Top
tyreun's picture

tyreun

Joined: Oct 2, 2014

new update for French localization

Your rating: None

Hi,

Here is an update from the script that work with french settings in iTunes

http://pastebin.com/Js1AhNgT

OSX 10.9.5
iTunes 11.4
English language
French settings in iTunes
Side bar and Status bar turned on

90 AppleId were made today.

Top
pwldp's picture

pwldp

Joined: Sep 19, 2014

Free button

Your rating: None

Hi kezza47,

You have to add in the script to `supportedFreeButtonDescriptions` property value which you can find in script's log.
The logs line looks like:
<code language="html">
get description of button 1 of group 2 of UI element 1 of scroll area 1 of splitter group 1 of splitter group 1 of window "iTunes" of application process "iTunes"
--> "0,00 € Free, iBooks"
</code>
Current supported values are: "$0.00 Free, iBooks", "0,00 € Free, iBooks"

Top
pwldp's picture

pwldp

Joined: Sep 19, 2014

new update for French localization

Your rating: None
tyreun wrote:

Hi,

Here is an update from the script that work with french settings in iTunes

http://pastebin.com/Js1AhNgT

OSX 10.9.5
iTunes 11.4
English language
French settings in iTunes
Side bar and Status bar turned on

90 AppleId were made today.

Thanks,
Good work.

Top
kezza47's picture

kezza47

Joined: Oct 2, 2014

Thanks for the help, i added

Your rating: None

Thanks for the help, i added "£0.00 Free, iBooks" to the supported values and this now gets past the free button link.

Will keep on going see where i get to next.

Tom

Top
kezza47's picture

kezza47

Joined: Oct 2, 2014

The last part i am struggling

Your rating: None

The last part i am struggling with is the post code and Phone number fields. Anybody in the UK had experience of this?

this is the section in the script i believe needs to change? I would be very grateful if someone could provide me with some assistance.

Tom

--start localization

set curPostalCodeFieldName to "Zip"
set curPostalCodeFieldPos to 3
set enableAreaCode to true
if iTunesCountryCode is "POL" then
set curPostalCodeFieldName to "Postcode"
set curPostalCodeFieldPos to 1
end if
if iTunesCountryCode is "GBR" then
set curPostalCodeFieldName to "Postcode"
set curPostalCodeFieldPos to 1
set enableAreaCode to false
end if

--end localization

Top
Pomeroy's picture

Pomeroy

Joined: Sep 13, 2014
WWW

itunes 11.0.5 doesn't enter itunes store

Your rating: None

I had my script working perfekt using Lion and itunes 11.0.5. Now I can't enter itunes store content to make more accounts.
Anyone having the same issue?

Top
Pomeroy's picture

Pomeroy

Joined: Sep 13, 2014
WWW

yes please!

Your rating: None

Please do send your working script to if you please!
My script stopped working with older itunes.

levallius@hotmail.com

Top
shiva's picture

shiva

Joined: Oct 9, 2014

Hi all, We need to create

Your rating: None

Hi all,

We need to create 1000-1500 apple IDs here in the UK, but can't get the scripts to work. Has anyone managed for the UK and can share script, or does anyone offer a service creating the IDs for others?

Top
cjackson's picture

cjackson

Joined: Jan 7, 2014
WWW

Will help you...

Your rating: None
shiva wrote:

Hi all,

We need to create 1000-1500 apple IDs here in the UK, but can't get the scripts to work. Has anyone managed for the UK and can share script, or does anyone offer a service creating the IDs for others?

If you are still struggling, I manage iPad and Mac deployments in many schools (especially London). I can probably help with script, or help you create IDs.

Send us an email on where you are and how far you have got. Include contact details and I'll give you a shout tomorrow.
cjackson@getitqualified.co.uk

Christian Jackson
@cjacksonuk

Top
coronado's picture

coronado

Joined: Jul 26, 2014

Re: Hi all, We need to create

Your rating: None
shiva wrote:

Hi all,

We need to create 1000-1500 apple IDs here in the UK, but can't get the scripts to work. Has anyone managed for the UK and can share script, or does anyone offer a service creating the IDs for others?

Hello!

From colleagues here in Finland and also in Norway, I've heard that the swedish company Atea actually is offering a "batch-create-Apple-ID" service, primarily delivering to school districts and townships. As far as I know, they've solved the whole process from creating the Apple-ID:s to verify them, and they will deliver all Apple-IDs with all information in an Excel spread sheet.

I took a look at their web site, and they have a special Apple part at http://www.atea.se/apple . Unfortunately, they doesn't seem to mention this service, but I guess you just have to mail them.

Top

Who is online?

There are currently 0 admins, 0 users and 14 guests online. Connected users: .

Recent Activity