/ Forums / Advansys Formativ / Creating Solutions with Formativ / Even on Groupwise startup

  • Creator
    Topic
  • #3961
    Anonymous

      I have setup a popup box which contains “do not use GroupWise unless you are an authorised user”

      What I would like it to do is just to have it popup once a day in the client and not everytime the client starts up.

      Is this possible ?

      Thanks

      Becky

    • Author
      Replies
    • #6719
      Support 2
      Moderator

        Yes, it is possible. The code below will display a message box once a day in the client. We also have a free applet available on GroupWise Cool Solutions, Conditions of Use, which can be configured to display the pop-up terms on a daily, weekly, monthly basis etc.. As with all current applets on GroupWise Cool Solutions, The ‘Conditions of Use’ installer includes the source code.

        ‘——————————————————————————-
        ‘ This sample applet pop-up a message box once a day in the GroupWise client.

        ‘ INTEGRATION: GroupWise start-up
        ‘——————————————————————————-

        const IDS_CAPTION = “Formativ Business Solutions”
        const IDS_TEXT = “Do not use GroupWise unless you are an authorised user”

        '-------------------------------------------------------------------------------
        ' Main-Line processing
        '-------------------------------------------------------------------------------
        Sub Main(Client, GWEvent)
          
          dim iFSO
          dim iFilePath
          dim iDateStamp
          
            
          set iFSO = Utilities.FileSystem
          
          iFilePath = Utilities.GetDataDirectory & "Startup_Log.txt"
          
          
          ' Start-up log file not exists, We display the text, create the file and save the
          ' today's date.
          if not iFSO.FileExists(iFilePath) then
            call msgbox (IDS_TEXT, vbExclamation, IDS_CAPTION)
            call Utilities.SaveStringToFile(Utilities.DateToISO(Date), iFilePath, TRUE)
            exit sub
          end if
          
          
          ' We read the date-stamp from the file. 
          iDateStamp = trim(Utilities.LoadStringFromFile(iFilePath)) 
          if (len(iDateStamp) > 0) then
            iDateStamp = Utilities.ISOToDate(iDateStamp)
          end if
          
          
          ' We are in the same date but different session (date difference is 0) then we will 
          ' not display the text.
          if (DateDiff("d", date, iDateStamp) = 0) then
            exit sub
          end if
         
          
          ' If we are in different date the display the text and update the date-stamp.      
          call msgbox (IDS_TEXT, vbExclamation, IDS_CAPTION)
          call Utilities.SaveStringToFile(Utilities.DateToISO(Date), iFilePath, TRUE)
          
          set iFSO = nothing
          
        End Sub
        

        Regards,

        Advansys Support

      Viewing 1 replies (of 1 total)
      • You must be logged in to reply to this topic.