ahmet Posted April 11, 2010 Posted April 11, 2010 I want to add values to my array to create polygon using _GDIPlus_GraphicsDrawPolygonNew AutoIt v3 Script.au3
Valuater Posted April 11, 2010 Posted April 11, 2010 Maybe.... expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.4.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <array.au3> ; for display only $sides = Number(InputBox("Polygon", "Enter number of sites")) Global $all[$sides + 1][2] Global $input[$sides + 1][3] Global $read_input[$sides + 1][3] GUICreate("Polygon", (20 * $sides) + 121, (26 * $sides) + 77) $ok_button = GUICtrlCreateButton("OK", 20 * $sides + 80, 26 * $sides + 50, 40, 20) $ok_display = GUICtrlCreateButton("Display", 5 * $sides + 80, 26 * $sides + 50, 60, 20) GUICtrlCreateLabel("x(i)", 15, 10) GUICtrlCreateLabel("y(i)", 60, 10) For $i = 1 To $sides $input[$i][1] = GUICtrlCreateInput("", 15, 30 * $i, 30, 20) $input[$i][2] = GUICtrlCreateInput("", 50, 30 * $i, 30, 20) Next GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ok_button Read_Input() Case $msg = $ok_display Read_Input(1) EndSelect WEnd Func Read_Input($display = 0) For $x = 1 To $sides $read_input[$x][1] = GUICtrlRead($input[$x][1]) $read_input[$x][2] = GUICtrlRead($input[$x][2]) Next If $display = 1 Then _ArrayDisplay($read_input) EndFunc ;==>Read_Input *** tested ok 8)
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