Page 1 of 1
Schedule Task problem
Posted: Tue Jul 11, 2006 9:32 am
by Tinus
Hi Michael,
I localised my setup and update dialogs and detected that Schedule Task is no longer working because
the command uses English names for the days and seems to have problems with 24 hour formats.
What can I do?
Posted: Tue Jul 11, 2006 9:41 am
by MichaelNesmith
You have to pass English names for this command, or use hard-coded values.
Posted: Tue Jul 11, 2006 9:46 am
by Tinus
This makes the localisation of the update_schedule dialog a little bit difficult!
Can you please add a fature request to enhance this command to 24 hour support?
Now I will try to remap my localised values.

Posted: Tue Jul 11, 2006 11:34 am
by Tinus
Ok, here it goes.
I created two small scripts (I really like this feature).
The first one decodes a 24h format into 12h AM/PM format:
Code: Select all
Comment: Decode 24 hour format to 12 hour AM/PM format
Comment: We assume a whole number for the clock and do not handle minutes here
Set Variable IS24H to FALSE
Parse String $UPDATE_TIME$ into Variables HOUR and (Split at first occurrence of pattern)
if Variable HOUR Greater Than 12
Set Variable IS24H to TRUE
else
if Variable UPDATE_TIME not Contains (Ignore Case) AM
if Variable UPDATE_TIME not Contains (Ignore Case) PM
Set Variable IS24H to TRUE
end
end
end
Comment: We have a 24h format, decode it
if Variable IS24H Equals TRUE
if Variable HOUR Greater Than 12
UPDATE_TIME = $HOUR$ - 12
Set Variable UPDATE_TIME to $UPDATE_TIME$:00 PM
else
if Variable HOUR Equals 12
Set Variable UPDATE_TIME to 12:00 PM
else
if Variable HOUR Equals 0
Set Variable UPDATE_TIME to 12:00 AM
else
Set Variable UPDATE_TIME to $UPDATE_TIME$ AM
end
end
end
end
File Attached:
decode24h.mia
Posted: Tue Jul 11, 2006 11:37 am
by Tinus
The second one decodes localised day names back into English.
Code: Select all
Comment: Decode day names for scheduler if non English setups is used
if Variable LANGUAGE not Equals English
Comment: *** German ***
if Variable LANGUAGE Equals German
if Variable UPDATE_DATE Contains (Ignore Case) Sonntag
Set Variable UPDATE_DATE to Sundays
else
if Variable UPDATE_DATE Contains (Ignore Case) Montag
Set Variable UPDATE_DATE to Mondays
else
if Variable UPDATE_DATE Contains (Ignore Case) Dienstag
Set Variable UPDATE_DATE to Tuesdays
else
if Variable UPDATE_DATE Contains (Ignore Case) Mittwoch
Set Variable UPDATE_DATE to Wednesdays
else
if Variable UPDATE_DATE Contains (Ignore Case) Donnerstag
Set Variable UPDATE_DATE to Thursdays
else
if Variable UPDATE_DATE Contains (Ignore Case) Freitag
Set Variable UPDATE_DATE to Fridays
else
if Variable UPDATE_DATE Contains (Ignore Case) Samstag
Set Variable UPDATE_DATE to Saturdays
else
Set Variable UPDATE_DATE to Every day
end
end
end
end
end
end
end
end
Comment: *** more languages here ***
end
File Attached:
decodeDays.mia