Jump to content

Search the Community

Showing results for tags 'Input'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

  1. 👋 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.
  2. I/O Port Functions UDF Windows 7 and x64-compatible! This is a simple I/O (Input/Output) UDF for interacting with ports. The ability to write to ports was stripped from Windows with Vista+. While many do not miss this ability, there are some uses still in existence: Re-enable the internal PC Speaker - the good ol' "Beep" function can be restored using basic I/O PS/2 Keyboard Functions - Turn it off/on, mess with LED's, inject keys into the keyboard output stream - even thwart UAC prompts! =O Also work with Parallel, Serial (COM), PS/2 mouse, and miscellaneous ports that devices interface through using I/O operations For some good lists of ports and programming, see: PORTS.LST Chapters from 'The Art of Assembly Language': 20: The PC Keyboards - Part One and Part Two 21: The PC Parallel Ports - Part One, Part Two, and Part Three 22: The PC Serial Ports - Part One and Part Two 23: The PC Video Display 24: The PC Game Adapter - Part One, Part Two, Part Three and Part Four On the PS/2 Keyboard and PS/2 Mouse, some more links: 8042 Keyboard Controller 8042 Keyboard Commands & Responses Keyboard Controller Commands, Keyboard Commands and Keyboard Scancodes The PS/2 Mouse The I/O DLL's, which will install the I/O drivers (they are embedded as a resource in the DLL), come from Phillip Gibbons. His webpage, where more information, and extra downloads are, is available here: InpOut32 and InpOutx64. Note: everything you need is already included in my UDF. IOInstallx86 and IOInstallx64 are included to help with the install. Run these once to install the DLL's and drivers. (Administrator rights are required!) In addition to the base _IOFunctions UDF, I've included _IOBeep, which is based on trancexx's _Beep function, and _IOKeyboardFunctions [PS/2 only*]. There are now three examples of the UDF usage included: IOBeepExample, IOCMOSReadExample (based on trancexx's CMOS code), and IOKeyboardExamples. If anyone else has more code suggestions, feel free to add to the thread. *Update: Some BIOS's allow Legacy USB Port 64/60 Emulation, which may allow the _IOKeyboardFunctions to work for USB (non-PS/2) Keyboards, though this is untested thus far. While I bundle the binaries with my code, remember they are not my own. However, they are released as freeware. To ensure proper credit goes where it belongs, I've included the Readme files from the download (linked above), as well as a link to the original page. Ascend4nt's AutoIT Code License agreement Screw silly licenses. Just make sure you remember the people you get free stuff from! IOFunctions.zip UPDATES: 07/11/2013: - Updated to use (and install) v1.5.0.0 of InpOut32 & InpOutx64 - Version check & compare before install - Fixed links - Tiny bug fixes InpOut32 and InpOutx64 ChangeLog: v1.5.0.0 New Build (20-Jan-2011): - Added _stdcall to DlPortReadPortUshort, DlPortWritePortUshort, DlPortReadPortUlong, DlPortWritePortUlong to maintain compatibility with old DLPortIO driver. v1.4.0.0 New Build (13-Jan-2011): - Removed references to WinRing0 which was discontinued. - Fixed uninitialized buffers & return from Inp32 > byte value! v1.3.0.0 New Build (15-Aug-2010): - Removed bool's from header (replaced with BOOL). This is to maintain compatibility with other DLL’s (DLPortIO etc.). 10/22/2010: Added _IOKeyboardFunctions UDF Added IOKeyboardExamples and IOCMOSReadExample (based on trancexx's CMOS code)
  3. Hello, I would like to ask if there is an GUI function that allow create control like this?
  4. I'm trying to assign a faint text in the background to an input field that disappears after the input has started. This should have a certain color such as gray.
  5. Hello AutoIt Programmers, i was working on my project and i reffered to @KBLayout, @MUILang & @OSLang then i saw that code example of this macro is not too complete, i decided to share my customized _GetLanguage() for you: #include <MsgBoxConstants.au3> MsgBox($MB_SYSTEMMODAL, "", "The language of the OS is: " & _GetLanguage() & " (" & LCIDToLocaleName("0x" & @OSLang) & ")") ; Retrieve the language of the operating system. Func _GetLanguage() Switch @OSLang Case "0004" Return "Chinese - Simplified" Case "0401" Return "Arabic - Saudi Arabia" Case "0402" Return "Bulgarian - Bulgaria" Case "0403" Return "Catalan - Spain" Case "0404" Return "Chinese (Traditional) - Taiwan" Case "0405" Return "Czech - Czech Republic" Case "0406" Return "Danish - Denmark" Case "0407" Return "German - Germany" Case "0408" Return "Greek - Greece" Case "0409" Return "English - United States" Case "040A" Return "Spanish - Spain" Case "040B" Return "Finnish - Finland" Case "040C" Return "French - France" Case "040D" Return "Hebrew - Israel" Case "040E" Return "Hungarian - Hungary" Case "040F" Return "Icelandic - Iceland" Case "0410" Return "Italian - Italy" Case "0411" Return "Japanese - Japan" Case "0412" Return "Korean - Korea" Case "0413" Return "Dutch - Netherlands" Case "0414" Return "Norwegian (Bokmål) - Norway" Case "0415" Return "Polish - Poland" Case "0416" Return "Portuguese - Brazil" Case "0417" Return "Romansh - Switzerland" Case "0418" Return "Romanian - Romania" Case "0419" Return "Russian - Russia" Case "041A" Return "Croatian - Croatia" Case "041B" Return "Slovak - Slovakia" Case "041C" Return "Albanian - Albania" Case "041D" Return "Swedish - Sweden" Case "041E" Return "Thai - Thailand" Case "041F" Return "Turkish - Turkey" Case "0420" Return "Urdu - Pakistan" Case "0421" Return "Indonesian - Indonesia" Case "0422" Return "Ukrainian - Ukraine" Case "0423" Return "Belarusian - Belarus" Case "0424" Return "Slovenian - Slovenia" Case "0425" Return "Estonian - Estonia" Case "0426" Return "Latvian - Latvia" Case "0427" Return "Lithuanian - Lithuanian" Case "0428" Return "Tajik (Cyrillic) - Tajikistan" Case "0429" Return "Persian - Iran" Case "042A" Return "Vietnamese - Vietnam" Case "042B" Return "Armenian - Armenia" Case "042C" Return "Azeri (Latin) - Azerbaijan" Case "042D" Return "Basque - Basque" Case "042E" Return "Upper Sorbian - Germany" Case "042F" Return "Macedonian - Macedonia" Case "0432" Return "Setswana / Tswana - South Africa" Case "0434" Return "isiXhosa - South Africa" Case "0435" Return "isiZulu - South Africa" Case "0436" Return "Afrikaans - South Africa" Case "0437" Return "Georgian - Georgia" Case "0438" Return "Faroese - Faroe Islands" Case "0439" Return "Hindi - India" Case "043A" Return "Maltese - Malta" Case "043B" Return "Sami (Northern) - Norway" Case "043e" Return "Malay - Malaysia" Case "043F" Return "Kazakh - Kazakhstan" Case "0440" Return "Kyrgyz - Kyrgyzstan" Case "0441" Return "Swahili - Kenya" Case "0442" Return "Turkmen - Turkmenistan" Case "0443" Return "Uzbek (Latin) - Uzbekistan" Case "0444" Return "Tatar - Russia" Case "0445" Return "Bangla - Bangladesh" Case "0446" Return "Punjabi - India" Case "0447" Return "Gujarati - India" Case "0448" Return "Oriya - India" Case "0449" Return "Tamil - India" Case "044A" Return "Telugu - India" Case "044B" Return "Kannada - India" Case "044C" Return "Malayalam - India" Case "044D" Return "Assamese - India" Case "044E" Return "Marathi - India" Case "044F" Return "Sanskrit - India" Case "0450" Return "Mongolian (Cyrillic) - Mongolia" Case "0451" Return "Tibetan - China" Case "0452" Return "Welsh - United Kingdom" Case "0453" Return "Khmer - Cambodia" Case "0454" Return "Lao - Lao PDR" Case "0456" Return "Galician - Spain" Case "0457" Return "Konkani - India" Case "0459" Return "(reserved) - (reserved)" Case "045A" Return "Syriac - Syria" Case "045B" Return "Sinhala - Sri Lanka" Case "045C" Return "Cherokee - Cherokee" Case "045D" Return "Inuktitut (Canadian_Syllabics) - Canada" Case "045E" Return "Amharic - Ethiopia" Case "0461" Return "Nepali - Nepal" Case "0462" Return "Frisian - Netherlands" Case "0463" Return "Pashto - Afghanistan" Case "0464" Return "Filipino - Philippines" Case "0465" Return "Divehi - Maldives" Case "0468" Return "Hausa - Nigeria" Case "046A" Return "Yoruba - Nigeria" Case "046B" Return "Quechua - Bolivia" Case "046C" Return "Sesotho sa Leboa - South Africa" Case "046D" Return "Bashkir - Russia" Case "046E" Return "Luxembourgish - Luxembourg" Case "046F" Return "Greenlandic - Greenland" Case "0470" Return "Igbo - Nigeria" Case "0473" Return "Tigrinya - Ethiopia" Case "0475" Return "Hawiian - United States" Case "0478" Return "Yi - China" Case "047A" Return "Mapudungun - Chile" Case "047C" Return "Mohawk - Canada" Case "047E" Return "Breton - France" Case "0480" Return "Uyghur - China" Case "0481" Return "Maori - New Zealand" Case "0482" Return "Occitan - France" Case "0483" Return "Corsican - France" Case "0484" Return "Alsatian - France" Case "0485" Return "Sakha - Russia" Case "0486" Return "K'iche - Guatemala" Case "0487" Return "Kinyarwanda - Rwanda" Case "0488" Return "Wolof - Senegal" Case "048C" Return "Dari - Afghanistan" Case "0491" Return "Scottish Gaelic - United Kingdom" Case "0492" Return "Central Kurdish - Iraq" Case "0801" Return "Arabic - Iraq" Case "0803" Return "Valencian - Valencia" Case "0804" Return "Chinese (Simplified) - China" Case "0807" Return "German - Switzerland" Case "0809" Return "English - United Kingdom" Case "080A" Return "Spanish - Mexico" Case "080C" Return "French - Belgium" Case "0810" Return "Italian - Switzerland" Case "0813" Return "Dutch - Belgium" Case "0814" Return "Norwegian (Nynorsk) - Norway" Case "0816" Return "Portuguese - Portugal" Case "081A" Return "Serbian (Latin) - Serbia and Montenegro" Case "081D" Return "Swedish - Finland" Case "0820" Return "Urdu - (reserved)" Case "082C" Return "Azeri (Cyrillic) - Azerbaijan" Case "082E" Return "Lower Sorbian - Germany" Case "0832" Return "Setswana / Tswana - Botswana" Case "083B" Return "Sami (Northern) - Sweden" Case "083C" Return "Irish - Ireland" Case "083E" Return "Malay - Brunei Darassalam" Case "0843" Return "Uzbek (Cyrillic) - Uzbekistan" Case "0845" Return "Bangla - Bangladesh" Case "0846" Return "Punjabi - Pakistan" Case "0849" Return "Tamil - Sri Lanka" Case "0850" Return "Mongolian (Mong) - Mongolia" Case "0859" Return "Sindhi - Pakistan" Case "085D" Return "Inuktitut (Latin) - Canada" Case "085F" Return "Tamazight (Latin) - Algeria" Case "0867" Return "Pular - Senegal" Case "086B" Return "Quechua - Ecuador" Case "0873" Return "(reserved) - (reserved)" Case "0873" Return "Tigrinya - Eritrea" Case "0C01" Return "Arabic - Egypt" Case "0C04" Return "Chinese - Hong Kong SAR" Case "0C07" Return "German - Austria" Case "0C09" Return "English - Australia" Case "0C0A" Return "Spanish - Spain" Case "0C0C" Return "French - Canada" Case "0C1A" Return "Serbian (Cyrillic) - Serbia and Montenegro" Case "0C3B" Return "Sami (Northern) - Finland" Case "0C6B" Return "Quechua - Peru" Case "1001" Return "Arabic - Libya" Case "1004" Return "Chinese - Singapore" Case "1007" Return "German - Luxembourg" Case "1009" Return "English - Canada" Case "100A" Return "Spanish - Guatemala" Case "100C" Return "French - Switzerland" Case "101A" Return "Croatian (Latin) - Bosnia and Herzegovina" Case "103B" Return "Sami (Lule) - Norway" Case "105F" Return "Central Atlas Tamazight (Tifinagh) - Morocco" Case "1401" Return "Arabic - Algeria" Case "1404" Return "Chinese - Macao SAR" Case "1407" Return "German - Liechtenstein" Case "1409" Return "English - New Zealand" Case "140A" Return "Spanish - Costa Rica" Case "140C" Return "French - Luxembourg" Case "141A" Return "Bosnian (Latin) - Bosnia and Herzegovina" Case "143B" Return "Sami (Lule) - Sweden" Case "1801" Return "Arabic - Morocco" Case "1809" Return "English - Ireland" Case "180A" Return "Spanish - Panama" Case "180C" Return "French - Monaco" Case "181A" Return "Serbian (Latin) - Bosnia and Herzegovina" Case "183B" Return "Sami (Southern) - Norway" Case "1C01" Return "Arabic - Tunisia" Case "1c09" Return "English - South Africa" Case "1C0A" Return "Spanish - Dominican Republic" Case "1C1A" Return "Serbian (Cyrillic) - Bosnia and Herzegovina" Case "1C3B" Return "Sami (Southern) - Sweden" Case "2001" Return "Arabic - Oman" Case "2009" Return "English - Jamaica" Case "200A" Return "Spanish - Venezuela" Case "201A" Return "Bosnian (Cyrillic) - Bosnia and Herzegovina" Case "203B" Return "Sami (Skolt) - Finland" Case "2401" Return "Arabic - Yemen" Case "2409" Return "English - Caribbean" Case "240A" Return "Spanish - Colombia" Case "241A" Return "Serbian (Latin) - Serbia" Case "243B" Return "Sami (Inari) - Finland" Case "2801" Return "Arabic - Syria" Case "2809" Return "English - Belize" Case "280A" Return "Spanish - Peru" Case "281A" Return "Serbian (Cyrillic) - Serbia" Case "2C01" Return "Arabic - Jordan" Case "2C09" Return "English - Trinidad and Tobago" Case "2C0A" Return "Spanish - Argentina" Case "2C1A" Return "Serbian (Latin) - Montenegro" Case "3001" Return "Arabic - Lebanon" Case "3009" Return "English - Zimbabwe" Case "300A" Return "Spanish - Ecuador" Case "301A" Return "Serbian (Cyrillic) - Montenegro" Case "3401" Return "Arabic - Kuwait" Case "3409" Return "English - Philippines" Case "340A" Return "Spanish - Chile" Case "3801" Return "Arabic - U.A.E." Case "380A" Return "Spanish - Uruguay" Case "3C01" Return "Arabic - Bahrain" Case "3C0A" Return "Spanish - Paraguay" Case "4001" Return "Arabic - Qatar" Case "4009" Return "English - India" Case "400A" Return "Spanish - Bolivia" Case "4409" Return "English - Malaysia" Case "440A" Return "Spanish - El Salvador" Case "4809" Return "English - Singapore" Case "480A" Return "Spanish - Honduras" Case "4C0A" Return "Spanish - Nicaragua" Case "500A" Return "Spanish - Puerto Rico" Case "540A" Return "Spanish - United States" Case "7C04" Return "Chinese - Traditional" Case Else Return "Other (can't determine with @OSLang directly)" EndSwitch EndFunc ;==>_GetLanguage Func LCIDToLocaleName($iLCID) Local $aRet = DllCall("kernel32.dll", "int", "LCIDToLocaleName", "int", $iLCID, "wstr", "", "int", 85, "dword", 0) Return $aRet[2] EndFunc ;==>LCIDToLocaleName _GetLanguage.au3 Source: AutoIt Help File (ScITE Editor (F1)) I hope you enjoy this tiny code.
  6. Hey Guys, Maybe you can help me with something small. It is not terrible but it slows down my script and after a while even crash the script. First i explain what i have; I have a GUI with a lot of GUICtrlCreateInput controls, lets say 600 pieces. All the controls are hidden when the GUI is displayed, i have 3 buttons attached to 200 pieces each. When i press button-1 the first 200 controls are showed, When i press button-2 the first 200 controls are hidden and the next 200 controls are showed, etc, etc. This is working perfectly but after a while the GUI is getting slower and slower. After a while the controls aren't responding anymore and the script crashes. When i compile the script to 64-Bits version the speed is a lot better but you can still see the script slowing down each time i use the buttons. I think there has to be a buffer somewhere that is filling each time i show and hide the controls, but how can i clear that buffer without restarting the script? Deleting and re-creating the controls didn't help, deleting the entire gui (and controls) and re-creating it didn't help also. The only thing that is working is restarting the script. Thanks guys! PS: If you need a working example i can add it to this topic, just let me know. It is not rocket science, i just create the controls and show/hide them with a while loop and 3 buttons.
  7. Hello again I need to click this Submit button, but it's in a lightbox and has no ID (i think) and I can't figure out a way to target it. _IEFormSubmit doesn't work. Thank you
  8. Hello... How i can write data from txt to +3 Input? Example: In txt i have: Michael XYZ, 21, Boston Olex Marshal, 17, Boston Alex XYZ, 19, Boston And now i want load that data to input in autoit. Name y.o city [ Input1] [Input2] [Input3] [ Input4] [Input5] [Input6] [ Input7] [Input8] [Input9] After load should be: Name y.o city [Michael XYZ] [21] [Boston] [ Olex Marshal] [17] [Boston] [ Alex XYZ] [19] [Boston] FileOpen("Test.txt",0)                          $aas = GUICtrlSetData($Input1, FileReadLine("Test.txt",1))             FileClose("Test.txt") But its wrong. ofcourse its load all to input 1. So now how do you load this data directly into each input separately? The comma stop sign is here. Each line is a new person
  9. I am taking some idea from here: '?do=embed' frameborder='0' data-embedContent>> But what I am looking to accomplish is simple, I want to have an input box with a hidden input box below it. I will also have a defined list of items. When the text box has any value in it that does not directly equal an item in the pre defined list, the edit box should show. and populate suggested items based on whats being typed which I will do that part later, should be easy. I am stuck on a simple portion which should be easy and i'm not sure why I am having trouble with it. The way thr code below should work is, as long as there is a value in the Input box, the edit box will appear, if there is no value in the input box, the edit box should be hidden. here is what I have so far: #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 615, 438, 192, 124) $Input1 = GUICtrlCreateInput("", 64, 72, 313, 21) $Edit1 = GUICtrlCreateEdit("", 64, 96, 313, 177) GUISetState(@SW_SHOW) GUICtrlSetState($Edit1, $GUI_HIDE) While 1 $words = GUICtrlRead($Input1) If $words NOT = "" then GUICtrlSetState($Edit1, $GUI_SHOW) else GUICtrlSetState($Edit1, $GUI_HIDE) endif $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd func flopdrop() If BitAnd($Edit1,2) AND $words = "" Then GUICtrlSetState($Edit1, $GUI_HIDE) Else GUICtrlSetState($Edit1, $GUI_SHOW) EndIf endfunc the problem with this is a nasty flicker when you move the mouse or do anything else. I will get rid of the scroll bars too, but thats once I solve this flicker issue. I know its happening because I have the check being performed within the While statement, but I can't think of any other way to do it.. I even tried using a timer to only check once every few seconds, but that didn't seem to work either: If $words NOT = "" AND (@SEC = 00 OR 10 OR 20 OR 30 OR 40 OR 50) AND (@MSEC < 20)) Then ; Blah blah blah endIf Does anyone have any thoughts or has anyone been able to do this? Thanks in advance!!
  10. NEW VERSION: 17 Jun 2013 Ever wondered how to avoid input being so painful? You can type a lot of errors in a GUICtrlCreateInput, for example alphanumeric where you want only numbers and decimals, typing 10 characters where you only want 9, etc. Input masks can make your life easier and Validation can be as simple as this: GuiCtrlCreateLabel("Input Decimal(8,2)", 10, 110, 200, 15) $MyInput = GUICtrlCreateInput("",210,110,110,20) _Inputmask_add($MyInput, $iIM_INTEGER, 0, "", 8, 2) It requires only one additional line per input The UDFexample script demonstrates 13 dynamic input validations. A lot more validations can be made. Up to you to be inventive. _inputmask 1.0.0.5.zip Enhanced: Better input control - The previous versions worked well with blank fields but editing non-blank inputs was really a pain. Now the cursor remains where the edit is occurring. Once the max width is reached, no additional characters can be added. - Added beep on invalid entry. In fact I use soundplay instead of beep because beep gives a cracking sound result on my laptop. You can set beep off (put Global $bBeep = False anywhere in your script) If you prefer a true beep, you can beep it on in line 150. Minor issue: - decimal Numbers after the '.' scroll away when inserting until it bumps to the max allowed decimals. I didn't fix that yet, I don't know how to solve this ... Examples: Example 1 _inputmask - example.au3 (see zip file) Example 2: _Inputmask combining two WM_COMMAND handlers (see zip file) Thanks to Melba23 for his explanation how to combine GUIRegisterMsg WM_COMMAND handlers) If you create your own input mask that could be useful for the AutoIt community, please let me know, I will be glad to add it to the above example. GreenCan
  11. Hello Guys this is my gui and i need the numeric value typed in the highlighted inputbox. if this value is greater than 1 i need to perform some operations \ Here is the summary about that field which i got from wininfo tool i tried writing the code as shown below.. but the msgbox is popping up empty value..when the same code is pasted under some button action i am able to access the value present in the field..but when placed alone as written in the attached script i am unable to fetch it... here i am using the valu present in the field can you guys tell me what's wrong??? or how can i get that value? My_GUI.au3
  12. Hi All: How to set the input border color? tks in advance
  13. Hey, i would like to set a value into an INPUT field. Checked the _IEFormElementSetValue function but that does require _IEFormGetObjByName and this is where the problem comes in. The input field I want to write to is not a part of a form tag. It is part of a table. <input type="text" class="w2" id="nabidka_vozidel_formular_tach_od" name="nabidka_vozidel_formular_tach_od" onchange="GLOBAL.pocetInzerceNZ(&quot;nabidka_vozidel_formular&quot;,&quot;tach_od&quot;,&quot;&quot;);" autocomplete="off"> I tried this but that didn't work: $oDownloadSamples = _IEGetObjById($oIE, "nabidka_vozidel_formular_tach_od") _IEFormElementSetValue($oDownloadSamples, "123") If you want to try the site I'm working with is https://www.tipcars.cz/. There is a menu on the top left hand side and if you click the "vyhledat" button the input fields will show up. Thanks
  14. i'm trying to create a program that let's the user type a word in an input field (gui) and when a button is pressed the letters of the word are replaced by 1 word each from a list of words in a text file i created the gui for it but i need help to add some more code to make it work like intented each letter of a word should be replaced by a word from a text file the text file is a source for replacing letters is a file with 2 columns separated by tab that contains the entire alphabet (26 rows) please help if possible i posted an example gui screenshot
  15. hello Greetings to all dears i have a big problem in the bass.dll e.g If you play an audio file using the bass.dll and You changed the audio output Such as setting or removing headphones The sound output of bass.dll does not change Is there any solution If it exists, please give it to me Greetings and thanks in advance I apologize for my bad English
  16. I have 2 items (a field box and a bypass checkbox). every time the box is checked i need the field to become writable. unchecked is read only displaying some text. this is as far as i got as I am stuck at making it read/write toggle #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <EditConstants.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("Test", 500, 500) Global $hCombo = GUICtrlCreateInput("", 10, 10, 200, 20, BitOR($ES_AUTOHSCROLL,$ES_READONLY)) GUICtrlSetBkColor($hCombo,0xe7e5e5) Global $cbox = GUICtrlCreateCheckbox ("", 40,50,10,20) GUICtrlSetState($cbox, $GUI_Unchecked) GUISetState() Global $sCurrCombo = "" While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cbox If GUICtrlRead($cbox) <> $sCurrCombo Then $sCurrCombo = GUICtrlRead($cbox) GUICtrlSetStyle ($hCombo, $SS_LEFTNOWORDWRAP) GUICtrlSetBkColor($hCombo,0xFFFFFF) MsgBox(0, "Choice", "PLease enter the text") EndIf EndSwitch WEnd
  17. Good morning I'm working with a popup GUI, which shows some data, that is read-only display... On the event "click on a button", I'd like to change the style of the Input to Read-only to Editable... Any suggestions? Thanks
  18. Hello. I've got a problem. I want to center my input vertically, but I don't have any single idea how to do it. There's my example code: #include <GUIConstantsEx.au3> $GUI = GUICreate("Gui", 237, 93, 192, 124) $Input1 = GUICtrlCreateInput("Center vertically isn't correct", 16, 16, 201, 62) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd What could I do? Greetings, "genotypek".
  19. I'm having trouble in making an input box where I can limit the characters that can be inputted. Anybody have an idea how this can be done in Auto IT? Specifically I would like to create an input field where the user would enter a MAC address. What I would like to do is to limit the characters that can be inputted to only HEX values (A-F and 0-9 as well as the - character). This is so that the user cannot input invalid characters. The program is going to be used by very non-technical people, so the idea is to remove as many chances for errors that we can think of. I would also prefer to limit the field to only 17 characters, so that there is only enough space to enter the MAC address with the - character as the separator. Thank you all in advance for any suggestions!
  20. Hi Guys, i am working on a translation app. There are a couple of regular input fields with text that the user is supposed to change to a new language. I want to change the color of the input field as soon as the user leaves the input field. Is there a way to do that? I know how to do this with a button, but i don't know how i can work with focus. Has any of you done something like this before? Thanks!
  21. Hi, I have an input box which is disabled, and populates with a value after a button is pressed. I want to leave this box disabled after there is a value in it, but still allow the user to right click and copy the boxes contents, is this kind of thing possible somehow?
  22. Hi, iam not able to "activate" (the blue border of the edit control should be displayed) the created input control when clicking on a listview item. All i want is, when the edit control is created, it's active (blue border displayed) and you can directly write in it (cursor at the end), but i can't get it work. Can someone help? #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <WindowsConstants.au3> #include <GuiEdit.au3> #include <Misc.au3> Global $Debug_LV = False ; Check ClassName being passed to ListView functions, set to True and use a handle to another control to see it work Global $bChanged = False, $hDLL = DllOpen("user32.dll") Global $aClick_Info[2] Global $hListView, $hTmp_Edit Global $GUI, $hImage $GUI = GUICreate("(UDF Created) ListView Create", 400, 300) $hListView = _GUICtrlListView_Create($GUI, "", 2, 2, 394, 268) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES)) GUISetState() GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") ; Load images $hImage = _GUIImageList_Create() _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0xFF0000, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0x00FF00, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0x0000FF, 16, 16)) _GUICtrlListView_SetImageList($hListView, $hImage, 1) ; Add columns _GUICtrlListView_InsertColumn($hListView, 0, "Column 1", 100) _GUICtrlListView_InsertColumn($hListView, 1, "Column 2", 100) _GUICtrlListView_InsertColumn($hListView, 2, "Column 3", 100) ; Add items _GUICtrlListView_AddItem($hListView, "Row 1: Col 1", 0) _GUICtrlListView_AddSubItem($hListView, 0, "Row 1: Col 2", 1) _GUICtrlListView_AddSubItem($hListView, 0, "Row 1: Col 3", 2) _GUICtrlListView_AddItem($hListView, "Row 2: Col 1", 1) _GUICtrlListView_AddSubItem($hListView, 1, "Row 2: Col 2", 1) _GUICtrlListView_AddItem($hListView, "Row 3: Col 1", 2) ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) #forceref $hWnd, $iMsg, $iwParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo $hWndListView = $hListView If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $NM_CLICK ; Sent by a list-view control when the user clicks an item with the left mouse button Local $iIndex, $iSubItem, $sTmp_Text, $aRect, $aPos $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) $iIndex = DllStructGetData($tInfo, "Index") $iSubItem = DllStructGetData($tInfo, "SubItem") ; make sure user clicks on the listview & only the activate If $iIndex <> -1 And Not $bChanged Then $bChanged = True Local $iTimer = TimerInit() Local $iCounter = 1 Local $DOUBLE_CLICK_TIME_DELTA = 1200 While 1 If _IsPressed("01", $hDLL) Then $iCounter+=1 ConsoleWrite("_IsPressed - clicked." & @CRLF) ; Wait until key is released. While _IsPressed("01", $hDLL) WEnd ConsoleWrite("counter: " & $iCounter & " timer: " & TimerDiff($iTimer) & @CRLF) EndIf If $iCounter = 2 And TimerDiff($iTimer) < $DOUBLE_CLICK_TIME_DELTA Then ConsoleWrite("yes." & @CRLF) ExitLoop EndIf If TimerDiff($iTimer) > $DOUBLE_CLICK_TIME_DELTA Then ConsoleWrite("over." & @CRLF) $bChanged = False Return 1 EndIf WEnd GUICtrlDelete($hTmp_Edit) $aClick_Info[0] = $iIndex $aClick_Info[1] = $iSubItem ;~ GUISetAccelerators($aAccelKeys) $sTmp_Text = _GUICtrlListView_GetItemText($hWndListView, $iIndex, $iSubItem) ConsoleWrite("item: " & $iIndex & " subitem: " & $iSubItem & " text: " & $sTmp_Text & @CRLF) If $iSubItem = 0 Then $aRect = _GUICtrlListView_GetItemRect($hWndListView, $iIndex, 2) Else $aRect = _GUICtrlListView_GetSubItemRect($hWndListView, $iIndex, $iSubItem) EndIf $aPos = ControlGetPos("", "", $hWndListView) ConsoleWrite("Information :" & StringFormat("Item 2 Rectangle : [%d, %d, %d, %d]", $aRect[0]+ $aPos[0], $aRect[1]+ $aPos[1], $aRect[2], $aRect[3]) & @CRLF) $hTmp_Edit = GUICtrlCreateEdit($sTmp_Text, $aRect[0] + $aPos[0], $aRect[1] + $aPos[1], $aRect[2] - $aRect[0], $aRect[3] - $aRect[1], 0) GUICtrlSetState($hTmp_Edit, $GUI_FOCUS+$GUI_SHOW+$Gui_ontop) _GUICtrlEdit_SetSel(GUICtrlGetHandle($hTmp_Edit), 2, 15) EndIf EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY
  23. This function parser printing-like intervals (like "1,2,3-5") and returns an array with every page number as item. Ex.: "1,2,3-5" will return an array which 0th element is "5" (page count) and the items are 1, 2, 3, 4 and 5. The array is given in the order the $interval parameter is set, and reverse intervals are also supported (e.g.: "8,4,7-5" will return items 8, 4, 7, 6, 5 and 0th element is 5). If it fails, it will return False and set error to non-zero (invalid string). #cs Range parser This function parser printing-like intervals (like "1,2,3-5") and returns an array with every page number as item. @author Jefrey S. Santos <jefrey[at]jefrey.ml> #ce Func rangeparser($interval) $interval = StringReplace($interval, " ", "") If Not StringRegExp($interval, "([0-9\-\,])") Then Return SetError(1, 0, False) $interval = StringSplit($interval, ",") Dim $return[1] For $i = 1 To $interval[0] If StringInStr($interval[$i], "-") Then $split = StringSplit($interval[$i], "-") If $split[0] <> 2 Then Return SetError(1, 0, False) If $split[1] = $split[2] Then ReDim $return[UBound($return)+1] $return[UBound($return)-1] = $split[1] Else If $split[1] < $split[2] Then $step = +1 Else $step = -1 EndIf For $j = $split[1] To $split[2] Step $step ReDim $return[UBound($return)+1] $return[UBound($return)-1] = $j Next EndIf Else ReDim $return[UBound($return)+1] $return[UBound($return)-1] = $interval[$i] EndIf Next $return[0] = UBound($return)-1 Return $return EndFunc
  24. Hello everyone, i am working atm at a small programm, i want to make it work like this: I click on "NEW" i can add a new Customer, i want to read the input and save it (the thing is i want to make it work for me and my friend in the internet so i think we need a internet database but firstly i want to make it work on my laptop only for me) i dont know in what to save it cuz "txt" is a bit weird , why? becouse later i want to make a button which search for the "customer" if i press on the other button not "NEW", if i press on "Search", then i have to write the customers name in, and the info i got from the customer has to show up and be changeable. i hope someone understand my poor english xD , well here is the script which is not finisht cuz i dont know how to finish the idea. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $GUI = GUICreate("Form1", 429, 148, 249, 151) $NEW = GUICtrlCreateButton("NEW", 48, 24, 75, 25) $Search = GUICtrlCreateButton("Search", 48, 54, 75, 25) $SAVE = GUICtrlCreateButton("SAVE", 328, 112, 75, 25) $EDIT = GUICtrlCreateButton("EDIT", 328, 112, 75, 25) GUISetState(@SW_SHOW, $GUI) GUICtrlSetState ($SAVE, $GUI_HIDE) GUICtrlSetState ($EDIT, $GUI_HIDE) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $NEW GUICtrlSetState ($SAVE, $GUI_SHOW) _NewCustomer() Case $Search GUICtrlSetState ($EDIT, $GUI_SHOW) _SearchCustomer() Case $SAVE ;not completed yet cuz i dont know in which format to save it to ;read it again in the GUI to make it edit able. EndSwitch WEnd Func _SearchCustomer() $Input2 = GUICtrlCreateInput("", 136, 57, 121, 21) EndFunc Func _NewCustomer() $Input1 = GUICtrlCreateInput("", 136, 27, 121, 21) EndFunc test functions.au3
  25. Hello, I am trying to create an input box that when a user types something like the character "." that it will prevent that character from entering the input box and display a message stating why the input was prevented. Something like what $ES_NUMBER style does for the input box, but for a floating point number. I can work out the logic of how to do that, but I am not yet sure how to correctly capture keyboard input before it arrives IN the input box. This should only run on the particular input box in question as it is an aid to help clean up user input before it gets sent to a SQL query. I was hoping for something like: $msg = GUIGetMsg() Switch $msg Case $keyboardInput ; pre processing function called hereI have searched for something similar to this but I cannot seem to find one that does exactly what I am looking for. Any help is appreciated. Thanks, K
×
×
  • Create New...