Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with locating Free Button on iBooks app page iTunes 11.2.2 and 11.3 #6

Open
jbutler135 opened this issue Sep 14, 2014 · 6 comments

Comments

@jbutler135
Copy link

(SOLVED: See last entry)

Keep having this error:

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

I am not totally sure how to remedy but this error has recently popped up. Tested on Mac iTunes 11.2.2 and 11.3, both hanging on first user creation right when it tries to find or use the Free button.

Batch is 25 users in length, not overdoing it.

Is there a fix I am implement to test out? I know enough to make me dangerous.

Thanks.

BTW, this script is a god-send. Saved my @$$.

JB

Seems to hang here:


tell application "iTunes"
open location "itms://itunes.apple.com/us/app/ibooks/id364709193?mt=8"
end tell
tell application "System Events"
get description of scroll area 1 of window 1 of application process "iTunes"
--> "Apple logo"
get menu "Store" of menu bar item "Store" of menu bar 1 of application process "iTunes"
--> menu "Store" of menu bar item "Store" of menu bar 1 of application process "iTunes"
get title of every menu item of menu "Store" of menu bar item "Store" of menu bar 1 of application process "iTunes"
--> {"Back", "Forward", "Home", "Reload Page", "", "Turn On iTunes Match", "Turn On Genius", "", "Authorize This Computer…", "Deauthorize This Computer…", "Deauthorize Audible Account…", "", "Sign In…", "Create Apple ID…", "Check for Available Downloads…"}
end tell
tell application "iTunes"
open location "itms://itunes.apple.com/us/app/ibooks/id364709193?mt=8"
end tell
tell application "System Events"
get description of scroll area 1 of window 1 of application process "iTunes"
--> "Apple logo"
get value of static text 1 of scroll area 1 of window 1 of application process "iTunes"
--> error number -1719 from static text 1 of scroll area 1 of window 1 of application process "iTunes"
get value of static text 1 of scroll area 1 of window 1 of application process "iTunes"
--> error number -1719 from static text 1 of scroll area 1 of window 1 of application process "iTunes"
get value of static text 1 of scroll area 1 of window 1 of application process "iTunes"
--> error number -1719 from static text 1 of scroll area 1 of window 1 of application process "iTunes"
get value of static text 1 of scroll area 1 of window 1 of application process "iTunes"
--> error number -1719 from static text 1 of scroll area 1 of window 1 of application process "iTunes"
count every UI element of UI element 1 of scroll area 1 of splitter group 1 of splitter group 1 of window 1 of application process "iTunes"
--> 41
get value of static text 1 of scroll area 1 of window 1 of application process "iTunes"
--> error number -1719 from static text 1 of scroll area 1 of window 1 of application process "iTunes"
get value of static text 1 of scroll area 1 of window 1 of application process "iTunes"
--> error number -1719 from static text 1 of scroll area 1 of window 1 of application process "iTunes"
get value of static text 1 of scroll area 1 of window 1 of application process "iTunes"
--> error number -1719 from static text 1 of scroll area 1 of window 1 of application process "iTunes"
get value of static text 1 of scroll area 1 of window 1 of application process "iTunes"
--> error number -1719 from static text 1 of scroll area 1 of window 1 of application process "iTunes"
end tell
tell application "AppleScript Editor"
display dialog "Errors were detected. What would you like to do?" buttons {"Abort", "Skip User", "Review"} default button "Review"
--> {button returned:"Review"}
display dialog "Showing error 1 of 1:

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

What would you like to do?" buttons {"Abort", "Manually Correct"} default button "Manually Correct"
--> {button returned:"Manually Correct"}
display dialog "Click continue when the error has been corrected.
If you cannot correct the error, then you may skip this user or abort the entire script" buttons {"Abort", "Skip User", "Continue"} default button "Continue"
--> {button returned:"Skip User"}
end tell
tell application "AppleScript Editor"
get «class desc» of «class scra» 1 of window 1 of «class pcap» "iTunes"
end tell
tell application "System Events"
get description of scroll area 1 of window 1 of application process "iTunes"
--> "Apple logo"
get value of static text 1 of scroll area 1 of window 1 of application process "iTunes"
--> error number -1719 from static text 1 of scroll area 1 of window 1 of application process "iTunes"
get value of static text 1 of scroll area 1 of window 1 of application process "iTunes"
--> error number -1719 from static text 1 of scroll area 1 of window 1 of application process "iTunes"
get value of static text 1 of scroll area 1 of window 1 of application process "iTunes"
--> error number -1719 from static text 1 of scroll area 1 of window 1 of application process "iTunes"
get value of static text 1 of scroll area 1 of window 1 of application process "iTunes"
--> error number -1719 from static text 1 of scroll area 1 of window 1 of application process "iTunes"
count every UI element of UI element 1 of scroll area 1 of splitter group 1 of splitter group 1 of window 1 of application process "iTunes"
--> 41

@jbutler135
Copy link
Author

Adding a piece:

Found this error when stopping process"

error "System Events got an error: User canceled." number -128 from static text 1 of scroll area 1 of window 1 of application process "iTunes"

@jbutler135
Copy link
Author

Think I solved it. Look for the following section in the "on installIbooks()" area:

set pageVerification to verifyPage("iBooks", "iBooks", 41, netDelay, true) --Looking for "iBooks", in the second element, on a page with a count of 39 elements, with a timeout of 5, and it requires the use of "group 1" for checking

See that 41 ? It was 39, switching it to 41 and saving the script to a new name seems to have solved it, so far.

More if I find more.

@jbutler135
Copy link
Author

Confirmed working in iTunes 11.3 now.

Use it and tweak that setting should iTunes GUI change again.

@R-Lin
Copy link

R-Lin commented Oct 3, 2016

hello friend, wo meet the same question now, wo try to solve it with your way that change 41 to 39, but it's not work, can you give me some another suggestion? Thanks

@BillCampbell
Copy link

@R-Lin There is a more recent version of the script at https://github.com/brandonusher/Apple-ID-AppleScript .
It worked as of Aug 2016, but it has been reported as not working again and it is no longer actively supported. However, if you want to try to fix it, you may find that easier by starting with this newer script.

@R-Lin
Copy link

R-Lin commented Oct 7, 2016

@BillCampbell thankyou so much! that is greatful for me !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants