Jump to content

How can my skript read a "line break"?


Recommended Posts

My skript has a problem with this line. The part [text] includes a line break. If I finish after "...bereits.", the window wouldn´t be found and if I write it this way:

$ee = WinWait ("Datei speichern","name.txt besteht bereits.|Möchten Sie sie ersetzen?",5)

I get an error message from AutoIt because ")" is missing after "...bereits."

I have already tried it with @CR, @CRLF and@LF.

Does anybody know how to do it?

Link to comment
Share on other sites

My skript has a problem with this line. The part [text] includes a line break. If I finish after "...bereits.", the window wouldn´t be found and if I write it this way:

$ee = WinWait ("Datei speichern","name.txt besteht bereits.|Möchten Sie sie ersetzen?",5)

I get an error message from AutoIt because ")" is missing after "...bereits."

I have already tried it with @CR, @CRLF and@LF.

Does anybody know how to do it?

<{POST_SNAPBACK}>

Try changing the title match mode to something other than an exact string match (default).

Mode 2 allows partial string matching.

Opt("WinTitleMatchMode",2)

$ee = WinWait ("Datei speichern","Möchten Sie sie ersetzen?",5)

The other option is to use classnames and get the window handle.

Mode 4 is advanced.

Opt("WinTitleMatchMode",4)

If WinWait ("classname=<classtext here>","Möchten Sie sie ersetzen?",5)=1 then
   $hwnd_ee = WinGetHandle("classname=<classtext here>","Möchten Sie sie ersetzen?")
Else
  ; tun Sie etwas, wenn die Aufwartung des Fensters ausfällt.
EndIf
Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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