Jump to content

Tooltip writes multiple lines


furrycow
 Share

Recommended Posts

Hey you guys, the situation goes like this...i have words (0-49), and i want them to display in a tooltip one underneath another like this....

0=worda

1=wordb

2=wordc

..etc..etc

Ive got the basic code ive done so far under this, however altho this goes through everyword and displays everyword, it does it all within a second and only the last terms shows as it keeps writing it on the same line...is there anyway i can do this without writing: $funcwordcount=$funcwordcount+1, $funcwordcount=$funcwordcount+2 etc etc, you get the gist. Thank you very much in advance!

Func wordlist()

$z=0

$funcwordcount=0

While $z<50

$funcwordlist=IniRead("search.ini","searchterms", $funcwordcount, "Error")

Tooltip("Current Wordlist:" & @CRLF & "" & $funcwordlist & "", 0, 0, "Wordlist")

$funcwordcount=$funcwordcount+1

$z=$z+1

WEnd

Sleep(3000)

EndFunc

Instant Lockerz Invite - www.instantlockerzinvite.co.uk
Link to comment
Share on other sites

Hey you guys, the situation goes like this...i have words (0-49), and i want them to display in a tooltip one underneath another like this....

0=worda

1=wordb

2=wordc

..etc..etc

Ive got the basic code ive done so far under this, however altho this goes through everyword and displays everyword, it does it all within a second and only the last terms shows as it keeps writing it on the same line...is there anyway i can do this without writing: $funcwordcount=$funcwordcount+1, $funcwordcount=$funcwordcount+2 etc etc, you get the gist. Thank you very much in advance!

Func wordlist()

$z=0

$funcwordcount=0

While $z<50

$funcwordlist=IniRead("search.ini","searchterms", $funcwordcount, "Error")

Tooltip("Current Wordlist:" & @CRLF & "" & $funcwordlist & "", 0, 0, "Wordlist")

$funcwordcount=$funcwordcount+1

$z=$z+1

WEnd

Sleep(3000)

EndFunc

Look at For Next loops in the AutoIt help.

For $I = 1 To 5

    MsgBox(0, "", $I)
    
Next

:)

Link to comment
Share on other sites

Look at For Next loops in the AutoIt help.

For $I = 1 To 5

    MsgBox(0, "", $I)
    
Next

:)

Thanks szhlopp, but the for loop is going to be doing the same thing as my $z=$z+1 surely? also its a tooltip rather than a message box, so has a habit of refreshing itself as soon as a new bit of data is put into it..have you any more ideas please?
Instant Lockerz Invite - www.instantlockerzinvite.co.uk
Link to comment
Share on other sites

..have you any more ideas please?

Thanks szhlopp, but the for loop is going to be doing the same thing as my $z=$z+1 surely?

Yep. Everytime the For/Next loop does a 'loop' it increases that first variable by(Default) 1.

also its a tooltip rather than a message box, so has a habit of refreshing itself as soon as a new bit of data is put into it

Example:

For $Z = 1 To 5
    
    ToolTip("Current Z value is: " & $Z)
    Sleep(1000)
    
Next

Make sense?

Link to comment
Share on other sites

Thanks szhlopp, but the for loop is going to be doing the same thing as my $z=$z+1 surely?

Yep. Everytime the For/Next loop does a 'loop' it increases that first variable by(Default) 1.

also its a tooltip rather than a message box, so has a habit of refreshing itself as soon as a new bit of data is put into it

Example:

For $Z = 1 To 5
    
    ToolTip("Current Z value is: " & $Z)
    Sleep(1000)
    
Next

Make sense?

But wont this just show one line that refreshes every second??

I need it to list them all after one another like...

0=worda

1=wordb

2=wordc

..etc..etc

just in one tooltip window, i want all 50 words listed in one list that shows them all at the same time one after another?

Thanks

Instant Lockerz Invite - www.instantlockerzinvite.co.uk
Link to comment
Share on other sites

Maybe something like this

Func wordlist()
    $z = 0
    $funcwordcount = 0
    $txt = "Current Wordlist:" & @CRLF
    While $z < 50
        $funcwordlist = IniRead(@ScriptDir & "\search.ini", "searchterms", $funcwordcount, "Error")
        $txt &= $z & "=" & $funcwordlist & @CRLF
        $funcwordcount += 1
        $z += 1
    WEnd
    ToolTip($txt, 0, 0, "Wordlist")
    Sleep(3000)
EndFunc  ;==>wordlist

Link to comment
Share on other sites

Maybe something like this

Func wordlist()
    $z = 0
    $funcwordcount = 0
    $txt = "Current Wordlist:" & @CRLF
    While $z < 50
        $funcwordlist = IniRead(@ScriptDir & "\search.ini", "searchterms", $funcwordcount, "Error")
        $txt &= $z & "=" & $funcwordlist & @CRLF
        $funcwordcount += 1
        $z += 1
    WEnd
    ToolTip($txt, 0, 0, "Wordlist")
    Sleep(3000)
EndFunc ;==>wordlist
What a legend! That works perfectly, thank you ever so much!! :)
Instant Lockerz Invite - www.instantlockerzinvite.co.uk
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...