Jump to content

@CR on window text


johond
 Share

Recommended Posts

Hi I have a @CR on a window text so that the WinWaitActive("blah","text" & @CR & "next line") does'nt work... where's my error ?

<{POST_SNAPBACK}>

Try doing WinWaitActive then use Send


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Try doing WinWaitActive then use Send

<{POST_SNAPBACK}>

?

sorry I dont'understand.. if I use winwaitactive alone it works, but i need to put multiline text as argument... and I'm using send after winwaitactive.. but neither @LF or @CR work..

the window is the "add printer wizard"..

bye

Link to comment
Share on other sites

?

sorry I dont'understand.. if I use winwaitactive alone it works, but i need to put multiline text as argument... and I'm using send after winwaitactive.. but neither @LF or @CR work..

the window is the "add printer wizard"..

bye

<{POST_SNAPBACK}>

Could you post your code so that we can see what you are trying to do.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Could you post your code so that we can see what you are trying to do.

<{POST_SNAPBACK}>

run("control printers")
WinWaitActive("Stampanti e fax")
Send("!fa")
WinWaitActive("Installazione guidata stampante","Installazione guidata stampante" & @LF & "Questa procedura guidata permette di installare una stampante o di stabilire connessioni con stampanti in rete.")
Send("!A")
Exit

The italian text is a copy/paste from "window info".

Link to comment
Share on other sites

Two lines from AutoIt Window Info generally signify text from two separate controls. You can't check for the presence of text from two separate controls at once. One of the following lines will likely work for you:

Edit: Clarification that one line should be used and not both.

WinWaitActive("Installazione guidata stampante", "Installazione guidata stampante")
; -- OR --
WinWaitActive("Installazione guidata stampante", "Questa procedura guidata permette di installare una stampante o di stabilire connessioni con stampanti in rete.")
Edited by LxP
Link to comment
Share on other sites

Hi I have a @CR on a window text so that the WinWaitActive("blah","text" & @CR & "next line") does'nt work... where's my error ?

<{POST_SNAPBACK}>

AutoIt just check only one "text" value. No possibility to test at the same time 2 of them. :">

perhaps in your case the trick of @LxP works if you are for sure of the order they can appear with 2 WinWaitActive.

Link to comment
Share on other sites

AutoIt just check only one "text" value. No possibility to test at the same time 2 of them. :">

perhaps  in your case the trick of @LxP works if you are for sure of the order they can appear with 2 WinWaitActive.

<{POST_SNAPBACK}>

thx very much, I undestood and now it works.

the last question.. can I cut a long line on serveral on the script? How?

Link to comment
Share on other sites

Could you please clarify your question? Are you referring to a string within a variable or a displayed string within a MsgBox(), or perhaps a displayed string on an AutoIt-built GUI?

Link to comment
Share on other sites

Could you please clarify your question? Are you referring to a string within a variable or a displayed string within a MsgBox(), or perhaps a displayed string on an AutoIt-built GUI?

<{POST_SNAPBACK}>

I mean a string on msgbox()

ex:

msgbox(0,"toooooooooooooooo muuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuch looooooooooooooooooooooooong lineeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee")

For exemple on unix I can cut the lines with \

an example could be:

msgbox(0,"loooooooooo \

oooooooooooooooo \

ooooooooooo lin \

e ")

thx very much.

Link to comment
Share on other sites

MsgBox(0,"test", "this is a lonnnnnnnnnnnnnnnnnnnng" & _
" lineeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" & _
" anymore questions????????????????????????????")

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

MsgBox(0,"test", "this is a lonnnnnnnnnnnnnnnnnnnng" & _
" lineeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" & _
" anymore questions????????????????????????????")

<{POST_SNAPBACK}>

lol :whistle: I'm sorry I'm so much noob, sorry again, no more questions :-D

thx :-)

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