Jump to content

SplashTextOn Multi lines


Recommended Posts

hi all,

i wanne use the splashontext on multible lines.

in help its done with:

SplashTextOn("TitleFoo", $message, -1, -1, -1, -1, 4, "")
For $x = 1 to 11
    $message = $message & $x & @LF
    ControlSetText("TitleFoo", "" "Static1", $message)
    sleep(100)
Next

i wanne do it like this:

with getclip() i get a number.

for example 13.

then on line 1 of splashon i wanne get --> age = 13

then i do getclip on a other integer for example 14

then line 2 wil show --> day = 14

etc

grtz

Mike

Link to comment
Share on other sites

hi all,

i wanne use the splashontext on multible lines.

in help its done with:

SplashTextOn("TitleFoo", $message, -1, -1, -1, -1, 4, "")
 For $x = 1 to 11
     $message = $message & $x & @LF
     ControlSetText("TitleFoo", "" "Static1", $message)
     sleep(100)
 Next

i wanne do it like this:

with getclip() i get a number.

for example 13.

then on line 1 of splashon i wanne get --> age = 13

then i do getclip on a other integer for example 14

then line 2 wil show --> day = 14

etc

grtz

Mike

since the example you gave does what you want, (apart from a missing line at the start to declare $message) it's not obvious what you need help with so can you show us what you have tried?
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

  • Moderators

Mike23,

Try something like this (you can Ctrl-C the numerals after the ClipGets):

ClipPut("")
While ClipGet() = ""
    Sleep(100)
WEnd

$var1 = ClipGet()   ; 13

SplashTextOn("Test", "Age = " & $var1)

ClipPut("")
While ClipGet() = ""
    Sleep(100)
WEnd

$var2 = ClipGet()  ; 14

ControlSetText("Test", "", "Static1", "Age = " & $var1 & @CRLF & @CRLF & "Day = " & $var2 )

Sleep(2000)

If you want to have many such lines, you may want to use concatenation to prevent the ControlSetText command becoming too long, and to put the ClipPut() - While...WEnd loop in a separate function.

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

ty mdiesel ^_^ thats what i meant.

now i can do:

$Message2 = ""

MouseClick("left", $age[0], $age[1],2) 
$age = ClipGet();
$Message =  "age = "
$Message2 &= $Message & $age & @LF
SplashTextOn("TitleFoo", $message2, -1, -1, -1, -1, 4, "")

MouseClick("left", $date[0], $date[1],2) 
$date = ClipGet();
$Message =  "date = "
$Message2 &= $Message & $date & @LF
SplashTextOn("TitleFoo", $message2, -1, -1, -1, -1, 4, "")
Link to comment
Share on other sites

no probs mate.

@Martin

$message = "Message"

SplashTextOn("TitleFoo", $message, -1, -1, -1, -1, 4, "")

For $x = 1 to 11

$message = $message & $x & @LF

ControlSetText("TitleFoo", "", "Static1", $message)

sleep(100)

Next

I don't think thats what he wants. His code was pretty dodgy, he missed a comma etc, and its not just a case of declaring a variable

Dim $message[5] = ["Message", "Age", "Day", "Month", "Foo"]
$m = ""
For $x = 0 to 4 Step + 1
     $m &= $message[$x] & " = " & Random (1, 10) & @CRLF
     sleep(100)
Next
$Splash = SplashTextOn("TitleFoo", $m, -1, -1, -1, -1, 4, "")
Sleep (5000)

thats another way if you want it...

@Melba

yours triggers the script on the clipboard contents changing. he wants to use the clipboad to populate the data I think.

following on from that, mike - your better off finding a way that doesnt use the clipoard, as that can cause problems, It gets annoying when you have something you need on the clipboard and it gets removed.

from your script you are using the mouseclick to copy the data you are using. This is also a very inefficient, and unproffessional method. consider trying to get the text from the control (I presume its a form of some kind) using controlgettext etc.

Good luck!

MDiesel

Link to comment
Share on other sites

wel the data is on a website,

have no clue how i can get the data otherwise.

it made like

Age 14

Birthdate 14-03-2000

City New York

when its done with 1 member

it wil go to the next by changing the member id in the adres bar.

and then he does it again.

i looked in to the controlgettext * help

ControlGetText ( "title", "text", controlID )
$var = ControlGetText("[CLASS:Notepad]", "", "Edit1")

extra info:

the url is not always the same. depends on member level. and there are like 40

dunno if you know an easyer way then working with coords. don't understand the ControlGetText ^_^

mike

Link to comment
Share on other sites

kk,

its not a control, so it wont work.

Try WinGetText, and then search for the line with Age on etc... as far as the changing url goes, that can be done too! look at the window functions, they should be enlightening. alternatively look at IE management, that could work.

If you want a really good method, see if you can access the database which the website reads from. I don't know if its possible, but thats the best way to go (even if it is a bit hard...)

I think that works when the window is hidden too, so you can run your entire script in the background.

MDiesel

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