billshu Posted September 6, 2014 Posted September 6, 2014 I use the following function to set the Zoom Level in Chrome. I just send a bunch of zoom downs then zoom up to the desired zoom level. It works great, but now i am running multi instantances of Chrome at the same time. All Chrome windows are affected by this function. Is there an easy way to set zoom in only one instance of Chrome Func SetZoom($LocalZoom) ;Chrome Zoom levels are: 25, 33, 50, 67, 75, 90, 100 sleep(3000) WinActivate($MyWindowHandle) sleep(200) send("^-") sleep(200) send("^-") sleep(200) send("^-") sleep(200) send("^-") sleep(200) send("^-") sleep(200) send("^-") sleep(200) send("^-") sleep(200) send("^-") sleep(200) send("^-") sleep(200) send("^-") sleep(200) ; Zoom should now be 25 If $LocalZoom > 32 Then Send("^{+}") ; Zoom Level is now 33 sleep(200) EndIf If $LocalZoom > 49 Then Send("^{+}") ; Zoom Level is now 50 sleep(200) EndIf If $LocalZoom > 66 Then Send("^{+}") ; Zoom Level is now 67 sleep(200) EndIf If $LocalZoom > 74 Then Send("^{+}") ; Zoom Level is now 75 sleep(200) EndIf If $LocalZoom > 89 Then Send("^{+}") ; Zoom Level is now 90 sleep(200) EndIf If $LocalZoom > 99 Then Send("^{+}") ; Zoom Level is now 100 sleep(200) EndIf Sleep(1500) Return(1) EndFunc Fadi 1
JohnOne Posted September 6, 2014 Posted September 6, 2014 (edited) ^+ amd ^- only affect the active window and tab. Edited September 6, 2014 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
JohnOne Posted September 6, 2014 Posted September 6, 2014 For the most part >yes, but it is not as simple as 123 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
vkrisz81 Posted September 6, 2014 Posted September 6, 2014 Yes it really dont easy.. And the enduser need must to do, while to ie he has only upgrade his browser... Ty
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now