Slothovan Posted March 20, 2006 Share Posted March 20, 2006 What I want to do is create a GUI with an Install button which will activate a AutoIt script I created, and an Uninstall button which will close the programs. I have no idea where to even start at this.. This is my code. #NoTrayIcon MsgBox(64,"EzExit Loaded!", "EzExit has been loaded successfully. ") $d2window = IniRead("EzExit.ini", "General", "D2Window", "NotFound") $altf4 = IniRead("EzExit.ini", "General", "AltF4", "NotFound") HotKeySet("{HOME}", "Terminate") HotKeySet($altf4, "AltF4") Func Terminate() MsgBox(64,"EzExit Terminated!", "EzExit has been closed successfully.") Exit 0 EndFunc Func AltF4() WinWaitActive($d2window) send("{altdown}") send("{F4}") send("{altup}") Return EndFunc While (1) Sleep(100) Wend Here is my INI file [General] ;Name of the Diablo II window. D2Window=Diablo II ;HotKey to Alt+F4. AltF4={F11} Thank you, Slothovan Link to comment Share on other sites More sharing options...
Nuffilein805 Posted March 20, 2006 Share Posted March 20, 2006 try this #include <guiconstants.au3> $main = guicreate ("MAIN", 300, 300) $main_install = guictrlcreatebutton ("INSTALL", 10, 10) $main_uninstall = guictrlcreatebutton ("UNINSTALL", 10, 40) ; the rest you want to add guisetstate() while 1 $msg = guigetmsg() if $msg = $GUI_EVENT_CLOSE then exit if $msg = $main_install then run ("autoit3.exe your script") if $msg = $main_uninstall then sleep (100); don't have a clue what you mean by closing the programms so i added a sleep :) wend have fun my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
Slothovan Posted March 21, 2006 Author Share Posted March 21, 2006 Thank you, and is there a way to have the script in the GUI, or turn a Au3 script into a DLL so it loads that? Link to comment Share on other sites More sharing options...
Nuffilein805 Posted March 21, 2006 Share Posted March 21, 2006 just copy it in there as a udf the whole thing might look like this #include <guiconstants.au3> $main = guicreate ("MAIN", 300, 300) $main_install = guictrlcreatebutton ("INSTALL", 10, 10) $main_uninstall = guictrlcreatebutton ("UNINSTALL", 10, 40) ; the rest you want to add guisetstate() while 1 $msg = guigetmsg() if $msg = $GUI_EVENT_CLOSE then exit if $msg = $main_install then thescript() if $msg = $main_uninstall then sleep (100); don't have a clue what you mean by closing the programms so i added a sleep :) wend func thescript() for $i = 1 to 100 step 1; here is where your script goes sleep 100; and here splashtexton($i, $i); and here next; ... endfunc my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
Slothovan Posted March 21, 2006 Author Share Posted March 21, 2006 Woot, thank you so much man. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now