taultunleashed logoMake A Simple Gui In AutoIt, Ready To Add Macros And Stuff : General Discussion
newtopic  postreply
 [ 3 posts ] 
blue large dot

Make A Simple Gui In AutoIt, Ready To Add Macros And Stuff : General Discussion

Posted: June 21st, 2007, 1:44 am
 
mak364
mak364's Reps:
User avatar
This Is Maks Guide On How To Make A Gui in auto It That Can Then Be Used To Start Macros For Games

Firstly we are going to want downlaod autoit (duh) so click on this link
http://www.autoitscript.com/autoit3/downloads.php
The click on download autoit v3
now once its installed go Start > Programs > AutoIt > Scite Script Editor
And This Should Load Up

(!empty($user->lang['IMAGE'])) ? $user->lang['IMAGE'] : ucwords(strtolower(str_replace('_', ' ', 'IMAGE')))

At this point you can learn alot from jsut pressing F1 and looking throught the help files.

ok so firstly we are going to create the GUI this is the window it is actualy going to run in so this is the code we use to create the Gui
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
#include <GUIConstants>



$mainwindow = GUICreate("My First Macro", 300, 100)
GUICtrlCreateLabel("Click Start Macro To Begin The Macro", 60, 10)
GUICtrlCreateLabel("Or Press Ctrl+M To Start And Again To Stop", 60, 80)
$okbutton = GUICtrlCreateButton("Start Macro", 110, 40, 80)


This code shows us that we are creating the gui window and we are create to peices of text within the window and a button labled start.

afterwards we add this code onto the end of the above, this code is to actually show the window

(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
GUISwitch($mainwindow)
GUISetState(@SW_SHOW)



so at the moment it should look like this

(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
#include <GUIConstants>

$mainwindow = GUICreate("My First Macro", 300, 100)
GUICtrlCreateLabel("Click Start Macro To Begin The Macro", 60, 10)
GUICtrlCreateLabel("Or Press Ctrl+M To Start And Again To Stop", 60, 80)
$okbutton = GUICtrlCreateButton("Start Macro", 110, 40, 80)

GUISwitch($mainwindow)
GUISetState(@SW_SHOW)


next we will make it so when you click on the start macro button a message comes up saying macro started and so the exit button works paste this after the above work
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
While 1
  $msg = GUIGetMsg(1)

  Select
    Case $msg[0] = $okbutton
      MsgBox(0, "My First Macro", "Macro Started")

    Case $msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $mainwindow
     
      ExitLoop
  EndSelect
WEnd


you should now be left with the code looking like this
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
#include <GUIConstants>

$mainwindow = GUICreate("My First Macro", 300, 100)
GUICtrlCreateLabel("Click Start Macro To Begin The Macro", 60, 10)
GUICtrlCreateLabel("Or Press Ctrl+M To Start And Again To Stop", 60, 80)
$okbutton = GUICtrlCreateButton("Start Macro", 110, 40, 80)

GUISwitch($mainwindow)
GUISetState(@SW_SHOW)

While 1
  $msg = GUIGetMsg(1)

  Select
    Case $msg[0] = $okbutton
      MsgBox(0, "My First Macro", "Macro Started")

    Case $msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $mainwindow
     
      ExitLoop
  EndSelect
WEnd


So now when you press F5 on your keyboard the GUI should load up and the buttons should work, now all you gotta do is add your macro so i think i will leave that to you :P

Enjoy!

if your going to post this guide on another website ask me first


Last edited by Guest on June 21st, 2007, 9:57 am, edited 1 time in total.

Reply with quote
Posted: June 21st, 2007, 7:50 am
 
kourath

Total Posts: 1979
Location: Pangea
Joined: February 8th, 2006, 8:04 pm
kourath's Reps: 23
User avatar
Active User > 50 Posts
the editor your using actually isnt installed natively on most machines, so your going to want to download that also. http://www.autoitscript.com/autoit3/scite/downloads.php (you want the first one: "SciTE4AutoIt3.exe ")

not a bad guide to teach some of the basics of GUI creation in autoit.

if you want to learn more autoit check out this link http://www.autoitscript.com/forum/index ... toit+1-2-3
its a great learning tool.

_________________
EX-TU member. For my own reasons, I will no longer play a role as an active member. Goodbye.


RIP kourath. 5/21/08


Reply with quote
Posted: June 21st, 2007, 9:35 am
 
mak364
mak364's Reps:
User avatar
jsut figured thats the one im using i must have forgot to add it, but yeh GUI creation can be quite tricky for new users i only learnt it yesterday and i find it fasinating at how much you can do i just gotta work out how to add macros and stuff in it.


Reply with quote
Want Advertisements After The Last Post Removed? Create A Free Account!

blue large dot Who is online
Users browsing this forum: No registered users and 200 guests

Popular Sections
SWTOR Cheats
Guild Wars 2 Cheats
Guild Wars 2 Hacks
Guild Wars 2 Bots
Diablo 3 Cheats
Guild Wars 2 Mods

Popular Sections
WoW Cataclysm Cheats & Exploits
WoW Cataclysm Hacks & Bots
Star Wars The Old Republic Cheats
SWTOR Mods
Torchlight 2 Cheats
SWTOR Space Mission Bots
Site Nav and RSS
RSS Feed of General Discussion RSS Feed 
Sitemap of General Discussion Sitemap 
SitemapIndex SitemapIndex
RSS Feed RSS Feed
Channel list Channel list
left bottom corner Site and Contents Copyright 2001-2012 All Rights Reserved TaultUnleashed.com bottom corner
top left
top right
createaccount
Username:   Password:   Remember Me?