Jump to content

Recommended Posts

Hi, recently i created a GUI for some calculations in AutoIT.  The GUI has 2 tabs and on the first tab, it has few inputboxes where i use to click with mouse and start entering the inputs. i recently made some changes in the position of these textboxes. I made this by changing the autoit code file instead of making changes in KODA. Now i cannot click inside these textboxes with mouse. However, i can use TAB key to cycle through/enter input in these input boxes. what could have made the inputboxes not responding to mouseclicks. thanks

Link to post
Share on other sites
  • Moderators

@Rskm how about posting the code so we can see what you're seeing, rather than asking us to guess?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to post
Share on other sites
10 hours ago, JLogan3o13 said:

@Rskm how about posting the code so we can see what you're seeing, rather than asking us to guess?

Hi, The code is here.. so when i run this, on the Tab 1, there is a text box 'location of the ....' i am not able to click in this with the mouse now.  But if i use Tab on keyboard, i can enter the input. i am not sure why mouse clicks are not accepted now.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\..\Users\RajithRadhakrishnan\Downloads\untitled_JPA_icon.ico
#Tidy_Parameters=/sdp ?C:\Program Files\gnuplot\bin\gnuplot.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
#include <file.au3>
#include <string.au3>
#include <WinAPIFiles.au3>
#include <StringConstants.au3>
#include <date.au3>
#include <Math.au3>
#include <Excel.au3>
#include <ExcelConstants.au3>
#include <Color.au3>
#include <MsgBoxConstants.au3>
#include <IE.au3>
#Region ### START Koda GUI section ### Form=d:\my_autoitscripts\cribbing\cribbing_check\gui2\gui_cribbing.kxf
Global $Form1_1 = GUICreate("Cribbing Program", 344, 900, -1, -1)
Global $MAIN = GUICtrlCreateTab(0, 0, 344, 895)
;
Global $TabSheet1 = GUICtrlCreateTabItem("Cribbing_Coord")
;
Global $Label3 = GUICtrlCreateLabel("This section of the program extracts coordinates for the proposed cribbing pattern", 16, 40,300,200)
Global $Labe33 = GUICtrlCreateLabel("1. Input 1", 16, 80,300,200)
Global $Labe34 = GUICtrlCreateLabel("2. Input 2", 16, 120,300,200)
Global $Labe34 = GUICtrlCreateLabel("3. Input 3", 16, 185,300,200)
Global $Labe35 = GUICtrlCreateLabel("4. Instructions", 16, 250,300,200)

;
Global $Label1 = GUICtrlCreateLabel("Location for the .DXF file/ Coord file  :", 16, 320, 265, 22)
Global $kod_locn = GUICtrlCreateInput(" ", 16, 340, 280, 26)
;
Global $Label23 = GUICtrlCreateLabel("Name of the .DXF file :", 16, 370, 165, 22)
;~
Global $kod_dwf_name = GUICtrlCreateInput(".DXF", 16, 390, 280, 26)
;
Global $Label2 = GUICtrlCreateLabel("Thickness of the cribbing (m) :", 16, 420, 165, 22)
Global $kod_cribthk = GUICtrlCreateInput("0.3", 16, 440, 281, 26)
Global $Button1 = GUICtrlCreateButton("Extract from DXF", 16, 470, 105, 35)
Global $Button11 = GUICtrlCreateButton("Template File", 16, 520, 105, 35)
;
;
;
Global $TabSheet2 = GUICtrlCreateTabItem("Analysis")
GUICtrlSetState(-1,$GUI_SHOW)
Global $Label7 = GUICtrlCreateLabel("This section calculates the stresses in the proposed cribbing. ", 8, 32, 300, 17)
Global $Group1 = GUICtrlCreateGroup("Jack-Up/HLV  Data", 8, 80, 321, 193)
Global $Label4 = GUICtrlCreateLabel("Mass of the Jack-Up (Te):", 16, 128, 190, 25)
Global $kod_jh = GUICtrlCreateInput("Jack Up, HLV", 208, 104, 121, 21)
Global $Label5 = GUICtrlCreateLabel("CofG of the Jack-Up in X (m):", 16, 152, 142, 17)
Global $kod_mass = GUICtrlCreateInput("", 208, 128, 121, 21)
Global $Label6 = GUICtrlCreateLabel("CofG of the Jack-Up in Y (m):", 16, 176, 142, 17)
Global $kod_cogx = GUICtrlCreateInput("", 208, 152, 121, 21)
Global $Label9 = GUICtrlCreateLabel("CofG of the Jack-Up in Z (m):", 16, 200, 142, 17)
Global $kod_cogy = GUICtrlCreateInput("", 208, 176, 121, 21)
Global $Label10 = GUICtrlCreateLabel("Name of Jack-Up, HLV name:", 16, 104, 142, 21)
Global $kod_cogz = GUICtrlCreateInput("", 208, 200, 121, 21)
Global $Label11 = GUICtrlCreateLabel("Mass MomInertia in Pitching(Te.m2):", 16, 224,190, 17)
Global $kod_pinertia = GUICtrlCreateInput("", 208, 224, 121, 21)
Global $Label12 = GUICtrlCreateLabel("Mass MomInertia in Rolling(Te.m2):", 16, 248,190, 17)
Global $kod_rinertia = GUICtrlCreateInput("", 208, 248, 121, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)

Global $Label8 = GUICtrlCreateLabel("X,Y are respectively Longitudinal,Transverse axis for the Carrier vessel", 8, 56, 300, 17)
Global $Group2 = GUICtrlCreateGroup("Motions (Pitching)", 8, 280, 321, 121)
Global $Label13 = GUICtrlCreateLabel("Surge Acceleration (m/s2) :", 16, 304, 133, 17)
Global $Label14 = GUICtrlCreateLabel("Pitch Acceleration (Deg/s2) :", 16, 328, 190, 17)
Global $Label15 = GUICtrlCreateLabel("Pitch Angle (Deg) :", 16, 352, 93, 17)
Global $Label16 = GUICtrlCreateLabel("Heave Acceleration (m/s2)", 16, 376, 131, 17)
Global $kod_surge = GUICtrlCreateInput("", 208, 304, 121, 21)
Global $kod_pitch_accln = GUICtrlCreateInput("", 208, 328, 121, 21)
Global $kod_pitch_angle = GUICtrlCreateInput("", 208, 352, 121, 21)
Global $kod_p_heave = GUICtrlCreateInput("", 208, 376, 121, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $Motions = GUICtrlCreateGroup("Motions (Rolling)", 8, 408, 321, 121)
Global $kod = GUICtrlCreateLabel("Sway Acceleration (m/s2) :", 16, 432, 131, 17)
Global $Label17 = GUICtrlCreateLabel("Roll Acceleration (Deg/s2) :", 16, 456, 190, 17)
Global $Label18 = GUICtrlCreateLabel("Roll Angle (Deg) :", 16, 480, 87, 17)
Global $Label19 = GUICtrlCreateLabel("Heave Acceleration (m/s2) :", 16, 504, 137, 17)
Global $kod_sway = GUICtrlCreateInput("", 208, 432, 121, 21)
Global $kod_roll_accln = GUICtrlCreateInput("", 208, 456, 121, 21)
Global $kod_roll_angle = GUICtrlCreateInput("", 208, 480, 121, 21)
Global $kod_r_heave = GUICtrlCreateInput("", 208, 504, 121, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $Group3 = GUICtrlCreateGroup("Wind Data (1 Hr )", 8, 536, 321, 169)
Global $Label20 = GUICtrlCreateLabel("Wind force along Longi, Fx (kN) :", 16, 560, 190, 17)
Global $Label21 = GUICtrlCreateLabel("CoE above the cribbing for Fx (m)  :", 16, 584, 190, 17)
Global $Label22 = GUICtrlCreateLabel("Wind force along Transverse, Fy (kN) :", 16, 608, 190, 17)
Global $Label23 = GUICtrlCreateLabel("CoE above the cribbing for Fy (m) :", 16, 632,190, 17)
Global $Label24 = GUICtrlCreateLabel("Trim, about Transverse axis (Deg) :", 16, 656, 166, 17)
Global $Label25 = GUICtrlCreateLabel("Heel, about Longitudinal axis (Deg) :", 16, 680, 172, 17)
Global $kod_wind_fx = GUICtrlCreateInput("", 208, 560, 121, 21)
Global $kod_coe_x = GUICtrlCreateInput("", 208, 584, 121, 21)
Global $kod_wind_fy = GUICtrlCreateInput("", 208, 608, 121, 21)
Global $kod_coe_y = GUICtrlCreateInput("", 208, 632, 121, 21)
Global $kod_trim = GUICtrlCreateInput("", 208, 656, 121, 21)
Global $kod_heel = GUICtrlCreateInput("", 208, 680, 121, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $Label26 = GUICtrlCreateLabel("Location of cribbing data:", 16, 712, 150, 17)
Global $kod_cribfilefolder = GUICtrlCreateInput("", 208, 712, 121, 21)
;~ Global $kod_cribfilefolder = GUICtrlCreateInput("D:\my_autoitscripts\cribbing\new", 208, 712, 121, 21)
Global $Label27 = GUICtrlCreateLabel("File name for cribbing data :", 16, 740, 150, 17)
Global $kod_cribfile = GUICtrlCreateInput("coords_.txt", 208, 740, 121, 21)


Global $Label28 = GUICtrlCreateLabel("File name for output file:", 16, 770, 137, 17)
Global $kod_outname = GUICtrlCreateInput("Tmp.txt", 208, 770, 121, 21)

Global $Label29 = GUICtrlCreateLabel("Crop factor for verification (m):", 16, 800, 157, 20)
Global $kod_crop = GUICtrlCreateInput("1", 208, 800, 121, 20)
Global $Button2 = GUICtrlCreateButton("Run", 208, 830, 121, 25)
Global $Readme = GUICtrlCreateButton("Read me", 20, 830, 121, 25)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit


        Case $Button11
            Global $dir=guictrlread($kod_locn)
            FileDelete($dir&"\Coord_crib.txt")
            Global $coordfile=fileopen($dir&"\Coord_crib.txt",1)
            Filewrite($coordfile,"! This file has coordinates for the cribbing program"&@CRLF)
            Filewrite($coordfile,"! DXF File         : No DXF file used. Coordinates are entered manually in this file"&@CRLF)
            Filewrite($coordfile,"! Additional Notes : X1, Y1, X2, Y2 & Thk to be entered with a comma"&@CRLF)
            Filewrite($coordfile,"! Prepared on      : "&@MDAY & "/" & @MON & "/" & @YEAR  & " " & @HOUR & ":" & @MIN & ":" & @SEC&@CRLF)
            Filewrite($coordfile,"     X1  ,     Y1  ,     X2  ,      Y2 ,  Thk"&@CRLF)
            fileclose($coordfile)
            Msgbox(0,"Status","Template file 'Coord_crib.txt' created")
            Exit


            Endswitch

Wend

 

Edited by Melba23
Added code tags
Link to post
Share on other sites
  • Moderators

Rskm,

When you post code in future please use Code tags - see here how to do it.  Then you get a scrolling box and syntax colouring as you can see above now I have added the tags. Thanks in advance for your cooperation.

And please do not double post - I have deleted the duplicate.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to post
Share on other sites

Your issue is caused by these lines ---

Global $Labe33 = GUICtrlCreateLabel("1. Input 1", 16, 80,300,200)
Global $Labe34 = GUICtrlCreateLabel("2. Input 2", 16, 120,300,200)
Global $Labe34 = GUICtrlCreateLabel("3. Input 3", 16, 185,300,200)
Global $Labe35 = GUICtrlCreateLabel("4. Instructions", 16, 250,300,200)

With a height of 200, they are overlapping the lower controls thus preventing them from being clicked with the mouse.

Link to post
Share on other sites
On 7/29/2020 at 10:25 AM, Melba23 said:

Rskm,

When you post code in future please use Code tags - see here how to do it.  Then you get a scrolling box and syntax colouring as you can see above now I have added the tags. Thanks in advance for your cooperation.

And please do not double post - I have deleted the duplicate.

M23

ok, noted. thanks 

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By XGamerGuide
      👋 Hey
      I want to call a function when something changes on an element in my GUI. That should work for a combo box (with $CBS_DROPDOWNLIST) when I select an item and for a text input when I type.
    • By NassauSky
      Hi all,
      The more projects I work on, the harder it is to find old scripts I created with certain techniques in them. I'd like to leave this here for others to get an idea from and it will be available now by keyword searching in this forum.
      This project needed an evenly distributed button grid setup on a touch screen with half decent sized buttons and spacing so the user would be less likely to press the key beside it. Here is one quick example to give anyone an idea of a way to handle it.
      #include <GUIConstants.au3> GUICreate("Button Grid", 1080, 100) ; will create a dialog box that when displayed is centered GUISetState(@SW_SHOW) ; will display an empty dialog box ;--Create and Position Controls Dim $btnActivated[1][2] ;Col 1 is button id, Col 2 is True/False used in 1 example as depressed Dim $btnArray[100][2] ;Col 1 is button id, Col 2 is True/False used in 1 example as depressed $num = 0 $btnActivated[0][0] = GUICtrlCreateButton("Activated", 0, 0, 100, 100) ;x,y,w,h $btnActivated[0][1] = True GUICtrlSetBkColor(-1,0x00ff00) GUICtrlSetColor(-1,0x005500) GUICtrlSetFont(-1,14) For $Y = 0 To 1 For $X = 0 To 7 ConsoleWrite( ($X * 100) + ($X*20) + 120 & @CRLF) If $Y=0 Then $btnArray[$num][0] = GUICtrlCreateButton($num + 1, ($X * 100) + ($X*20) + 120, 0, 100, 40) ;x,y,w,h Else $btnArray[$num][0] = GUICtrlCreateButton($num + 1, ($X * 100) + ($X*20) + 120, ($Y * 40) + $Y*20, 100, 40) ;x,y,w,h EndIf GUICtrlSetBkColor($btnArray[$num][0], 0xFFFFFF) $num += 1 Next Next ;--Set Button Names GUICtrlSetData($btnArray[0][0],"Autoit") GUICtrlSetData($btnArray[1][0],"Is") GUICtrlSetData($btnArray[2][0],"Cool") ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop Case $btnActivated[0][0] $btnActivated[0][1] = NOT $btnActivated[0][1] If $btnActivated[0][1] Then GUICtrlSetBkColor($btnActivated[0][0],0x00ff00) GUICtrlSetColor($btnActivated[0][0],0x005500) GUICtrlSetData($btnActivated[0][0],"Activated") GUICtrlSetFont($btnActivated[0][0],14) Else GUICtrlSetBkColor($btnActivated[0][0],0xFF9999) GUICtrlSetColor($btnActivated[0][0],0x550000) GUICtrlSetData($btnActivated[0][0],"DeActivated") GUICtrlSetFont($btnActivated[0][0],13) EndIf Case $btnArray[0][0] If $btnActivated[0][1] Then MsgBox(0,"Notice","Btn1",1) EndIf Case $btnArray[1][0] If $btnActivated[0][1] Then MsgBox(0,"Notice","Btn2",1) EndIf Case $btnArray[2][0] If $btnActivated[0][1] Then MsgBox(0,"Notice","Btn3",1) EndIf EndSwitch WEnd I couldn't find one of my old projects that broke the button array into more columns that included the actual button name in the field. Feel free to share your own or share a more flexible version of this simple example.

    • By It_is_me_Me
      I am making some GUI with combobox for the Baudrates communications and I listed 9600, 57600, 115200. 
      I wrote the code to be defaulted to 57600 like this:
      GUICtrlSetData($comboBox_opticalBaudRate, "9600|57600|115200", "57600")
      But I wanted the GUI to remember the last item the user picks so the baudrates will NOT be defaulted to 57600.
      Example, I pick 9600 as my baudrates, then I close the GUI, after opening it, it always prompt 57600 since that is what I did in my code. But I want that if I choose 9600 and close the GUI, opening it again will show 9600 now instead of 57600.
      Is there a way to do it in GUI setting?
       
      Thanks.
    • By TheAutomator
      I'm writing a script that uses a lot of specific mouse clicks to automate tasks on my browser, server system, and email software for work.
      Sometimes the system gets updated or someone drags a handle to the left or right and I have to put in new mouse click coordinates.

      It would be a lot more easy to label them and put them in some sort of ini file, but then i have to load every X and Y (and sometimes mouse speed) into a variable
      when loading the script.

      How would you guys go about such a script, any ideas on how to store and load lot's of click coordinates from a file?
      There are some pixel color checks, sleeps and other code between the mouse clicks too..

      Ideas i had so far:
      - string replace new coordinates in the main script with another autoit script that uses a crosshair to show every mouse position.
      - manually write an ini file and load every X, Y, Speed into a huge number of variables: $Searchinput_X = iniread...., $Searchinput_Yiniread...., $Searchinput_Speed = iniread....
      - split a textfile line by line into an array and ignore labels that begin with ";" for example (a bit like a custom ini file)

      These all seem somewhat tedious i guess..
    • By ashraful089
      #include <ButtonConstants.au3>
      #include <ComboConstants.au3>
      #include <GUIConstantsEx.au3>
      #include <WindowsConstants.au3>
      #Region ### START Koda GUI section ### Form=C:\Users\Engr. Ashraful\Videos\koda_1.7.3.0\Forms\ProgramPlayer\FormProgamToOpen.kxf
      $FormInput = GUICreate("Input", 302, 205, 454, 285)
      $Resolution = GUICtrlCreateCombo("Resolution", 80, 24, 145, 25)
      GUICtrlSetData(-1, "1920|VM1920|1366")
      $ComboProgramType = GUICtrlCreateCombo("Program Type Selection", 80, 64, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
      GUICtrlSetData(-1, "Multimedia|Official|Design|Web")
      $ButtonEnter = GUICtrlCreateButton("Enter", 104, 104, 75, 25)
      GUISetState(@SW_SHOW)
      #EndRegion ### END Koda GUI section ###
      While 1
          $nMsg = GUIGetMsg()
          Switch $nMsg
              Case $GUI_EVENT_CLOSE
                  Exit
          EndSwitch
      WEnd
       
      please help me to read combo box input and use the value for another function/ work
       
×
×
  • Create New...