Jump to content
Sign in to follow this  
volvox

How can my skript read a "line break"?

Recommended Posts

volvox

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?

Share this post


Link to post
Share on other sites
Blue_Drache

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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.