Jump to content

simple button help i hope


Recommended Posts

this is more of a question about best practice i will worry about implementing it later. i have several Autoit scripts that i would liked linked together, is it better to have them all contained into one single script or for nice neat code is it better to have them all separate. the catch is that i need to be able to compile it into 1 singe .exe at the end

if it is possible to keep the separate but still likened and in one exe can some one please explain????

Link to comment
Share on other sites

this is more of a question about best practice i will worry about implementing it later. i have several Autoit scripts that i would liked linked together, is it better to have them all contained into one single script or for nice neat code is it better to have them all separate. the catch is that i need to be able to compile it into 1 singe .exe at the end

if it is possible to keep the separate but still likened and in one exe can some one please explain????

You can use #include to include the likes of functions.

Link to comment
Share on other sites

Well, you could do this, I made a big GUI as my first one which had all my scripts run by a button.

Here is an example:

#include <GUIConstants.au3>

GUICreate("Example",200,200)
$Scriptname = GUICtrlCreateButton("Scriptname",0,0)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $Scriptname
            ;Insert your script here.
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Hope that helps.

Link to comment
Share on other sites

Well, you could do this, I made a big GUI as my first one which had all my scripts run by a button.

Here is an example:

c2--><!--CiNpbmNsdWRlICZsdDtHVUlDb25zdGFudHMuYXUzJmd0OwoKR1VJQ3VÐÖÎLÌUÌ]ØÕ[XÖÜÓZ]Ó]ÓPÚÒÂS]Ó^MÕLXVQÐNRQYTã6×F6ÕfDud6E###Fô¦äc#5uS$ç#&ÔgE¥5§Es÷wtÄD6¶Ee5dæÆDdã¥&-  QXÄåQMåa--XÉ¡ÁU5E½))¥5Ý5édݬÅéiåå%YMU±ÅéiåÁ
±QÉ°ÁdÉ)¥5MzY7bk1zZwoJCUNhc2Ug
JiMwMzY7U2NyaXB0bmFtZQoJCQk7SW5zZXJ0IHlvdXIgc2NyaXB0IGÛU]PÙÚÒLÐ[R^^[LLRÂÔZÒ[ÒÍZÕLÙÓÐÛÕ²ÒÒb3c#²b3c²b333²ÒÖVp

Hope that helps.

this works thanks for the reply

however when i try and use GUIDelete it only closes the initial gui but doesn't stop its script. this also makes the loading of each page very jerky does any one know if you can use frames like in a web page, for example have each of my scripts load inside one single gui. maby im going about this all wrong ARRRG! so confused.

Link to comment
Share on other sites

think iv fingered it out :rolleyes: im going to try and use the GUI show and hide options its realy long winded and i think its going to be abit messy but it will work. ill also get a single script that way. thanks for all ur help most appreciated

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...