Jump to content
Sign in to follow this  
daslick

Universal GUI, any resolution

Recommended Posts

daslick

I've always tried to make my guis small enough that on computers with smaller resolutions it doesn't look too bad... but as hard as a try.. they always looked bad.

I started writing my scripts like

$GUI = GUICreate("Title", 0.5 * @DesktopWidth, 0.6 * @DesktopHeight, 0.2 * @DesktopWidth, 0.01 * @DesktopHeight)

I realize this isn't a complicated script, so don't flame me... it is just a helpful little tool that I made to help me convert some large programs.

Select the text of the Left, Top, Width, or Height attributes

then....

Press W or 1 to convert Width/Left attributes

Press H or 2 to convert Height/Top attributes

HotKeySet("h","heightconvert")
HotKeySet("w","widthconvert")
HotKeySet("1","heightconvert")
HotKeySet("2","widthconvert")
while 1
    sleep(1000)
WEnd
Func heightconvert()
    send("^c")
    HotKeySet("h")
    HotKeySet("w")
    send(Round(clipget() / @DesktopHeight,10) & " * @DesktopHeight")
    HotKeySet("w","widthconvert")
    HotKeySet("h","heightconvert")
EndFunc

Func widthconvert()
    send("^c")
    HotKeySet("h")
    HotKeySet("w")
    send(Round(clipget() / @DesktopWidth,10) & " * @DesktopWidth")
    HotKeySet("w","widthconvert")
    HotKeySet("h","heightconvert")
EndFunc
Edited by daslick

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  

×