home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2001 November / VPR0111A.ISO / HSTRAIAL / MSHagaki / MM3.Cab / F96810_mshsnavi.vs.4722E93C_9B97_42FF_8575_C46D868BB8C1 < prev    next >
Text File  |  2001-07-06  |  4KB  |  105 lines

  1. // mshsnavi.vs
  2. // はがきスタジオナビのVBScriptファイル
  3. //                                        2000,03,13
  4. //                                update    2001.07.03
  5. //
  6.  
  7.  
  8.  
  9. // *****************************************************************************************************
  10. // 指定された識別名で Cookie に値を保存する
  11. Sub SetHsCookieVariable( strVariableName, varVariableValue )
  12.     Document.Cookie = strVariableName & "=" & varVariableValue
  13. End Sub
  14.  
  15. // 保存されている Cookie の抽出
  16. Function ReadHsCookieVariable( strVariableName )
  17.     Dim intLocation
  18.     Dim intNameLength
  19.     Dim intValueLength
  20.     Dim intNextSemicolon
  21.     Dim strTemp
  22.     Dim tempValue
  23.  
  24.     intNameLength = Len( strVariableName )
  25.     intLocation = Instr( Document.Cookie, strVariableName ) 
  26.  
  27.     If intLocation = 0 Then
  28.         ReadHsCookieVariable = NOT_FOUND
  29.         tempValue = NOT_FOUND
  30.     Else
  31.         strTemp = Right( Document.Cookie, Len( Document.Cookie ) - intLocation + 1 )
  32.         If Mid(strTemp, intNameLength + 1, 1) <> "=" Then
  33.             ReadHsCookieVariable = NOT_FOUND
  34.             tempValue = NOT_FOUND
  35.         Else
  36.             intNextSemicolon = Instr( strTemp, ";" )
  37.             If intNextSemicolon = 0 Then
  38.                 intNextSemicolon = Len( strTemp ) + 1
  39.             End If
  40.             If intNextSemicolon = (intNameLength + 2) Then
  41.                 ReadHsCookieVariable = ""
  42.                 tempValue = ""
  43.             Else
  44.                 intValueLength = intNextSemicolon - intNameLength - 2
  45.                 ReadHsCookieVariable = Mid( strTemp, intNameLength + 2, intValueLength )
  46.                 tempValue = Mid( strTemp, intNameLength + 2, intValueLength )
  47.             End If
  48.         End If
  49.     End if
  50. End Function
  51.  
  52.  
  53.  
  54. Function direct_set_curcategory( categoryindex )
  55.     Call parent.window.external.set_curcategory( categoryindex )
  56. End Function
  57.  
  58. Function direct_set_address_book_mode( id )
  59.     Call parent.window.external.set_curmodelid( id )
  60. End Function
  61.  
  62. Function address_book_finish( id )
  63.     Call direct_set_curcategory( "AddressBook" )
  64.     Call direct_set_address_book_mode( id )
  65.     Call navi_finish()
  66. End Function
  67.  
  68. Sub SetExternalGlobalData()
  69.     Dim tmpValue
  70.     tmpValue = ReadHsCookieVariable( "GlobalData_szCategory_value" )
  71.     Call parent.window.external.set_curcategory( CStr(tmpValue) )
  72.     tmpValue = ReadHsCookieVariable( "GlobalData_szTypeName_value" )
  73.     Call parent.window.external.set_curtypename( CStr(tmpValue) )
  74.     tmpValue = ReadHsCookieVariable( "GlobalData_nAttribute_value" )
  75.     Call parent.window.external.set_curattribute( CInt(tmpValue) )
  76.     tmpValue = ReadHsCookieVariable( "GlobalData_szFileName_value" )
  77.     Call parent.window.external.push_filename( CStr(tmpValue) )
  78.     tmpValue = ReadHsCookieVariable( "GlobalData_szDesignFileName_value" )
  79.     Call parent.window.external.set_curfilename( CStr(tmpValue) )
  80.     tmpValue = ReadHsCookieVariable( "GlobalData_bVertical_value" )
  81.     Call parent.window.external.set_curvertical( CInt(tmpValue) )
  82.     tmpValue = ReadHsCookieVariable( "GlobalData_check_barcode_checked" )
  83.     Call parent.window.external.set_curbarcode( CBool(tmpValue<>"false") )
  84.     tmpValue = ReadHsCookieVariable( "GlobalData_szModelName_value" )
  85.     Call parent.window.external.set_curmodelname( CStr(tmpValue) )
  86.     tmpValue = ReadHsCookieVariable( "GlobalData_szDesignTextName_value" )
  87.     Call parent.window.external.set_curdesignname( CStr(tmpValue) )
  88. End Sub
  89.  
  90. Function setExternalLabelData()
  91.     Call SetExternalGlobalData()
  92. End Function
  93.  
  94. Function setExternalData()
  95.     Dim tmpValue
  96.     tmpValue = ReadHsCookieVariable( "GlobalData_nModelID_value" )
  97.     parent.window.external.set_curmodelid( CInt(tmpValue) )
  98.  
  99.     Call SetExternalGlobalData()
  100. End Function
  101.  
  102. Function navi_finish()
  103.     Call parent.window.external.navi_finish()
  104. End Function
  105.