X
Tap here to go to the mobile version of the site.

Fóram Tacaíochta

Cuireadh an snáithe seo sa chartlann. Cuir ceist nua má tá cabhair uait.

applescript can't get name of front window

Postáilte

The AppleScript support seems broken or unreliable (at least on OSX 10.10.1).

For example, this little, very basic script worked in Firefox 33 but now (34?, 35 or 36) NOT anymore:

tell application "Firefox" name of front window end tell

==> error "plugin-container got an error: Can’t get name of window 1." number -1728 from name of window 1


Hint: If you check the output of the next applescript snippet, you see that the 'windows' don't even get a correct id.

tell application "Firefox" windows end tell

The AppleScript support seems broken or unreliable (at least on OSX 10.10.1). For example, this little, very basic script worked in Firefox 33 but now (34?, 35 or 36) NOT anymore: tell application "Firefox" name of front window end tell ==> error "plugin-container got an error: Can’t get name of window 1." number -1728 from name of window 1 Hint: If you check the output of the next applescript snippet, you see that the 'windows' don't even get a correct id. tell application "Firefox" windows end tell

Tuilleadh mionsonraí faoin chóras

Breiseáin Shuiteáilte

  • Provides information about the default web browser
  • Displays Java applet content, or a placeholder if Java is not installed.
  • The QuickTime Plugin allows you to view a wide variety of multimedia content in web pages. For more information, visit the QuickTime Web site.
  • Shockwave Flash 16.0 r0

Feidhmchlár

  • Firefox 36.0
  • User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:36.0) Gecko/20100101 Firefox/36.0
  • URL Tacaíochta: https://support.mozilla.org/1/firefox/36.0/Darwin/en-US/

Eisínteachtaí

  • 1Password 4.2.5 (onepassword4@agilebits.com)
  • Abbreviations for Zotero 1.0.189 (abbreviations-for-zotero@mystery-lab.com)
  • Adblock Plus 2.6.7 ({d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d})
  • Apollo Sync for Firefox 2.0.1 (ffsync@apollobrowser.com)
  • AutoPager 0.8.0.10 (autopager@mozilla.org)
  • DownloadHelper 4.9.24 ({b9db16a4-6edc-47ec-a1f4-b86292ed211d})
  • DownThemAll! 2.0.17 ({DDC359D1-844A-42a7-9AA1-88A850A938A8})
  • Firebug 2.0.7 (firebug@software.joehewitt.com)
  • Item History for Zotero 1.0.65 (zotero-item-history@mystery-lab.com)
  • keyconfig 20110522 (keyconfig@dorando)
  • MozRepl 1.1.2 (mozrepl@hyperstruct.net)
  • Paper Machines 0.4.9 (papermachines@chrisjr.org)
  • RTF/ODF Scan for Zotero 1.0.22 (rtf-odf-scan-for-zotero@mystery-lab.com)
  • Zotero 4.0.25.2 (zotero@chnm.gmu.edu)
  • Zotero Auto Index Plugin 0.0.33 (auto-index@iris-advies.com)
  • Zotero automatic export 1.1.8 (zotero-autoexport-bib@rokdd)
  • Zotero autotranslating 1.1.2 (webopac2zotero@rokdd)
  • Zotero Better Bib(La)Tex 0.7.5 (better-bibtex@iris-advies.com)
  • Zotero Bibliography Locale Switcher 1.0 (zotbiblioswitchlocal@somwhere.org)
  • Zotero LibreOffice Integration 3.5.9 (zoteroOpenOfficeIntegration@zotero.org)
  • Zotero Plugin to get date from last-modified 0.0.8 (date-from-last-modified@iris-advies.com)
  • Zotero Report Customizer 0.2.5 (report-customizer@iris-advies.com)
  • Zotero Scholar Citations 1.8.8 (zoteroscholarcitations@beloglazov.info)
  • Zotero Storage Scanner Plugin 0.0.15 (storage-scanner@iris-advies.com)
  • Zotero-to-BibDesk auto-import utility 2.0.6 (zot2bib@mackerron.com)
  • ZoteroQuickLook 1.3.1 (zoteroquicklook@gmail.com)
  • zotxt 0.1.17 (zotxt@e6h.org)
  • Zutilo Utility for Zotero 1.2.10 (zutilo@www.wesailatdawn.com)
  • Adobe Acrobat - Create PDF 1.1 (web2pdfextension@web2pdf.adobedotcom) (Neamhghníomhach)
  • Context Search X 0.4.6.21 (contextsearch2@lwz.addons.mozilla.org) (Neamhghníomhach)
  • Download Youtube Videos + 12.9.6 (video.downloader.plugin@ffpimp.com) (Neamhghníomhach)
  • Extended Copy Menu (fix version) 1.6.1c (extended.copy.menu@fix.version) (Neamhghníomhach)
  • Extended Statusbar 2.0.3 ({daf44bf7-a45e-4450-979c-91cf07434c3d}) (Neamhghníomhach)
  • Flash Video Downloader - YouTube HD Download [4K] 6.9.3 (artur.dubovoy@gmail.com) (Neamhghníomhach)
  • Garmin Communicator 4.1.0 ({195A3098-0BD5-4e90-AE22-BA1C540AFD1E}) (Neamhghníomhach)
  • Pocket 3.0.6 (isreaditlater@ideashower.com) (Neamhghníomhach)
  • Readability 2.4 (readability@readability.com) (Neamhghníomhach)
  • SEASR Analytics for Zotero 0.4.7 (zotero@seasr.org) (Neamhghníomhach)
  • Torbutton 1.4.6.3 ({e0204bd5-9d31-402b-a99d-a6aa8ffebdca}) (Neamhghníomhach)
  • Translator 3.1 Community Toolbar 3.21.0.1 ({3eec3c07-13c6-4b41-87c6-40b425a0b0a2}) (Neamhghníomhach)
  • Xmarks 4.3.5 (foxmarks@kei.com) (Neamhghníomhach)
  • YouTube quality manager 1.2 (youtubequality@rzll) (Neamhghníomhach)
  • ZotFile 4.1.1 (zotfile@columbia.edu) (Neamhghníomhach)

JavaScript

  • incrementalGCEnabled: True

Grafaic

  • adapterDescription:
  • adapterDeviceID: 0x6720
  • adapterDrivers:
  • adapterRAM:
  • adapterVendorID: 0x1002
  • driverDate:
  • driverVersion:
  • info: {u'AzureCanvasBackend': u'quartz', u'AzureFallbackCanvasBackend': u'none', u'AzureContentBackend': u'quartz', u'AzureSkiaAccelerated': 0}
  • numAcceleratedWindows: 1
  • numTotalWindows: 1
  • webglRenderer: ATI Technologies Inc. -- AMD Radeon HD 6970M OpenGL Engine
  • windowLayerManagerRemote: True
  • windowLayerManagerType: OpenGL

Sainroghanna Athraithe

Éagsúil

  • User JS: No
  • Inrochtaineacht: Níl

Freagra Cabhrach

A further hint (tested on firefox version 35 and 36):

In the script, application 'Firefox' gets replaced by 'plugin-container' when compiling the script !!!

A further hint (tested on firefox version 35 and 36): In the script, application 'Firefox' gets replaced by 'plugin-container' when compiling the script !!!
FredMcD
  • Top 10 Contributor
4254 réiteach 59583 freagra

Have you contacted the real AppleScript support people ?

Have you contacted the real AppleScript support people ?

Úinéir na ceiste

Hello Fred,

Where, at Apple or at Firefox?

This is clearly a Firefox issue.

Thank you, Emelin

Hello Fred, Where, at Apple or at Firefox? This is clearly a Firefox issue. Thank you, Emelin
FredMcD
  • Top 10 Contributor
4254 réiteach 59583 freagra

You are having problems with AppleScript. Are you having problems with anything else? If not, then you should speek to AppleScript support. If you are having other issues, tell us what they are.

You are having problems with AppleScript. Are you having problems with anything else? If not, then you should speek to AppleScript support. If you are having other issues, tell us what they are.

Úinéir na ceiste

Ok Fred, I try again.

1.) Firefox supports AppleScript, at least the very basic functionality. 2.) In Firefox 33 everything works as expected. 3.) I want to get the name of the frontmost window that is open in Firefox. 4.) However, the current Firefox 35 (and devel 36) do not return the name anymore but the error reported above. 5.) This means it should be considered a problem of the newer Firefox versions. 6.) I hinted at the problem by providing my observations that a) the list returned by the 2nd little code snippet I posted would not have ID assigned to the windows as all other OSX applications supporting applescript do; b) the application string "Firefox" in the script is changed to "plugin-container" when the script is compiled by the Apple Script Editor. This replacement did not happen with Firefox 33.

I hope this explains my issue that I cannot get the name of the frontmost window anymore.

By the way, have you ever tried the posted code snippets? Thank you!

Cheers, Emelin

Ok Fred, I try again. 1.) Firefox supports AppleScript, at least the very basic functionality. 2.) In Firefox 33 everything works as expected. 3.) I want to get the name of the frontmost window that is open in Firefox. 4.) However, the current Firefox 35 (and devel 36) do not return the name anymore but the error reported above. 5.) This means it should be considered a problem of the newer Firefox versions. 6.) I hinted at the problem by providing my observations that a) the list returned by the 2nd little code snippet I posted would not have ID assigned to the windows as all other OSX applications supporting applescript do; b) the application string "Firefox" in the script is changed to "plugin-container" when the script is compiled by the Apple Script Editor. This replacement did not happen with Firefox 33. I hope this explains my issue that I cannot get the name of the frontmost window anymore. By the way, have you ever tried the posted code snippets? Thank you! Cheers, Emelin

Athraithe ag emelin ar

FredMcD
  • Top 10 Contributor
4254 réiteach 59583 freagra

I don't know code snippets, but there are others who do.

I've called the big guys to help you. Good luck.

I don't know code snippets, but there are others who do. I've called the big guys to help you. Good luck.

Úinéir na ceiste

"code snippets" is not an application or editor or the like but should have simply refered to the 'little bits of code' I have posted in my 1st mail.

Please excuse my English.

Thank you Fred, for listening and forwarding! Emelin

"code snippets" is not an application or editor or the like but should have simply refered to the 'little bits of code' I have posted in my 1st mail. Please excuse my English. Thank you Fred, for listening and forwarding! Emelin

Úinéir na ceiste

Hello again, any hope to get an answer on that issue?

Furhter tests (now on the most recent firefox 35.0.1) show, that as soon as the flash plugin get's activated the firefox applescript interface addresses an application named "plugin-container" instead of the supposed application "Firefox"!

As soon as you deactivate the flash plugin permanently and restart firefox, the above posted scripts do behave normally again and as expected.

Yes, I know, Flash proved many times to be the worst plague ever. Still, I am afraid, this issue has to be solved by firefox.

Hello again, any hope to get an answer on that issue? Furhter tests (now on the most recent firefox 35.0.1) show, that as soon as the flash plugin get's activated the firefox applescript interface addresses an application named "plugin-container" instead of the supposed application "Firefox"! As soon as you deactivate the flash plugin permanently and restart firefox, the above posted scripts do behave normally again and as expected. Yes, I know, Flash proved many times to be the worst plague ever. Still, I am afraid, this issue has to be solved by firefox.
FredMcD
  • Top 10 Contributor
4254 réiteach 59583 freagra

All that is out of my element. But I can give you this;

Update your Flash Player v16.0.0.296
https://www.adobe.com/products/flashplayer/distribution3.html

This just came out.

All that is out of my element. But I can give you this; Update your Flash Player '''v16.0.0.296<br>https://www.adobe.com/products/flashplayer/distribution3.html''' This just came out.

Úinéir na ceiste

Sorry Fred, that has no effect.

I can only repeat that this is a problem of firefox.

Can't anybody react to this quite specific and easily reproduced bug-report of mine whose "element" it actually is?

Thank you!

Sorry Fred, that has no effect. I can only repeat that this is a problem of firefox. Can't anybody react to this quite specific and easily reproduced bug-report of mine whose "element" it actually is? Thank you!
guigs 1072 réiteach 11697 freagra

You may be able to find some insight here, however if they are different bugs, then use these bugs as reference for where/what category to file a new one. (also who to cc ;-))

You may be able to find some insight here, however if they are different bugs, then use these bugs as reference for where/what category to file a new one. (also who to cc ;-)) *[https://bugzilla.mozilla.org/show_bug.cgi?id=516502] *[https://bugzilla.mozilla.org/show_bug.cgi?id=119091]-> this one seems to indicate that the name of the app is Mozilla. However they may be interchangible.

Úinéir na ceiste

Thanks for this more helpful reply.

The bugs hinted at are age-old, but still open. Yet, what's reported there is not my problem.

The name of the app is Firefox as one can gather from https://wiki.mozilla.org/Mac:AppleScript and the recent bugs there. However mine is not covered. So, finally, I will file a bug report.

Thanks for this more helpful reply. The bugs hinted at are age-old, but still open. Yet, what's reported there is not my problem. The name of the app is Firefox as one can gather from https://wiki.mozilla.org/Mac:AppleScript and the recent bugs there. However mine is not covered. So, finally, I will file a bug report.