Applescript "Expected end of line, but found property." Error using Google Chrome

I recently upgraded to OS Mavericks, and it looks like some of my Google Chrome related apps have stopped working properly.

I have a simple function that opens chrome and creates a new window.

on openWindow()
  tell application "Google Chrome"
      activate
      set newWin to make new window
      tell active tab of newWin to set URL to "http://play.google.com/music"
  end tell
end openWindow

However, this gives me an error: The expected end of the line, but the property found.

referring to the "tab" in "report active tab newWin". This link seems a bit useful, but I still don't understand how to fix this problem. Can someone help me get this job again? Thank.

+4
source share
6

, OS X 10.9.4, script

tell application "iTunes"
    return persistent ID of (first source where kind is library)
end tell

:

NSAppleScriptErrorBriefMessage = "Expected end of line but found property.";
NSAppleScriptErrorMessage = "Expected end of line but found property.";
NSAppleScriptErrorNumber = "-2741";
NSAppleScriptErrorRange = "NSRange: {45, 2}";

, , , ( ). AppleScript .

, Windows, Parallels . iTunes. , iTunes . , AppleScript, , . OS X iTunes, :

tell application "/Applications/iTunes.app"
    return persistent ID of (first source where kind is library)
end tell

, .

+2

10.9.2. - . , , , ...

on openWindow()

, , , .

openWindow()

, , ...

tell application "Google Chrome"
    activate
    set newWin to make new window
    tell active tab of newWin to set URL to "http://play.google.com/music"
end tell

, , .

0

tell application "Google Chrome"
activate
set newWin to make new window
tell active tab of newWin to set URL to "http://play.google.com/music" 
end tell

    tell application "Google Chrome"
activate
set newWin to make new window
tell active tab of newWin to set URL to "http://play.google.com/music"
tell application "System Events"
keystroke "f" using {command down, shift down}

end tell

0

, . script, - Parallels, . Parallels .

0

, , Chrome Mac OS, . Chrome, , Google Chrome Mac OS (Google Chrome.app), .

, , :

on openWindow()
    tell application "/Applications/Google Chrome.app"
    activate
  set newWin to make new window
    tell active tab of newWin to set URL to "http://play.google.com/music"
    end tell
end openWindow
0

, Parallels Desktop.

:

-, Parallels Desktop

-, reset Launch Services :

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -seed -r -f -v -domain local -domain user -domain system

script.

0

Source: https://habr.com/ru/post/1534908/


All Articles