Jump to content

AutoIt 1-2-3 error


Recommended Posts

@ilikepieandau3

Welcome to autoit forum :)

this is an old variable so replace by this code :

; Create an AVI Control.
GUICtrlCreateAvi(@ScriptDir & "\sampleAVI.avi", 0, 180, 10, 32, 32)
GUICtrlSetState(-1, 1)
GUICtrlCreateLabel("Sample avi", 170, 50)

Cheers, FireFox.

Edited by FireFox
Link to comment
Share on other sites

@ilikepieandau3

Try to put this code to top of script :

#Include <GuiTreeView.au3>

; AutoIt 3.0.103 example
; 17 Jan 2005 - CyberSlug
; demonstration version - Valuater
; This script shows manual positioning of all controls;
;   there are much better methods of positioning...
#include <GuiConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <TreeViewConstants.au3>

; Create the GUI.
GUICreate("Sample GUI", 400, 400)
GUISetIcon(@SystemDir & "\mspaint.exe", 0) ; set the icon for the GUI from the microsoft paint program.


; Create a MENU Control.
GUICtrlCreateMenu("Menu&One") ; create a menu at the upper portion of the GUI.
GUICtrlCreateMenu("Menu&Two") ; this type of menu may have a drop-down list.
GUICtrlCreateMenu("MenuTh&ree")
GUICtrlCreateMenu("Menu&Four")

; Create a CONTEXT MENU Control.
$contextMenu = GUICtrlCreateContextMenu() ; this is a Right Click menu.
GUICtrlCreateMenuItem("Context Menu", $contextMenu) ; create a sub-catagory.
GUICtrlCreateMenuItem("", $contextMenu) ;separator for the sub-catagories.
GUICtrlCreateMenuItem("&Properties", $contextMenu)

; Create a MESSAGE BOX.
MsgBox(262208, "*NOTE*", "Be sure to *Right Click* the GUI to see the pop-up context Menu.    ", 10)

; Create a PICTURE control.
GUICtrlCreatePic(@ScriptDir & "\logo4.gif", 0, 0, 169, 68)
GUICtrlCreateLabel("Sample pic", 75, 1, 53, 15) ; create a label.
GUICtrlSetColor(-1, 0xffffff) ; set the (-1) last controls color.


; Create an AVI Control.
GUICtrlCreateAvi(@ScriptDir & "\sampleAVI.avi", 0, 180, 10, 32, 32)
GUICtrlSetState(-1, 1)
GUICtrlCreateLabel("Sample avi", 170, 50)


; Create a TAB Control.
GUICtrlCreateTab(240, 0, 150, 70)
GUICtrlCreateTabItem("One")
GUICtrlCreateLabel("Sample Tab with tabItems", 250, 40) ; create a label on the "One" TAB.
GUICtrlCreateTabItem("Two")
GUICtrlCreateTabItem("Three")
GUICtrlCreateTabItem("") ; end tab creation.

; Create a COMBO or COMBOBOX Control.
GUICtrlCreateCombo("Sample Combo", 250, 80, 120, 100) ; set the default as "Sample Combo".

; Create a PROGRESS Control.
GUICtrlCreateProgress(60, 80, 150, 20)
GUICtrlSetData(-1, 60) ; set the last control (-1) at 60%.
GUICtrlCreateLabel("Progress:", 5, 82) ; create a label.

; Create an EDIT Control.
GUICtrlCreateEdit(@CRLF & "  Sample Edit Control", 10, 110, 150, 70) ; CRLF means, Carrage Return & Line Feed.

; Create a LIST Control.
GUICtrlCreateList("", 5, 190, 100, 90)
GUICtrlSetData(-1, "a.Sample|b.List|c.Control|d.Here", "b.List") ; set the data in the list with "b.List" as the default.

; Create an ICON Control.
GUICtrlCreateIcon("shell32.dll", 1, 175, 120) ; selects the number 1 Icon in the shell 32 DLL.
GUICtrlCreateLabel("Icon", 180, 160, 50, 20)

; Create a LIST VIEW Control.
$listView = GUICtrlCreateListView("Sample|ListView|", 110, 190, 110, 80)
GUICtrlCreateListViewItem("A|One", $listView) ; sets the list view items.
GUICtrlCreateListViewItem("B|Two", $listView)
GUICtrlCreateListViewItem("C|Three", $listView)

; Create a GROUP Control with RADIO BUTTON Controls.
GUICtrlCreateGroup("Sample Group", 230, 120) ; creates the Group.
GUICtrlCreateRadio("Radio One", 250, 140, 80) ; creates a radio.
GUICtrlSetState(-1, $GUI_CHECKED) ; sets the radio as "checked" by default.
GUICtrlCreateRadio("Radio Two", 250, 165, 80)
GUICtrlCreateGroup("", -99, -99, 1, 1) ;close the Group Control.

; Create an UP-DOWN Control.
GUICtrlCreateLabel("UpDown", 350, 115)
GUICtrlCreateInput("42", 350, 130, 40, 20) ; creates the input.
GUICtrlCreateUpdown(-1) ; sets the input as an up-down control.

; Create a LABEL Control.
GUICtrlCreateLabel("Green" & @CRLF & "Label", 350, 165, 40, 40)
GUICtrlSetBkColor(-1, 0x00FF00) ; sets the controls back-ground color.

; Create a SLIDER Control.
GUICtrlCreateLabel("Slider:", 235, 215)
GUICtrlCreateSlider(270, 210, 120, 30)
GUICtrlSetData(-1, 30) ; sets the position of the slider.

; Create an INPUT Control.
GUICtrlCreateInput("Sample Input Box", 235, 255, 130, 20)

; Create a DATE Control.
GUICtrlCreateDate("", 5, 280, 200, 20)
GUICtrlCreateLabel("(Date control expands into a calendar)", 10, 305, 200, 20) ; click to expand to a Calendar.

; Creates a BUTTON Control.
GUICtrlCreateButton("Sample Button", 10, 330, 100, 30)

; Creates a CHECK-BOX Control.
GUICtrlCreateCheckbox("Checkbox", 130, 335, 80, 20)
GUICtrlSetState(-1, $GUI_CHECKED) ; set as "checked" by default.

; Creates a TREE-VIEW Control (ONE).
$treeOne = GUICtrlCreateTreeView(210, 290, 80, 80)
$treeItem = GUICtrlCreateTreeViewItem("TreeView", $treeOne) ; sets a sub-catagory for the tree-view.
GUICtrlCreateTreeViewItem("Item1", $treeItem) ; sets a sub-catagory of the above catagory.
GUICtrlCreateTreeViewItem("Item2", $treeItem)
GUICtrlCreateTreeViewItem("Foo", -1)
GUICtrlSetState($treeItem, $GUI_EXPAND) ; sets the tree-view as expanded by default.

; Create a TREE-VIEW Control (TWO).
$treeTwo = GUICtrlCreateTreeView(295, 290, 103, 80, $TVS_CHECKBOXES) ; creates the tree view with check-boxes.
GUICtrlCreateTreeViewItem("TreeView", $treeTwo)
GUICtrlCreateTreeViewItem("With", $treeTwo)
GUICtrlCreateTreeViewItem("tvs_checkboxes", $treeTwo)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlCreateTreeViewItem("Style", $treeTwo)


; set the GUI as visible.
GUISetState()
While GUIGetMsg() <> $GUI_EVENT_CLOSE ; loop until the message recieved is equal to event close.
    
WEnd

Works fine with v3.3.0.0

Cheers, FireFox.

Edited by FireFox
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...