Passing the workspace as a parameter: Difference between revisions

Line 50: Line 50:
          
          
         cmdline sCompanyFolder // get a parameter from the command line!
         cmdline sCompanyFolder // get a parameter from the command line!
        //
         If (sCompanyFolder="") Move "TRAINING" to scompanyfolder //default to traing db if execeuted without param
         If (sCompanyFolder="") Move "TRAINING" to scompanyfolder //default to traing db if execeuted without param
         move (uppercase(sCompanyFolder)) to sCompanyFolder
         move (uppercase(sCompanyFolder)) to sCompanyFolder
          
          
        //
         Send DoOpenWorkspace (sCompanyFolder -".mApps121") //CURRENT$WORKSPACE
         Send DoOpenWorkspace (sCompanyFolder -".mApps121") //CURRENT$WORKSPACE
        //
         Get_Attribute DF_OPEN_PATH to sTemp         
         Get_Attribute DF_OPEN_PATH to sTemp         
        //Showln sTemp
 
         //
         //we use a file, REFNUM2, to contain info specific to this company
         Open refnum2
         Open refnum2
         Move (trim(refnumA2("COMPFOLD"))) to sTemp //function to get a param form the correct company control file
         Move (trim(refnumA2("COMPFOLD"))) to sTemp //function to get a param from the company control file
         //
          
         If (sTemp<>sCompanyFolder) Begin
         If (sTemp<>sCompanyFolder) Begin
             Send stop_box ("Company ID mismatch in refnum2 file"  * sCompanyFolder * sTemp) //dont show, it would be a security weakness
             Send stop_box ("Company ID mismatch in refnum2 file"  * sCompanyFolder * sTemp)  
             Abort //showstopper
             Abort //showstopper
         End
         End
         Set psCompanyFolder to sCompanyFolder
         Set psCompanyFolder to sCompanyFolder
          
          
        //colour for visual clues
         Move (trim(refnumA2("COMPCOLR")))  to sTemp
         Move (trim(refnumA2("COMPCOLR")))  to sTemp
         Set psCompanyColour to sTemp
         Set psCompanyColour to sTemp
        Set Color to clYellow
          
          
        //Formal Company Name
         Move (trim(RefNumA2("COMPANY")))    to sTemp
         Move (trim(RefNumA2("COMPANY")))    to sTemp
         Set psCompany  to sTemp
         Set psCompany  to sTemp
          
 
         //and much much more, you get the picture
        //....
 
         Set peHelpType to htHtmlHelp
         Set peHelpType to htHtmlHelp
         //
         //
Anonymous user