Jump to content

Search the Community

Showing results for tags 'guictrlsetdata'.



More search options

  • 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


Location


WWW


Interests

Found 11 results

  1. im getting strange output in array display,$split_[1] is not properly aligned to other arrays and why guictrlsetdata is not writting any data if i put comma(,) at the end of the text in $Input1??? #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> #Region ### START Koda GUI section ### Form=C:\Users\user\Desktop\Script\StringSplit.kxf $Form1 = GUICreate("Form1", 623, 449, 192, 114) $Input1 = GUICtrlCreateInput("50UGITQ421X, 50UGITQ422X, 50UGITQ423X, 50UGITQ427X, 50UGITQ431X, 50UGITQ435X, 50UGITQ436X, 50UGITQ437X, 50UGITQ441X, 50UGITQ445X, 50UGITQ449X, 50UGITQ453X, 50UGITQ454X, 50UGITQ455X, 50UGITQ459X", 24, 16, 553, 21) $Split = GUICtrlCreateButton("Split", 24, 48, 75, 25) $List1 = GUICtrlCreateList("", 24, 96, 553, 97) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Split $read = GUICtrlRead($Input1) $split_ = StringSplit($read, ",") $Max = UBound($split_, 1) For $i = 1 To UBound($split_) - 1 ConsoleWrite($split_[$i] & @CRLF) ;~ ControlSetText($Form1, "", $List1, $split_[$i]) GUICtrlSetData($List1, $split_[$i]) ;~ GUICtrlSetData($List1, $split_[$i]) ;~ GUICtrlSetData($List1, $i) Next _ArrayDisplay($split_) EndSwitch WEnd
  2. I wanted to make a countdown timer without queueing the countdown message to the next line but the previous data is removed after using GUICtrlSetData. Any thoughts on how to display the previous data/message? Here is an example: #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $_main = GUICreate("", 501, 313, -1, -1) Global $g_idMemo = GUICtrlCreateEdit("", 2, 2, 496, 274, $ES_AUTOVSCROLL + $ES_READONLY + $WS_VSCROLL) GUICtrlSetData(-1, "") GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New") GUICtrlSendMsg($g_idMemo, $EM_SETREADONLY, True, 0) GUICtrlSetBkColor($g_idMemo, 0xFFFFFF) GUICtrlSetCursor($g_idMemo, -1) GUISetState(@SW_SHOW) HotKeySet('{esc}', "_close") Func _close() Exit EndFunc ;==>_close Func MemoWrite($sMessage = "") GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1) EndFunc ;==>MemoWrite MemoWrite("test message 1") Sleep(1000) MemoWrite("test message 2") Sleep(1000) MemoWrite("test message 3") Sleep(1000) For $i = 5 to 0 Step -1 GUICtrlSetData($g_idMemo, "Program will exit in "&$i&" seconds...") Sleep(1000) Next While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
  3. Hello. Could you help me find the answer for my issue. I'm trying to set fomatted data wich is selected from SQL to GUICtrlCreateEdit field. And the GUICtrlSetData function is inserting it in one line. But when I'm trying to do the same using MsgBox the data looks fine. I'm trying to not use _GUICtrlRichEdit UDF. Thanks in advance. Here is my test code. #include <GUIConstants.au3> #include <GUIListBox.au3> #include <SQLite.au3> #include <SQLite.dll.au3> Opt("GUIOnEventMode", 1) $hMainGUI = GUICreate("Test", 520, 240) $hListBox = _GUICtrlListBox_Create($hMainGUI, "", 10, 10, 180, 80) $hEdit = GUICtrlCreateEdit("", 10, 80, 500, 150) GUISetState(@SW_SHOW, $hMainGUI) GUIRegisterMsg($WM_COMMAND, "_WM_COMMAND") Local $hQuery, $aRow _SQLite_Startup() $hDB = _SQLite_Open('MyDB.sqlite') _SQLite_Query(-1, "SELECT ID ||"". "" || Name FROM Templates ORDER BY ID;", $hQuery) While _SQLite_FetchData($hQuery, $aRow) = $SQLITE_OK _GUICtrlListBox_AddString($hListBox, $aRow[0]) WEnd GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSE_Button") While 1 Sleep(100) WEnd Func _WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) Local $hWndFrom, $iIDFrom, $iCode, $hWndListBox If Not IsHWnd($hListBox) Then $hWndListBox = GUICtrlGetHandle($hListBox) $hWndFrom = $lParam $iIDFrom = BitAND($wParam, 0xFFFF) ; Low Word $iCode = BitShift($wParam, 16) ; Hi Word Switch $hWndFrom Case $hListBox, $hWndListBox Switch $iCode Case $LBN_DBLCLK Select_Template(_GUICtrlListBox_GetCurSel($hListBox) + 1) Return 0 EndSwitch EndSwitch EndFunc ;==>_WM_COMMAND Func CLOSE_Button() _SQLite_Close() _SQLite_Shutdown() Exit EndFunc ;==>CLOSE_Button Func Select_Template($sListItem) _SQLite_QuerySingleRow($hDB, _ "SELECT Content " & _ "FROM Templates " & _ "WHERE ID = " & $sListItem & ";", $aRow) ;~ MsgBox(64, "Test: " & $sListItem, $aRow[0]) GUICtrlSetData($hEdit, $aRow[0]) WinSetTitle($hMainGUI, "", "Test: " & $sListItem) EndFunc ;==>Select_Template
  4. Hello! When utilizing GUICtrlSetData to edit what is displayed in a GUICtrlCreateEdit field, is there a way to just make it write new lines rather than clearing what's there and writing the new information? For example ... GUICtrlSetData ($editField, "Line one"&@CRLF , "") GUICtrlSetData ($editField, "Line two"&@CRLF , "") GUICtrlSetData ($editField, "Line three"&@CRLF , "") What happens now if those three things run one after another, the Edit field displays "Line One" , then that is replaced with "Line Two" and so on with the previous information disappearing and the subsequent taking its place. I'd like for it to say all three, one after another. Any documents on how I may accomplish this? Thanks! -Reiz
  5. Hello, i past only part of the code I´m trying to create a new list depeding of the choices of the combobox 1,2, and 3, for the combobox 10 If i ask the choice in the mensage box it respondes correctely, but if i click on the combobox10 it is empty doesnt add the $ps1 (choice of combobox1) I get the probleme alredy, is because wen i create the combox10 and the setdata, is before the variable get the value. Is there any way to add the combobox inside the loop? while 1 ..... case $???? $Combo10 = GUICtrlCreateCombo("Corpo", 273, 53, 75, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData($combo10, $ps1) Any ideas?? sorry i creat 3 quots and dont know how to erase the 2 empty ones Thanks #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $dir =("FU\") #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 500, 400, 224, 137) $Button1 = GUICtrlCreateButton("reade var $ps1", 6, 360, 40, 20) GUICtrlSetFont(-1, 8, 400, 0, "Arial") $Pic1 = GUICtrlCreatePic("", 41, 51, 25, 25) $Pic2 = GUICtrlCreatePic("", 41, 83, 25, 25) $Pic3 = GUICtrlCreatePic("", 41, 113, 25, 25) $Combo1 = GUICtrlCreateCombo("Corpo", 73, 53, 75, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) jcorpo($combo1); this funcion will show list of itens $Combo2 = GUICtrlCreateCombo("Corpo", 73, 85, 75, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) jcorpo($combo2) $Combo3 = GUICtrlCreateCombo("Corpo", 73, 115, 75, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) jcorpo($combo3) $Pic10 = GUICtrlCreatePic("", 241, 51, 25, 25) $Combo10 = GUICtrlCreateCombo("Corpo", 273, 53, 75, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData($combo10, $ps1 &"|"& $ps2 &"|"& $ps3); doesnt work, supostely should get the choice of combo1,1 and 3 GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $Button1 MsgBox("0", "test", $ps1, "3") Case $combo1 $ps1 = GUICtrlRead($combo1) img1($combo1, $Pic1, 41, 51); this funcion will show one image depending the choice case $combo2 $ps2 = GUICtrlRead($combo2) if $ps2 = $ps1 Then MsgBox("0", "ERRO", "Repetindo seleção",2) Else img1($combo2, $pic2, 41, 83) EndIf Case $combo3 $ps3 = GUICtrlRead($combo3) if $ps3 = $ps2 or $ps3 = $ps1 Then MsgBox("0", "ERRO", "Repetindo seleção",2) Else img1($combo3, $Pic3, 41, 113) EndIf case $combo10 img1($combo10, $pic10, 41, 145) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
  6. Case $Combo4; Stany $ReadCombo = GUICtrlRead($Combo4) if $ReadCombo = "California" then $ReadFile = FileRead(@ScriptDir&'\Dzielnice\California.txt') GUICtrlSetData($Combo5,$ReadFile) _FileWriteToLine(@ScriptDir&'\cfg\ostatniedane.txt',1,'5') I want overwrite the First line of file ostatniedane.txt but it's only adds another one :/ Anyone Could help me?
  7. Good Morning Yes, it's 12 AM here LOL.. so can't say good evening... anywho lol... it's late and I'm losing it haha sry... Love you guys, love the apps and all the support! I have somewhat lost my mind in the forums and trying to get my gui to update a label from an input box on the same gui without the gui flashing like crazy... Point is I want to take that user input and VISUALLY use it to update the text in the rest of the gui... Is this possible without this insane flicker / flashing every time the mouse moves? Am I attacking this the wrong way? I know people have used OnEvent Mode - but I need it where folks type... not just when the mouse moves or clicks... $GUI_EVENT_MOUSEMOVE or $GUI_EVENT_PRIMARYDOWN If I'm screwed I'm screwed... I'm just to tired to do this right, right now. "Yeah, to hell with it TARS. Just give it to me straight" - Interstellar Also - If I offended anyone, please let me know and I'll edit my forum text. I'm just tired. While 1 If GuiCtrlRead($I_IPAddress01) <> "IP ADDRESS" and GuiCtrlRead($I_ComputerName01) <> "COMPUTER NAME" Then GUICtrlSetData($L_IP01, GuiCtrlRead($I_IPAddress01)) GUICtrlSetData($L_Hostname01, GuiCtrlRead($I_ComputerName01)) EndIf $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $B_Ping01 Ping01() Case $B_EXIT01 Exit Case $B_NBTSTAT01 NBTSTAT01() EndSwitch WEnd
  8. Hi All, I've run into an issue in one of my scripts using the GUICtrlCreateDate function with the $DTS_TIMEFORMAT flag. Basically, after the creation of the Date tool, I seem to be unable to set the data in the box; And after reading the function reference for GuiCtrlSetData, This does seem to be something that's supported... So i'm a little lost as to where exactly i'm going wrong. I've created a quick test script, and still can't get the two functions to work harmoniously: local $GUI = GuiCreate("",100,40) local $testDate = GUICtrlCreateDate("",15,10,70,20,9,-1) local $test = GUIctrlSetData(-1,"09:00:00") ConsoleWrite($test & @CR) GUIsetState(@SW_SHOW) While 1 switch GUIgetMsg() Case -3 Exit EndSwitch WEnd Theoretically, the date input should show 09:00:00, But the GUIctrlSetData seems to be failing (returning 0). I've checked the format of the Date input by using GUIctrlRead, and have adhered to that format in the test above, but it still seems to be failing. Any Ideas? Any help is greatly appreciated! Many Thanks Javi
  9. Salam, Hello, Hi Today i am showing you some new styles of progress bar i don't know if anyone posted a thing like this on thins forum _GUICtrlCreateProgress This UDF allows you to create new style progress bar Colors, Values can be changed by using native functions of autoit i created this script years ago while i was not on this forum now i think it should be shared on this forum check this out if anyone is interested any help is greatly appreciated NEW $PBSC_LINE_LEFT_TO_TIGHT changed to $PBSC_LINE_LEFT_TO_RIGHT New Style Progressbar.rar old New Style Progressbar.rar
  10. Sample code: ; Enter username to transfer item to Input $newUserInput = GUICtrlCreateCombo("", 180, 170, 350, 35, BitOR($CBS_DROPDOWNLIST, $WS_VSCROLL, $CBS_SORT)) GUICtrlSetFont(-1, 14, 400, 0, "Tahoma") GUICtrlSendMsg(-1, $CB_SETMINVISIBLE, 10, 0) Part 2 of sample code: If $itemString <> "" Then Local $mySQLstatement = "SELECT * FROM Inventory WHERE Name = '" & $itemString & "' AND Status = 1" $executeStatement = _Query($global_SQLInstance, $mySQLstatement) $internalName = $executeStatement.Fields("Name").value $usernameID = $executeStatement.Fields("UserID").value GUICtrlSetData($userInput, getName("User", $usernameID)) GUICtrlSetData($itemInput, "|" & getString("UserItem", $usernameID) & "|", $Name) GUICtrlSetData($newUserInput, "|" & getString("Username", $usernameID)) EndIf Is it possible to prevent users from changing selection of items in the combobox? If so, is it possible to retrieve the value or data of the item currently shown in the combobox? If so/not so, how do I retrieve the value of item displayed?
  11. I searched for this oddity for a while but found no results. If I missed it, my apologies. I have an app that I am building that will eventually search a SQL database for results within a specified range of time. To collect the range of time required but the user, I have 2 fields I created, one for start and the other for end times. They are formatted "yyyy/MM/dd HH:MM:ss" for entry. The fields are created with this: $dpStartDate = GUICtrlCreateDate(_NowCalc(), 112, 88, 146, 24) $dpEndDate = GUICtrlCreateDate(_NowCalc(), 416, 88, 146, 24) I am setting the format of the fields with this code: $DTM_SETFORMAT_ = 0x1032 ; $DTM_SETFORMATW $style = "yyyy/MM/dd hh:mm:ss" GUICtrlSendMsg($dpStartDate, $DTM_SETFORMAT_, 0, $style) GUICtrlSendMsg($dpEndDate, $DTM_SETFORMAT_, 0, $style) What I am attempting to do is when the start field is updated, compare it with the end time field. If the end time is less than the start time, make both fields match. When I attempt to do so with the function below, The end time date is copied correctly but the time (hour) is reset to 1, no matter the time entered. Am I going about updating the field incorrectly? As an example, I set the date in the start field to "2013/08/23 11:47:38", the end time field gets set to "2013/08/23 01:00:00" Func dpStartDateChange() Local $stDT = GUICtrlRead($dpStartDate), $edDT = GUICtrlRead($dpEndDate) If $edDT < $stDT Then MsgBox(0,"Change Needed","End Time: "&$edDT&@CRLF&"Start Time: "&$stDT) ;Shows correct time GUICtrlSetData($dpEndDate,$stDT) EndIf EndFunc There is no code for SQL in place yet. I am working on some of the GUI logic for now. Let me know if there is enough code here or you need more.
×
×
  • Create New...