Zum Hauptinhalt gehen

Suche

Suche

Vb Script Cambiare Testo In Base A L'ora

Kommentare

3 Kommentare

  • Avatar
    Legacy Poster
    Well, it will easily work if you use a time format without colons or other text in it. For example, the 24 hour format that just comes in as "172315" rather than "17:23:15".

    You could use this value to run a comparison in the text object, and print the text you need.
    0
  • Avatar
    Legacy Poster
    [quote name='nRyder' timestamp='1329168243' post='1720']
    Well, it will easily work if you use a time format without colons or other text in it. For example, the 24 hour format that just comes in as "172315" rather than "17:23:15".

    You could use this value to run a comparison in the text object, and print the text you need.
    [/quote]
    Thanks for the reply, but I know well the program could put some sample image or a textual step by step tutorial on what to do .... thanks
    0
  • Avatar
    Shotaro Ito
    Hi,
    Using TimeValue function would help compare time.
    Create a text with time datasource ("13:00" or "6:00 PM" etc.)
    On Datasource's More options > VB Script, edit "OnProcessData" script like below.
    [code]
    T = TimeValue(Value)
    if T >= TimeValue("08:00") and T <= TimeValue("13:00") Then
    Value = "Lunch"
    Elseif T >= TimeValue("13:01") and T <= TimeValue("18:00") Then
    Value = "Dinner"
    Else
    Value = "No food for ya"
    End if
    [/code]
    Hope that helps!
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.