Abstract Posted June 16, 2005 Share Posted June 16, 2005 Ok Guys And Gals.. Here I Am, A Newb In All Ways To AutoIt... And I've Played Around Abit With This A Little Bit.. And So Far, I'm Sorta Happy With My Results.. Now, I'm Attempting To Add To This Current Setup A GUI.. And I'm Completely Lost.. I Can't Even Work Out The Basics Of Gui Coding.. What I'm Asking Is For Any Of You Guys To Assist Me With Some Basic GUI Code.. Here's Where I Am Now.. expandcollapse popup;; image design WinActivate("SwgClient") Send("/sit{Enter}") HotKeySet("^z", "MyExit") ;; Loop1 While 1=1 Sleep(300) Send(" / image{Enter}") Sleep(300) ;; Select's Attribute to change MouseClick("left", 468, 117, 1) Sleep(100) ;; Select's attributes change (color, etc) MouseClick("left", 426, 275, 1) Sleep(300) ;; Confirms change MouseClick("left", 623, 700, 1) ;;Send(" / ui action toolbarSlot04{Enter}") Sleep(300) Send("/ image{Enter}") Sleep(300) ;; Select's Attribute to change MouseClick("left", 468, 117, 1) Sleep(100) ;; Select's attributes change (color, etc) Use different color this time. MouseClick("left", 426, 290, 1) Sleep(300) ;; Confirms change MouseClick("left", 623, 700, 1) ;;Send("/ ui action toolbarSlot04{Enter}") Sleep(300) Send(" / image{Enter}") Sleep(300) ;; Select's Attribute to change MouseClick("left", 468, 117, 1) Sleep(100) ;; Select's attributes change (color, etc) MouseClick("left", 426, 275, 1) Sleep(300) ;; Confirms change MouseClick("left", 623, 700, 1) ;;Send(" / ui action toolbarSlot04{Enter}") Sleep(300) Send("/ image{Enter}") Sleep(300) ;; Select's Attribute to change MouseClick("left", 468, 117, 1) Sleep(100) ;; Select's attributes change (color, etc) Use different color this time. MouseClick("left", 426, 290, 1) Sleep(300) ;; Confirms change MouseClick("left", 623, 700, 1) ;;Send("/ ui action toolbarSlot04{Enter}") Sleep(300) Send(" / image{Enter}") Sleep(300) ;; Select's Attribute to change MouseClick("left", 468, 117, 1) Sleep(100) ;; Select's attributes change (color, etc) MouseClick("left", 426, 275, 1) Sleep(300) ;; Confirms change MouseClick("left", 623, 700, 1) ;;Send(" / ui action toolbarSlot04{Enter}") Sleep(300) Send("/ image{Enter}") Sleep(300) ;; Select's Attribute to change MouseClick("left", 468, 117, 1) Sleep(100) ;; Select's attributes change (color, etc) Use different color this time. MouseClick("left", 426, 290, 1) Sleep(300) ;; Confirms change MouseClick("left", 623, 700, 1) ;;Send("/ ui action toolbarSlot04{Enter}") Sleep(1000) Wend Func MyExit() Exit EndFunc So, What I'm Really Looking For, Is A Basic GUIWindow, With a Toggle Button, That's Also Linked To A Hotkey, Usable In Or Out Of The Target window. If This Isn't Possible, Lemme Know.. Heh. Thanks In Advance. Link to comment Share on other sites More sharing options...
buzz44 Posted June 16, 2005 Share Posted June 16, 2005 (edited) Yawn... Read the help file... Each GUICtrlCreate() control has an example, everyone. Type 'GUICtrlCreate' into the help file and see for yourself. Seeing as your beginning try looking at the GUICtrlCreateButton() example for your toggle button or use a check box > GUICtrlCreateCheckbox().Edit: Also look at the below code. In contains most the the GUI controls. Im not sure if it comes with the stable 3.1.1 version or just the Beta. For the actual au3 file look in 'C:\Program Files\AutoIt3\tests\gui\. The drive and program files folder name might vary from yours.CODE; AutoIt 3.0.103 example; 17 Jan 2005 - CyberSlug; This script shows manual positioning of all controls;; there are much better methods of positioning...#include <GuiConstants.au3>; GUIGuiCreate("Sample GUI", 400, 400)GuiSetIcon(@SystemDir & "\mspaint.exe", 0)GUISetBkColor(0x00A0E0E0); MENU GuiCtrlCreateMenu("Menu&One")GuiCtrlCreateMenu("Menu&Two")GuiCtrlCreateMenu("MenuTh&ree")GuiCtrlCreateMenu("Menu&Four"); CONTEXT MENU$contextMenu = GuiCtrlCreateContextMenu()GuiCtrlCreateMenuItem("Context Menu", $contextMenu)GuiCtrlCreateMenuItem("", $contextMenu);separatorGuiCtrlCreateMenuItem("&Properties", $contextMenu); PICGuiCtrlCreatePic("logo4.gif",0,0, 0,0)GuiCtrlCreateLabel("Sample pic", 75, 1, 53, 15); AVIGuiCtrlCreateAvi("sampleAVI.avi",0, 180, 10, 32, 32, $ACS_AUTOPLAY)GuiCtrlCreateLabel("Sample avi", 170, 50); TABGuiCtrlCreateTab(240, 0, 150, 80)GuiCtrlCreateTabItem("One")GuiCtrlCreateLabel("Sample Tab with tabItems", 250, 25)GuiCtrlSetBkColor(-1, 0x00FF00)GuiCtrlCreateEdit("Sample edit control", 250, 50)GuiCtrlCreateTabItem("Two")GuiCtrlCreateTabItem("Three")GuiCtrlCreateTabItem(""); COMBOGuiCtrlCreateCombo("Sample Combo", 250, 80, 120, 100); PROGRESSGuiCtrlCreateProgress(60, 80, 150, 20)GuiCtrlSetData(-1, 60)GuiCtrlCreateLabel("Progress:", 5, 82); EDITGuiCtrlCreateEdit(@CRLF & " Sample Edit Control", 10, 110, 150, 70)GuiCtrlSetBkColor(-1,0xff0000); LISTGuiCtrlCreateList("", 5, 190, 100, 90)GuiCtrlSetData(-1, "a.Sample|b.List|c.Control|d.Here", "b.List"); ICONGuiCtrlCreateIcon("shell32.dll", 1, 175, 120)GuiCtrlCreateLabel("Icon", 180, 160, 50, 20); LIST VIEW$listView = GuiCtrlCreateListView("Sample|ListView|", 110, 190, 110, 80)GuiCtrlCreateListViewItem("A|One", $listView)GuiCtrlCreateListViewItem("B|Two", $listView)GuiCtrlCreateListViewItem("C|Three", $listView); GROUP WITH RADIO BUTTONSGuiCtrlCreateGroup("Sample Group", 230, 120)GuiCtrlCreateRadio("Radio One", 250, 140, 80)GuiCtrlSetState(-1, $GUI_CHECKED)GuiCtrlCreateRadio("Radio Two", 250, 165, 80)GUICtrlCreateGroup ("",-99,-99,1,1) ;close group; UPDOWNGuiCtrlCreateLabel("UpDown", 350, 115)GuiCtrlCreateInput("42", 350, 130, 40, 20)GuiCtrlCreateUpDown(-1); LABELGuiCtrlCreateLabel("Green" & @CRLF & "Label", 350, 165, 40, 40)GuiCtrlSetBkColor(-1, 0x00FF00); SLIDERGuiCtrlCreateLabel("Slider:", 235, 215)GuiCtrlCreateSlider(270, 210, 120, 30)GuiCtrlSetData(-1, 30); INPUTGuiCtrlCreateInput("Sample Input Box", 235, 240, 130, 20)GuiCtrlCreateInput("Colored Input Box", 235, 265, 130, 20)GuiCtrlSetColor(-1, 0xFF0000)GuiCtrlSetBkColor(-1, 0x0000FF); DATEGuiCtrlCreateDate("", 5, 280, 200, 20)GuiCtrlCreateLabel("(Date control expands into a calendar)", 10, 305, 200, 20); BUTTONGuiCtrlCreateButton("Sample Button", 10, 330, 100, 30); CHECKBOXGuiCtrlCreateCheckbox("Checkbox", 130, 335, 80, 20)GuiCtrlSetState(-1, $GUI_CHECKED); TREEVIEW ONE$treeOne = GuiCtrlCreateTreeView(210, 290, 80, 80)GUICtrlSetBkColor(-1,0x00ff00)$treeItem = GuiCtrlCreateTreeViewItem("TreeView", $treeOne)GuiCtrlCreateTreeViewItem("Item1", $treeItem)GuiCtrlCreateTreeViewItem("Item2", $treeItem)GuiCtrlCreateTreeViewItem("Foo", -1)GuiCtrlSetState($treeItem, $GUI_EXPAND); TREEVIEW TWO$treeTwo = GuiCtrlCreateTreeView(295, 290, 103, 80, $TVS_CHECKBOXES)GuiCtrlCreateTreeViewItem("TreeView", $treeTwo)GuiCtrlCreateTreeViewItem("With", $treeTwo)GuiCtrlCreateTreeViewItem("tvs_checkboxes", $treeTwo)GuiCtrlSetState(-1, $GUI_CHECKED)GuiCtrlCreateTreeViewItem("Style", $treeTwo); GUI MESSAGE LOOPGuiSetState()While GuiGetMsg() <> $GUI_EVENT_CLOSEWEnd Edited June 16, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
Abstract Posted June 16, 2005 Author Share Posted June 16, 2005 Hey Thanks For The Reply.. Like I Said.. I'm Completely Lost When It Comes To GUI's... For Some Reason It Just Wasn't Sinking Into My Brainmeats. LoL.. I Had Not Found This.. And This Is Exactly The Kind Of Thing I Needed .. Thank You A Ton. 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