Schedule Task problem

Got a problem you cannot solve? Try here.
Tinus
Posts: 207
Joined: Tue Jun 20, 2006 8:42 am
Location: Germany

Schedule Task problem

Postby Tinus » Tue Jul 11, 2006 9:32 am

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?
Martin Rothschink
InstallAware MVP

AxoNet Software GmbH
http://www.axonet.de/products/other-pro ... stallaware

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Jul 11, 2006 9:41 am

You have to pass English names for this command, or use hard-coded values.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Tinus
Posts: 207
Joined: Tue Jun 20, 2006 8:42 am
Location: Germany

Postby Tinus » Tue Jul 11, 2006 9:46 am

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. :cry:
Martin Rothschink
InstallAware MVP

AxoNet Software GmbH
http://www.axonet.de/products/other-pro ... stallaware

Tinus
Posts: 207
Joined: Tue Jun 20, 2006 8:42 am
Location: Germany

Postby Tinus » Tue Jul 11, 2006 11:34 am

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
Martin Rothschink
InstallAware MVP

AxoNet Software GmbH
http://www.axonet.de/products/other-pro ... stallaware

Tinus
Posts: 207
Joined: Tue Jun 20, 2006 8:42 am
Location: Germany

Postby Tinus » Tue Jul 11, 2006 11:37 am

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
Martin Rothschink
InstallAware MVP

AxoNet Software GmbH
http://www.axonet.de/products/other-pro ... stallaware


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 98 guests