Search the Community

Showing results for tags 'AutoIt'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Chat
    • 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


  • 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


  • Forum
  • AutoIt


  • Community Calendar

Found 445 results

  1. How can I get combobox value by using the ENTER key?
  2. Scite comes up occasional, almost incidentally, in some support topics. I have not found a "Scite" topic in the forums, so this is where I will start. I have recently been using Scite intensively, specifically with a large project and I have certain issues. I know that Scite is not an AutoIt product, but it is so closely integrated to the core release that it makes sense to raise issues and request support here. If this is not the right please refer me to the right forum. Thx Skysnake
  3. I have a ComboBox and I want, when I start writting in it, that it will show me what is the first in the list. Like, is I start writting: "pe" it should show me "peter" if that is the first in the list. How can I do that? While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idClos ExitLoop Case $idComboBox $sComboRead = GUICtrlRead($idComboBox) Local $iIdx = _ArraySearch($aResult,$sComboRead,0,0,0,0,1,1) Local $aComputerOwner = _AD_GetObjectsInOU("OU=al,DC=AD,DC=AL,DC=ORG","(&(objectclass=computer)(managedby=" & $aResult[$iIdx][0] & "))",Default,"cn") _ArrayDelete($aComputerOwner,0) _GUICtrlListView_SetItemCount($idMylist,UBound($aComputerOwner)) If IsArray($aComputerOwner) Then For $i = 0 To UBound($aComputerOwner) - 1 GUICtrlCreateListViewItem($aComputerOwner[$i], $idMylist) Next Else GUICtrlSetData($idMylist, "No computer|") EndIf EndSwitch WEnd
  4. I'm struggling to launch a VBS file via autoit using RunWait. Due to the nature of the deployment tool I am using for said script, I only know that the .vbs files will be in the same directory as my AutoIt-generated .exe, but not what that path will be. The path will look something like this: c:\programdata\vendor\lots\of\folders\randomnumber This is generated during deployment and I have no way of predicting the path - therefore, I am not sure how to call back to "same directory" in order to successfully launch the .vbs. This line is as close as I have gotten - this fires off the cmd window, but it closes immediately with out information, and the .vbs is not launched. RunWait (@ComSpec & " /c" & 'cscript.exe WORKPLEASE.vbs ALL /Q /NoCancel') I thought /c might be the problem, but leaving out the /c element causes me not to even see the momentary CMD window flash by. Any help will be greatly appreciated, and thanks in advance.
  5. Hi. I'm trying to add an array to my gui listview, but it fails with "C:\Program Files (x86)\AutoIt3\Include\GuiListView.au3" (473) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: DllStructSetData($tBuffer, "Text", $aItems[$iI][0]) DllStructSetData($tBuffer, "Text", ^ ERROR My code is: #cs ---------------------------------------------------------------------------- AutoIt Version: Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <WindowsConstants.au3> #include <ComboConstants.au3> #include <GuiComboBox.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <MsgBoxConstants.au3> #Include <AD.au3> #include <Array.au3> Opt('MustDeclareVars', 1) Global $aResult[0][2] Local $aNames[4] = ["DKSO","DKKO","SELU","SEES"] Local Const $iWidth = 300, $iHeight = 250, $iW = 85, $iH = 25 Local $hGUI = GUICreate("Find Computer Owner", $iWidth, $iHeight) ; Create a combobox control. Local $idComboBox = GUICtrlCreateCombo("", 2, 2, 296, 20, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL, $WS_VSCROLL, $CBS_SORT)) ;$WS_VSCROLL Local $idMylist = GUICtrlCreateListView("", 2, 114, 296, 100) Local $idClos = GUICtrlCreateButton("Close", ($iWidth - $iW) / 2, ($iHeight - $iH) - 7 , $iW, $iH) _AD_Open() Local $sFill = "" For $i = 0 to UBound($aNames) -1 Local $aUserInfo = _AD_GetObjectsInOU("OU=Al,DC=ad,DC=al,DC=org","(&(objectCategory=Person)(objectclass=user)(sAMAccountName=" & $aNames[$i] & "*))","","distinguishedName,cn") if @error Then MsgBox(0,@error,@extended) Exit EndIf For $x = $aUserInfo[0][0] To 1 Step -1 If $aUserInfo[$x][0] = "" Or StringInStr($aUserInfo[$x][0], "Resources") > 0 Or StringInStr($aUserInfo[$x][0], "Leavers") > 0 Or StringInStr($aUserInfo[$x][0], "Administration") > 0 Then _ArrayDelete($aUserInfo, $x) EndIf Next _ArrayConcatenate($aResult, $aUserInfo, 1) Next for $i = 0 To UBound($aResult) -1 If $aResult[$i][0] <> "" Then $sFill &= $aResult[$i][1] & "|" EndIf Next _ArrayDisplay($aResult, 'AD ' & UBound($aResult)) $sFill = StringTrimRight($sFill, 1) _GUICtrlComboBox_BeginUpdate($idComboBox) GUICtrlSetData($idComboBox, $sFill, "") _GUICtrlComboBox_EndUpdate($idComboBox) GUISetState(@SW_SHOW, $hGUI) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") _GUICtrlListView_AddColumn($idMylist, "Computername", 296) Local $sComboRead = "" ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idClos ExitLoop Case $idComboBox $sComboRead = GUICtrlRead($idComboBox) Local $iIdx = _ArraySearch($aResult,$sComboRead,0,0,0,0,1,1) Local $aComputerOwner = _AD_GetObjectsInOU("OU=al,DC=AD,DC=AL,DC=ORG","(&(objectclass=computer)(managedby=" & $aResult[$iIdx][0] & "))",Default,"cn") _ArrayDelete($aComputerOwner,0) _ArrayDisplay($aComputerOwner) _GUICtrlListView_SetItemCount($idMylist,UBound($aComputerOwner)) If IsArray($aComputerOwner) Then MsgBox(0,"Test",$sComboRead) _GUICtrlListView_AddArray($idMylist, $aComputerOwner) ; <---- it fails Else GUICtrlSetData($idMylist, "No computer|") EndIf EndSwitch WEnd _AD_Close() ; Delete the previous GUI and all controls. GUIDelete($hGUI) Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo ; Local $tBuffer $hWndListView = $idMylist If Not IsHWnd($idMylist) Then $hWndListView = GUICtrlGetHandle($idMylist) $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) _DebugPrint("$NM_DBLCLK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func _DebugPrint($s_Text, $sLine = @ScriptLineNumber) ConsoleWrite( _ "!===========================================================" & @CRLF & _ "+======================================================" & @CRLF & _ "-->Line(" & StringFormat("%04d", $sLine) & "):" & @TAB & $s_Text & @CRLF & _ "+======================================================" & @CRLF) EndFunc ;==>_DebugPrint Do I do it wrong? Thank you in advanced.
  6. I tried (using AutoIt) to automate a scenario where i have to open IE with specific URL on my extranet(Xen Desktop or Citrix ) ,from there i need to download file and then through WinSCP; I have to move that file to another location that can be access from my Local system using VMWare. I did as far as the above step. Now i want to navigate from my extranet to my local desktop system. But i am not able to move from there.Mouse click is also not working.Please find the below screenshot highlighted in YELLOW.
  7. Hi, I am getting "array variable has incorrect number of subscripts dimension range exceeded" error while executing exe. Not sure what is wrong here. #include <MsgBoxConstants.au3> SelectWindowBasedOnTitle() Func SelectWindowBasedOnTitle()     $winList = WinList()     $wTitle = CheckWindows($winList)    IF $wTitle == "Choose File to Upload" Then             IE()    ElseIf $wTitle == "Open" Then             Chrome()    Else             FireFox()    EndIf EndFunc Func CheckWindows($aArray)     For $i = 1 To Ubound($aArray) - 1         If WinActive($aArray[$i][1]) Then $wTitle= $aArray[$i][0] ;MsgBox(0, "Window Check", $aArray[$i][0] & " is active.")     Next     Return $wTitle EndFunc Func Example()     $wText = WinGetText("[ACTIVE]") EndFunc Func IE()     ControlFocus("Choose File to Upload","","Edit1")     ControlSetText("Choose File to Upload","","Edit1",$CmdLine[1])     ControlClick("Choose File to Upload","","Button1") EndFunc Func Chrome()     ControlFocus("Open","","Edit1")     ControlSetText("Open","","Edit1",$CmdLine[1])     ControlClick("Open","","Button1") EndFunc Func FireFox()     ControlFocus("File Upload","","Edit1")     ControlSetText("File Upload","","Edit1",$CmdLine[1])     ControlClick("File Upload","","Button1") EndFunc
  8. How do I work with 2D arrays. I've tried this but get errors. Local $aTest[4][4] = [[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]] ;$aTest[0][] = [10,11,12] ; Error at [] Local $sTest = "" For $i = 0 To UBound($aTest)-1 Local $aExtract = _ArrayExtract($aTest,$i,$i) $sTest = $sTest & MyTest($aExtract) Next Func MyTest($aTemp) _ArrayDisplay($aTemp) ; Error at v $aTemp Return String($aTemp[0]) & " - " & String($aTemp[1]) & " - " & String($aTemp[2]) & @CRLF EndFunc
  9. Hello, I am looking for a way to essentially fullscreen a YouTube video in Chrome to the size of the window. Eliminating all chrome features, scroll bars, bookmarks, and YouTube headers, etc... To explain why, I wrote a simple script that forces a window to be on top, so when I am working I can have a small sized YouTube window opened playing a video. Being picky, the features of Chrome+YouTube are annoying to see. I would like the video to fulfill the window when toggling it on top and off. Any way to achieve this through the chrome window or will I need to create my own GUI and embed the video? Maybe allowing just the main features such as exit and minimize to exist? While preserving full video functionality of pause and resume. FROM THIS TO THIS Thanks,
  10. Hi. If I use this code: #include <IE.au3> #include <MsgBoxConstants.au3> Local $sServiceTAG = "9S1Y3J2" Local $oIE = _IECreate("" & $sServiceTAG & "/warranty?ref=captchasuccess",Default,0,0) _IELoadWait($oIE) Local $oTds = _IETagNameGetCollection($oIE, "td") For $oTd In $oTds If StringStripWS($oTd.innertext, 7) = "NBD ProSupport" Then $sShipdate = StringStripWS($oTd.NextElementSibling.InnerText, 7) ExitLoop EndIf Next _IEQuit($oIE) MsgBox($MB_SYSTEMMODAL, "Warranty", $sShipdate) My messagebox is empty, but if I use the link first: and then use my code I get results. Can someone help so I don't need to use the link first.
  11. Hi. I have this: november 08, 2015 How can I convert it to: 08/03/2015 I don't see any convert option from month name to a number. Thank you
  12. A file contains over 200 lines. When I run this: $str_list1 = FileRead($file_name) $arr_list1 = StringSplit($str_list1, @CRLF, 1) Array contains only 1 element. $arr_list1[0] = 1 It should contain over 200 elements. $arr_list1[0] > 200 Help file sais: I think with old version of AutoIt it worked fine. Has something changed lately? EDIT: I figured it out. Sorry, my mistake A file was Unicode, not ANSI. When I changed it to ANSI it works fine
  13. Hello I wanna edit a gui something like a List like below in my attachments SAy there's something in the list that I wanna delete, how do I do that?
  14. Updates for your program. Hello a few days ago I started with the task of hosting my program on a host, in order to launch updates from there, thanks to the help I received in the forum I did and now I want to share how my code was. First I did it verifying the version and opened the download page in the default browser, today what I did was a new version in which you download the file from a window with a progress bar and it automatically starts with the installation, it means that it does not open a browser but downloads directly with InetGet (). I know it will not be an expert's code, but maybe someone will help you. I do not speak English so I use Google translator, I mention this in case some things are poorly translated. And this is the function with which everything is done. Func _actualizacion() Local $iPing = Ping("", 3000) If $iPing Then Local $dData = InetRead("") Local $iBytesRead = @extended Local $sData = BinaryToString($dData) If $version<$sData Then $update1="" $update1&="Hay una versión más reciente del software"&@CRLF $update1&="Desea descargarla?"&@CRLF $update=MsgBox(4, "Update", $update1) If($update=6)Then Local $parte1= Run("Update.exe") Exit Exit Else EndIf Else MsgBox($MB_SYSTEMMODAL, "Update", "Usted cuenta con la última versión actualizada.") EndIf Else MsgBox(16, "", "No hay conexión a internet error: " & @error) EndIf EndFunc ;==>Example It is noteworthy that the versions of the software and every time I do an update I host them in so luck for those of us who are starting in this. En español para algunos que lo necesitamos Actualizaciones para tu programa. Hola hace unos días empecé con la tarea de alojar mi programa en un host, con el fin de lanzar actualizaciones desde allí, gracias a la ayuda que recibí en el foro lo hice y ahora quiero compartirles como quedó mi código. Primero lo realicé verificando la versión y abría en el navegador predeterminado la página de descarga, hoy lo que hice fue una nueva versión en la que descarga el archivo desde una ventana con una barra de progreso y automáticamente empieza con la instalación, quiere decir que ya no abre un explorador si no que descarga directamente con InetGet(). Sé que no será el código de un experto, pero quizá a alguien le sirva como ayuda. No se hablar inglés así que uso Google traductor, esto lo menciono por si algunas cosas quedan mal traducidas. Es de resaltar que las versiones del software y cada vez que hago alguna actualización las alojo en así que suerte para los que estamos empezando en esto. _webDownloader.au3 Update.au3
  15. Hello Everyone! I'm attempting to create a checklist app that performs other functions. For performance, I would like to check the box, then have the button to the right enabled. After that button is pressed, the second checkbox is enabled, and ready to be checked, allowing the second button to be pressed. After the second button is pressed, the completion/exit button is enabled/shown. I have my code that currently creates the GUI, creates the checkbox, but when you check it it enables the button and the next checkbox. Can't seem to figure out a Case for GUISetOnEvent. Any assistance would be appreciated! #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <EditConstants.au3> #include <MsgBoxConstants.au3> ; Below is the GUI interface _DeploymentProcess() Func _DeploymentProcess() $aStep1 = GUICreate("Deployment Process", 475, 345, 500, 175) $CBcStep1 = GUICtrlCreateCheckbox("1. Step 01.", 15, 25, 300, 25) $BTNS1 = GUICtrlCreateButton("Email 01", 365, 25, 90, 20) $CBcStep2 = GUICtrlCreateCheckbox("2. Step 02.", 15, 50, 300, 25) $BTNS2 = GUICtrlCreateButton("Email 02", 365, 50, 90, 20) GUICtrlSetState($CBcStep2, $GUI_DISABLE) GUICtrlSetState($BTNS1, $GUI_DISABLE) $CBcStep3 = GUICtrlCreateButton("Hurray! You're Complete!", 85, 276, 300, 60) GUICtrlSetState($CBcStep3, $GUI_SHOW) ; Below are the button and checkbox enables/disables. GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete($aStep1) Return ; Step 1 Case $CBcStep1 If GUICtrlRead($CBcStep1) = $GUI_CHECKED Then GUICtrlSetState($BTNS1, $GUI_ENABLE) GUICtrlSetState($CBcStep2, $GUI_ENABLE) Else GUICtrlSetState($BTNS1, $GUI_DISABLE) GUICtrlSetState($CBcStep2, $GUI_DISABLE) EndIf ; Step 2 Case $CBcStep2 If GUICtrlRead($CBcStep2) = $GUI_CHECKED Then GUICtrlSetState($BTNS2, $GUI_ENABLE) GUICtrlSetState($CBcStep3, $GUI_ENABLE) Else GUICtrlSetState($BTNS2, $GUI_DISABLE) GUICtrlSetState($CBcStep3, $GUI_DISABLE) EndIf Case $CBcStep3 If GUICtrlRead($CBcStep2) = $GUI_CHECKED Then GUICtrlSetState($BTNS10, $GUI_ENABLE) GUICtrlSetState($CBcStep3, $GUI_SHOW) Else GUICtrlSetState($CBcStep3, $GUI_EVENT_CLOSE) EndIf Case $GUI_EVENT_CLOSE, $CBcStep3 #comments-end Exit EndSwitch WEnd EndFunc
  16. Hi everyone, Is there a way to determine whether the script that is running, is already running, without using; If WinExists ? Or is there a way to use "If WinExists" to determine the script itself? The reason I am asking this is because if I want someone to run the .Exe I have and they rename it to whatever they want, how could I then determine in the script to check if there's already an .Exe open, or the script itself is already open? Should I use Class, or how do I achieve this? Thanks in advance.
  17. Id like to build a little helpertool for my boss in office but i dont know how to sart it. thats no complicated task. im working for an insurancecenter and have to search the customers in different orders and different tags. due to my boss is old and not really commen with pc he saves the customers without system. eg, customer andreas statham got an insurenca for his car then i got to search for andreas statham car, andreas car statham, car andreas statham, statham andreas car, statham car andreas, car statham andreass etc to find all the files from this customer in the harddrive. some customers also are fmiliarnamed in one file like andreas statam and monika rog are married an both got a carinsurance then i got to earch for andreas statham monika rog car, andreas statham monika car rog,.... this can take real long to find the right customer if i do it from hand. how can i realise this someone in here got an excamlple script or has any sugestion?
  18. Ok so im using this program. clarify for school. I would like to have a program that takes every word i type in microsoft word and searches on it in claryfi. is this possible. I would like to have the program not stopping me from typing more after that word. Like when i type a word it auto search it on clarify without making me stop typing and if i want to change i can do that and if im fine that word i can just keep typing and it will search after the next word.
  19. Is this possible to make program works like in diagram? There is so much encryption methods and UDFs are they give security? If the $Address will be crypted with some encryption algorithm could be possible to get the value of $Address in easy way? Of course We know its easy too look into autoit code and get value of variable and so We dont want to anyone see $Address value - there are functions Could func1.au3, func2.au3.. be for example func1.php or other type of file? As we know .php files are unnable to see. For example func1 would be read by FileRead() and then Execute() Is this generally possible to do? Will it give secure? What do you think about? Maybe there is something wrong in this concept or missed.
  20. I need to open an application and send it keys in Session 0. I have exe's working locally, I can see the application open in session 0 through interactive services, but my send commands do not go to the application. The following article running-autoit-session-0, directs me to use ControlSend() however my application has no controls that can be identified by AutoIt v3 Window Info. Get All Windows Controls also returned nothing for the application's handle. What are my options? Can this be done with AutoIt? Is there a different "relatively simple" library/tool to use? (I am familiar with C# if there is a viable library there )
  21. Hey all, Has anyone created any queries for youtube? I was thinking it might be something like this but can't quite figure it out: $oIE = _IECreateEmbedded() _IENavigate($oIE,"") Local $oForms = _IETagNameGetCollection($oIE, "form") Local $sTxt = "" For $oForm In $oForms If $ = "masthead-search" Then $oInputs = _IETagNameGetCollection($oIE, "input") For $oInput In $oInputs If $ = "masthead-search-term" Then _IEFormElementSetValue($oInput, "cards") _IEFormSubmit($oForm) EndIf Next EndIf Next
  22. #RequireAdmin #include <SendMessage.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <WinAPIGdi.au3> #include <Array.au3> #include <WinAPIDiag.au3> $Imglocation = @ScriptDir&"\Image\testimg.bmp" _GDIPlus_Startup() Local $Bitmap = _GDIPlus_BitmapCreateFromFile($Imglocation) Local $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($Bitmap) Local $imgSize = _WinAPI_GetBitmapDimension($hBitmap) Local $imgBits = DllStructCreate('dword[' & ($imgSize.X * $imgSize.Y) & ']') _WinAPI_GetBitmapBits($hBitmap, DllStructGetSize($imgBits), DllStructGetPtr($imgBits)) _WinAPI_DisplayStruct($imgBits) MsgBox(0, "", DllStructGetData($imgBits, 1, 1)) _GDIPlus_Shutdown() DllstructGetData can't get data color B, G, R value. Who's know that? teach me plz
  23. hello please i need to link a progress bar with a time can you help me? e.g i want to set a progress bar for 10 sec am waiting for your answers thank you.
  24. $Imglocation = @ScriptDir&"\Image\testimg.bmp" _GDIPlus_Startup() Local $Bitmap = _GDIPlus_BitmapCreateFromFile($Imglocation) Local $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($Bitmap) Local $imgSize = _WinAPI_GetBitmapDimension($hBitmap) Local $imgBits = DllStructCreate('dword[' & (DllStructGetData($imgSize, 'X') * DllStructGetData($imgSize, 'Y')) & ']') _WinAPI_GetBitmapBits($hBitmap, DllStructGetSize($imgBits), DllStructGetPtr($imgBits)) ;_WinAPI_DisplayStruct($imgBits) MsgBox(0, "", DllStructGetData($imgBits, 1, 1)) _GDIPlus_Shutdown()
  25. Hello how can I send a {Enter} into the edit window ($cmd)? I tried it first with: GUICtrlSetData($cmd, "Line 1" + "{ENTER}") but it doesn´t work. Can someone help me please? #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> $Admin = GUICreate("Admin", 234, 168, 192, 229, $GUI_SS_DEFAULT_GUI, BitOR($WS_EX_OVERLAPPEDWINDOW,$WS_EX_TRANSPARENT,$WS_EX_WINDOWEDGE)) GUISetBkColor(0xB4B4B4) $exit = GUICtrlCreateButton("Close", 160, 136, 65, 25) $cmd = GUICtrlCreateEdit("",0, 0, 225, 137, $ES_AUTOVSCROLL + $WS_VSCROLL) GUICtrlSetData(-1, "") GUICtrlSetFont(-1, 10, 400, 0, "Candara") GUICtrlSetBkColor(-1, 0xE3E3E3) $cmd_clear = GUICtrlCreateButton("Clear", 9, 136, 65, 25) GUISetState(@SW_SHOW) HotKeySet("{f1}", CMD_1) HotKeySet("{f2}", CMD_2) While 1 $msg = GUIGetMsg(1) Switch $msg[0] Case $GUI_EVENT_CLOSE Exit Case $exit GUIDelete($Admin) Exit EndSwitch WEnd Func CMD_1(); GUICtrlSetData($cmd, "Line 1" & "{ENTER}") GUICtrlSetData($cmd, "Line 2" & "{ENTER}") EndFunc Func CMD_2(); GUICtrlSetData($cmd, "Line 3" & "{ENTER}") GUICtrlSetData($cmd, "Line 4" & "{ENTER}") EndFunc