Jump to content
Sign in to follow this  
kryptar

always on top

Recommended Posts

kryptar

it is the simplest gui, but it is all i need. i originally just wrote a pile of macros and scripts to automate some tasks i need to do a lot and set them all with hotkeys to function, worked great, but in a hurry i often hit wrong keys or do other stupid things, so created this simply gui with a button for each task. easy as works great clik and run, But i really want it to always be on top its why i made it simple and the size it is, i have read and read and am havin much trouble doing this, if anyone has a suggestion, or maybe just the place i should be reading would be great.

#include <GUIConstantsEx.au3>

GUICreate("Task Automater", 100, 500)
$button1 = GUICtrlCreateButton("Reader", 20, 10, 60)
$button2 = GUICtrlCreateButton("Write", 20, 40, 60)
$button3 = GUICtrlCreateButton("Convert", 20, 70, 60)
$button4 = GUICtrlCreateButton("Mail All", 20, 100, 60)
$button5 = GUICtrlCreateButton("Customer", 20, 130, 60)
$button6 = GUICtrlCreateButton("if needed", 20, 180, 60)
$button7 = GUICtrlCreateButton("if needed", 20, 210, 60)
$button8 = GUICtrlCreateButton("if needed", 20, 240, 60)

GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()

    Select
        Case $msg = $button1
            Run("C:\Users\paul\Documents\evony macros\autoscript\report reader.exe")
        Case $msg = $button2
            Run("C:\Users\paul\Documents\evony macros\autoscript\report write.exe")
        Case $msg = $button3
            Run("C:\Users\paul\Documents\evony macros\autoscript\report convert.exe")
        Case $msg = $button4
            Run("C:\Users\paul\Documents\evony macros\autoscript\report mail all.exe")
        Case $msg = $button5
            Run("C:\Users\paul\Documents\evony macros\autoscript\report customer.exe")
        Case $msg = $button6
            Run("C:\Users\paul\Documents\evony macros\autoscript\")
        Case $msg = $button7
            Run("C:\Users\paul\Documents\evony macros\autoscript\")
        Case $msg = $button8
            Run("C:\Users\paul\Documents\evony macros\autoscript\")
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd

Share this post


Link to post
Share on other sites
Klovis

For the GuiCreate try this

GUICreate("Task Automater", 100, 500,-1,-1,-1,$WS_EX_TOPMOST)

Share this post


Link to post
Share on other sites
Klovis

Would you like me to annotate it for you?

Share this post


Link to post
Share on other sites
kryptar

Would you like me to annotate it for you?

yes a little more help would be great just adding that line is obviously not enough, this is my first gui and i am more than a little lost and confused

Share this post


Link to post
Share on other sites
JohnOne

Simply change

GUICreate("Task Automater", 100, 500)

into

GUICreate("Task Automater", 100, 500,-1,-1,-1,$WS_EX_TOPMOST)

And add

#include <WindowsConstants.au3>

Underneath

#include <GUIConstantsEx.au3>


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
kryptar

and that works perfectly thanks to all. i was on the rite track after the first comment i added that and read everything i could find regarding #include i was sure thats what i needed. just couldnt put a finger on exactly what was missing.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.