Jump to content

Write in a field


conkel
 Share

Recommended Posts

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:

;start

Opt("WinTitleMatchMode", 2) ; 2 = Match any substring in the title

WinActivate("Eigenschaften Ausgabedatei", "")

Opt("MouseCoordMode", 2) ; 2 = relative coords to the client area of the active window

MouseClick("left", 90 + 324/2, 74 + 20/2, 2, 0)

send("apan.dat")

;ende

Could somebody help me please

Thank you

Conkel

Link to comment
Share on other sites

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 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

  • Developers

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

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

  • Moderators

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

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 comment
Share on other sites

  • Moderators

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? :huh:

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

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 comment
Share on other sites

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...