conkel Posted February 26, 2013 Share Posted February 26, 2013 Hello everyone,I am new with AutoIt and I am thinking to write in a small field (I couldnt attach my picture here to show where).I have been trying following code:Version I: (apan.dat - is my text what I want to write)WinActivate("Eigenschaften Ausgabedatei", "")ControlSetText("Eigenschaften Ausgabedatei", "", "[REGEXPCLASS:WindowsForms10.EDIT.app.0.]", "apan.dat")Version II:WinWait("[CLASS:WindowsForms10.window.8.app.0.33c0d9d]", "", 5)ControlSetText("Eigenschaften Ausgabedatei", "", "[REGEXPCLASS:WindowsForms10.EDIT.app.0.]", "apan.dat")Version III:;startOpt("WinTitleMatchMode", 2) ; 2 = Match any substring in the titleWinActivate("Eigenschaften Ausgabedatei", "")Opt("MouseCoordMode", 2) ; 2 = relative coords to the client area of the active windowMouseClick("left", 90 + 324/2, 74 + 20/2, 2, 0)send("apan.dat");endeCould somebody help me pleaseThank youConkel Link to comment Share on other sites More sharing options...
jdelaney Posted February 26, 2013 Share Posted February 26, 2013 (edited) where is the fail point? $hwin = WinWait("[CLASS:WindowsForms10.window.8.app.0.33c0d9d]", "", 5) If IsHWnd($hwin) Then $bContinue = True ConsoleWrite("Able to find window" & @CRLF) Else $bContinue = False ConsoleWrite("UNAble to find window" & @CRLF) EndIf If $bContinue Then $hControl = ControlGetHandle($hwin, "", "[REGEXPCLASS:WindowsForms10\.EDIT\.app\.0\.]") If IsHWnd($hControl) Then ConsoleWrite("Able to find control" & @CRLF) Else $bContinue = False ConsoleWrite("UNAble to find control" & @CRLF) EndIf EndIf If $bContinue Then If ControlSetText ($hwin, "", $hControl, "apan.dat") Then ConsoleWrite("Able to set text" & @CRLF) Else ConsoleWrite("UNAble to set text" & @CRLF) EndIf EndIf also need the window info tool output, to validate your data Edited February 26, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 26, 2013 Developers Share Posted February 26, 2013 Do you mean that you want to write the text that is inside of the file apan.dat, so read that file and send that to the Edit field? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
conkel Posted February 27, 2013 Author Share Posted February 27, 2013 Thank your for your replay. I have a screen shot but I dont know how to post it in this forum....cause without the picture I think it will be difficult understand my code issue Could somebody tell me how I could post it here? Thanks Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 27, 2013 Moderators Share Posted February 27, 2013 conkel,When replying, select the "Full Editor/Attachments" button at bottom-right of the reply field. That will take you to a different editing screen where you can attach files to your post. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
conkel Posted February 27, 2013 Author Share Posted February 27, 2013 Melba23: This is what I have been doing.... - I have a button called: "My media" and I have empty window and tell the truth I dont know how to upload the pic here, cause I dont get the browser to select my file Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 27, 2013 Moderators Share Posted February 27, 2013 conkel,You should see an "Attach files" section at the bottom of the "Full Editor" screen which allows you to browse for a file and then attach it. Can you see it? If not, then it might be limited to a minimum post count (usually 5 for most basic options) so just keep posting and we will get you there in no time. I have changed your forum status to lift the initial 5 post limit so that is no longer a concern. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
conkel Posted February 27, 2013 Author Share Posted February 27, 2013 OK Melba23: I got a new thing and it calls: "Attach Files" - Thanks a lot!! So back to the topic: I am attaching the picture and I hope somebody could help me Link to comment Share on other sites More sharing options...
conkel Posted February 27, 2013 Author Share Posted February 27, 2013 where is the fail point? $hwin = WinWait("[CLASS:WindowsForms10.window.8.app.0.33c0d9d]", "", 5) If IsHWnd($hwin) Then $bContinue = True ConsoleWrite("Able to find window" & @CRLF) Else $bContinue = False ConsoleWrite("UNAble to find window" & @CRLF) EndIf If $bContinue Then $hControl = ControlGetHandle($hwin, "", "[REGEXPCLASS:WindowsForms10\.EDIT\.app\.0\.]") If IsHWnd($hControl) Then ConsoleWrite("Able to find control" & @CRLF) Else $bContinue = False ConsoleWrite("UNAble to find control" & @CRLF) EndIf EndIf If $bContinue Then If ControlSetText ($hwin, "", $hControl, "apan.dat") Then ConsoleWrite("Able to set text" & @CRLF) Else ConsoleWrite("UNAble to set text" & @CRLF) EndIf EndIf also need the window info tool output, to validate your data Thank you for your respond I used your code, and it wrote: "UNAble to find window" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now