Jump to content

SplashTextOn returns handle for use with ControlSetText?


martin
 Share

Recommended Posts

The help refers to 'Static1' as the id for SplashTextOn. I know this works but why is it Static1?

The handle returned form SplashTextOn can be used by ControlSetText acording to the help file but I can't see how to do this.

The example below shows how my attempt to use the handle fails.

Can someone tell me what I'm doing wrong.

;use 'Static1'
Dim $Ff[4] = ["one","two","three","four"]
$spt = SplashTextOn("Try splashing",'',400,150)
sleep(2000)
$ms = ''
for $n = 0 to 3
    $ms = $ms & $Ff[$n] & @LF
    ControlSetText("Try splashing",'','Static1',$ms)
    sleep(2000)
Next
sleep(300)
SplashOff()

;use control ID

msgbox(0,'Now same again ..','.. but use the control id')


Dim $Ff[4] = ["one","two","threee","four"]
$spt = SplashTextOn("Try splashing",'',400,150)
sleep(2000)
$ms = ''
for $n = 0 to 3
    $ms = $ms & $Ff[$n] & @LF
    ControlSetText("Try splashing",'',$spt,$ms)
    sleep(2000)
Next
sleep(300)
SplashOff()
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

Use the handle returned by SplashTextOn for the title parameter in ControlSetText.

;use 'Static1'
Dim $Ff[4] = ["one","two","three","four"]
$spt = SplashTextOn("Try splashing",'',400,150)
sleep(2000)
$ms = ''
for $n = 0 to 3
    $ms = $ms & $Ff[$n] & @LF
    ControlSetText("Try splashing",'','Static1',$ms)
    sleep(1000)
Next
sleep(300)
SplashOff()

;use control ID

msgbox(0,'Now same again ..','.. but use the control id')


Dim $Ff[4] = ["one","two","three","four"]
$spt = SplashTextOn("Try splashing",'',400,150)
sleep(2000)
$ms = ''
for $n = 0 to 3
    $ms = $ms & $Ff[$n] & @LF
    ControlSetText($spt, '', 'Static1', $ms)
    sleep(1000)
Next
sleep(300)
SplashOff()

:P

Link to comment
Share on other sites

Use the handle returned by SplashTextOn for the title parameter in ControlSetText.

;use 'Static1'
Dim $Ff[4] = ["one","two","three","four"]
$spt = SplashTextOn("Try splashing",'',400,150)
sleep(2000)
$ms = ''
for $n = 0 to 3
    $ms = $ms & $Ff[$n] & @LF
    ControlSetText("Try splashing",'','Static1',$ms)
    sleep(1000)
Next
sleep(300)
SplashOff()

;use control ID

msgbox(0,'Now same again ..','.. but use the control id')
Dim $Ff[4] = ["one","two","three","four"]
$spt = SplashTextOn("Try splashing",'',400,150)
sleep(2000)
$ms = ''
for $n = 0 to 3
    $ms = $ms & $Ff[$n] & @LF
    ControlSetText($spt, '', 'Static1', $ms)
    sleep(1000)
Next
sleep(300)
SplashOff()

:P

Ah, I see.

Thank you MHz

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

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