Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Apps and Programs
Launching an applescript FROM firefox (URL bar?)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="dwilson" data-source="post: 1244953" data-attributes="member: 203223"><p><strong>Applescript to move Firefox windows</strong></p><p></p><p>I've been using Applescript recently to do simple task scripts lately, including parsing Firefox content. One of the things that bugs me about Firefox is that opening a new window always occurs just below the old one, so a lot of my windows are 20-30 pixels lower than I want, hiding the link/status bar at the bottom. So I too wanted to be able to shuffle windows around, but Firefox hasn't been working so well...</p><p></p><p>The change position part of the script seems to take 20-30 seconds to run at the top of my other scripts, or actually <strong>closes</strong> the window when placed at the end of my script. I reduced the active code to show below. Could I get a snippet of what you have that's working? I assume you're getting realistic response time, too... (I haven't gotten as far as showing scripts in Firefox yet, so can't help you there, sorry.)</p><p></p><p>tell application "Firefox" to activate</p><p>tell application "System Events"</p><p> tell process "Firefox"</p><p> tell window 1</p><p> set xy to position</p><p> if item 2 of position > 22 then</p><p> set position to {item 1 of xy, 22}</p><p> end if</p><p> #set size to {1070, 800}</p><p> end tell</p><p> end tell</p><p>end tell</p><p></p><p>Thanks!</p><p>Doug.</p></blockquote><p></p>
[QUOTE="dwilson, post: 1244953, member: 203223"] [b]Applescript to move Firefox windows[/b] I've been using Applescript recently to do simple task scripts lately, including parsing Firefox content. One of the things that bugs me about Firefox is that opening a new window always occurs just below the old one, so a lot of my windows are 20-30 pixels lower than I want, hiding the link/status bar at the bottom. So I too wanted to be able to shuffle windows around, but Firefox hasn't been working so well... The change position part of the script seems to take 20-30 seconds to run at the top of my other scripts, or actually [B]closes[/B] the window when placed at the end of my script. I reduced the active code to show below. Could I get a snippet of what you have that's working? I assume you're getting realistic response time, too... (I haven't gotten as far as showing scripts in Firefox yet, so can't help you there, sorry.) tell application "Firefox" to activate tell application "System Events" tell process "Firefox" tell window 1 set xy to position if item 2 of position > 22 then set position to {item 1 of xy, 22} end if #set size to {1070, 800} end tell end tell end tell Thanks! Doug. [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Apps and Programs
Launching an applescript FROM firefox (URL bar?)
Top