none
Script de Logon RRS feed

  • Pergunta

  • Bom dia a Todos
    Inclui no meu script de logon um msg box
    está perfeito, porém não sei colocar descrição no msgbox que aparece ao usuário
    msgbox "mensagem kkkkkk" o usuário le e coloca ok. isso ja é no final do script
    gostaria de colocar um aviso tipo( Interrogação, Alerta..) e a informaçao a que se refere esse comunicado isso é possível?
    Agradeço atenção
    José Abreu


    terça-feira, 5 de agosto de 2008 13:02

Respostas

  • Jose,


    Entendir utiliza o metodo Popup do object WshShell;



    Popup Method
    See Also
    WshShell Object | Echo Method
    Language
    JScript

    VBScript

    Show All
    Displays text in a pop-up message box.

    intButton = object.Popup(strText,[nSecondsToWait],[strTitle],[nType])
    Arguments
    object
    WshShell object.
    strText
    String value containing the text you want to appear in the pop-up message box.
    nSecondsToWait
    Optional. Numeric value indicating the maximum length of time (in seconds) you want the pop-up message box displayed.
    strTitle
    Optional. String value containing the text you want to appear as the title of the pop-up message box.
    nType
    Optional. Numeric value indicating the type of buttons and icons you want in the pop-up message box. These determine how the message box is used.
    IntButton
    Integer value indicating the number of the button the user clicked to dismiss the message box. This is the value returned by the Popup method.
    Remarks
    The Popup method displays a message box regardless of which host executable file is running (WScript.exe or CScript.exe). If nSecondsToWaitis equals zero (the default), the pop-up message box remains visible until closed by the user. If nSecondsToWaitis is greater than zero, the pop-up message box closes after nSecondsToWait seconds. If you do not supply the argument strTitle, the title of the pop-up message box defaults to "Windows Script Host." The meaning of nType is the same as in the Microsoft Win32® application programming interface MessageBox function. The following tables show the values and their meanings. You can combine values in these tables.

    Note   To display text properly in RTL languages such as Hebrew or Arabic, add hex &h00100000 (decimal 1048576) to the nType parameter.
    Button Types

    Value Description
    0 Show OK button.
    1 Show OK and Cancel buttons.
    2 Show Abort, Retry, and Ignore buttons.
    3 Show Yes, No, and Cancel buttons.
    4 Show Yes and No buttons.
    5 Show Retry and Cancel buttons.

    Icon Types

    Value Description
    16 Show "Stop Mark" icon.
    32 Show "Question Mark" icon.
    48 Show "Exclamation Mark" icon.
    64 Show "Information Mark" icon.

    The previous two tables do not cover all values for nType. For a complete list, see the Microsoft Win32 documentation.

    The return value intButton denotes the number of the button that the user clicked. If the user does not click a button before nSecondsToWait seconds, intButton is set to -1.

    Value Description
    1 OK button
    2 Cancel button
    3 Abort button
    4 Retry button
    5 Ignore button
    6 Yes button
    7 No button

    Example
    The following code generates a simple pop-up window.

    [VBScript]
    Dim WshShell, BtnCode
    Set WshShell = WScript.CreateObject("WScript.Shell")

    BtnCode = WshShell.Popup("Do you feel alright?", 7, "Answer This Question:", 4 + 32)

    Select Case BtnCode
       case 6      WScript.Echo "Glad to hear you feel alright."
       case 7      WScript.Echo "Hope you're feeling better soon."
       case -1     WScript.Echo "Is there anybody out there?"
    End Select

    terça-feira, 5 de agosto de 2008 14:58

Todas as Respostas

  • Code Snippet

    Info = msgbox("Nenhum comprador foi selecionado.",vbExclamation) ' Exibi uma exclamação

     

     

     

    Info= msgbox("Comprador selecionado foi: ", vbInformation) 'Exibi um "i" de informação

     

     

     

     

    Voce pode brincar com essas functions utilizadas no MsgBox:

     

    vbOKOnly    0 Display OK button only.
    vbOKCancel    1 Display OK and Cancel buttons.
    vbAbortRetryIgnore    2 Display Abort, Retry, and Ignore buttons.
    vbYesNoCancel    3 Display Yes, No, and Cancel buttons.
    vbYesNo    4 Display Yes and No buttons.
    vbRetryCancel    5 Display Retry and Cancel buttons.
    vbCritical 16 Display Critical Message icon.
    vbQuestion 32 Display Warning Query icon.
    vbExclamation 48 Display Warning Message icon.
    vbInformation 64 Display Information Message icon.
    vbDefaultButton1    0 First button is default.
    vbDefaultButton2  256 Second button is default.
    vbDefaultButton3  512 Third button is default.
    vbDefaultButton4  768 Fourth button is default.
    vbApplicationModal    0 Application modal; the user must respond to the message box before continuing work in the current application.
    vbSystemModal 4096 System modal; all applications are suspended until the user responds to the message

     

     

    terça-feira, 5 de agosto de 2008 13:55
  • Certo mas ainda nao consegui colocar tipo (msg box sera sobre a intranet, entao tenho o conteúdo e tenho o topo é nesse topo que quero colocar a informação, ou seja do que se trata o msg box

    terça-feira, 5 de agosto de 2008 14:08
  • Não consegui entender, pois o MsgBox é uma pequena janela (janela desktop) e vc quer colocar dentro do HTML (seria a intranet) e no topo da pagina da intranet. Acho que é mais fácil vc colocar umas tags de HTML  contendo o aviso que quer informar na página do topo. Isso foi o que eu conseguir entender.


    att,


    Leonardo Couto.
    terça-feira, 5 de agosto de 2008 14:21
  • Jose,


    Entendir utiliza o metodo Popup do object WshShell;



    Popup Method
    See Also
    WshShell Object | Echo Method
    Language
    JScript

    VBScript

    Show All
    Displays text in a pop-up message box.

    intButton = object.Popup(strText,[nSecondsToWait],[strTitle],[nType])
    Arguments
    object
    WshShell object.
    strText
    String value containing the text you want to appear in the pop-up message box.
    nSecondsToWait
    Optional. Numeric value indicating the maximum length of time (in seconds) you want the pop-up message box displayed.
    strTitle
    Optional. String value containing the text you want to appear as the title of the pop-up message box.
    nType
    Optional. Numeric value indicating the type of buttons and icons you want in the pop-up message box. These determine how the message box is used.
    IntButton
    Integer value indicating the number of the button the user clicked to dismiss the message box. This is the value returned by the Popup method.
    Remarks
    The Popup method displays a message box regardless of which host executable file is running (WScript.exe or CScript.exe). If nSecondsToWaitis equals zero (the default), the pop-up message box remains visible until closed by the user. If nSecondsToWaitis is greater than zero, the pop-up message box closes after nSecondsToWait seconds. If you do not supply the argument strTitle, the title of the pop-up message box defaults to "Windows Script Host." The meaning of nType is the same as in the Microsoft Win32® application programming interface MessageBox function. The following tables show the values and their meanings. You can combine values in these tables.

    Note   To display text properly in RTL languages such as Hebrew or Arabic, add hex &h00100000 (decimal 1048576) to the nType parameter.
    Button Types

    Value Description
    0 Show OK button.
    1 Show OK and Cancel buttons.
    2 Show Abort, Retry, and Ignore buttons.
    3 Show Yes, No, and Cancel buttons.
    4 Show Yes and No buttons.
    5 Show Retry and Cancel buttons.

    Icon Types

    Value Description
    16 Show "Stop Mark" icon.
    32 Show "Question Mark" icon.
    48 Show "Exclamation Mark" icon.
    64 Show "Information Mark" icon.

    The previous two tables do not cover all values for nType. For a complete list, see the Microsoft Win32 documentation.

    The return value intButton denotes the number of the button that the user clicked. If the user does not click a button before nSecondsToWait seconds, intButton is set to -1.

    Value Description
    1 OK button
    2 Cancel button
    3 Abort button
    4 Retry button
    5 Ignore button
    6 Yes button
    7 No button

    Example
    The following code generates a simple pop-up window.

    [VBScript]
    Dim WshShell, BtnCode
    Set WshShell = WScript.CreateObject("WScript.Shell")

    BtnCode = WshShell.Popup("Do you feel alright?", 7, "Answer This Question:", 4 + 32)

    Select Case BtnCode
       case 6      WScript.Echo "Glad to hear you feel alright."
       case 7      WScript.Echo "Hope you're feeling better soon."
       case -1     WScript.Echo "Is there anybody out there?"
    End Select

    terça-feira, 5 de agosto de 2008 14:58