Jump to content
Sign in to follow this  
UniStudent

simple button help i hope

Recommended Posts

UniStudent

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????

Share this post


Link to post
Share on other sites
BrettF

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.

Share this post


Link to post
Share on other sites
UniStudent

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

ooow sounds interesting is there any chance you could point me in the direction of an example so i can really understand it

Share this post


Link to post
Share on other sites
SniperSA

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.

Share this post


Link to post
Share on other sites
UniStudent

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.

Share this post


Link to post
Share on other sites
UniStudent

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

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  

×