Sign in to follow this  
Followers 0
gius

zoom size page word

3 posts in this topic

#1 ·  Posted (edited)

Hello everyone,
I want to develop a small program
for people with vision problems:
increase or decrease the size of the page word or browser
with buttons,
like the ctrl and middle mouse button.

So:
clicking on the button "+"
increase zoom level
equals the ctrl key and middle button mouse forward,
clicking on the button "-"
decrease zoom level
equals the ctrl key and middle button mouse back.

I started with the GUI

 

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ###
$Form1 = GUICreate("", @DesktopWidth - 50, 50, 20, 0, BitOR($GUI_SS_DEFAULT_GUI,$WS_SIZEBOX,$WS_THICKFRAME))
$Label1 = GUICtrlCreateLabel("ZOOM", 16, 20, 62, 28)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("+", 96, 10, 33, 33)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("-", 141, 10, 33, 33)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $Button1
        Case $Button2
            Exit

    EndSwitch
 WEnd

 Send("{CTRLDOWN}")

but I can not understand how to enter any events,

can you help me?

thank you

Edited by gius

Share this post


Link to post
Share on other sites



Have a look at the _IsPressed command.


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites

thanks for the reply.

Maybe I did not write well in English the event:

If I click the button 1
emulating the click CTRL key and the middle mouse button.

 CTRLDOWN and MouseClick("Middle")

How can I solve?

thank you

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0