Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VbScript

Empfohlene Antworten

Veröffentlicht

Hey,

also möcht ma gern wissen mit welchem Code man ne einfache ErrorBox erstellt...

Also wenn ich in den Editor schreibe: MsgBox "Test!" und es unter *.vbs abspeicher kommt das hier raus

test.bmp.png

geht das mit der Errorbox auch so easy ?

VBScript MsgBox Function

dort: vbCritical, vbExclamation

eine errorbox in dem sinne gibt es nicht.

s'Amstel

Kann jmd mal n Beispiel machen ? Z.B ne ErrorBox wo drinne steht "Test" ?

Jo danke .vash so wollt ichs eig. wissen ^^ Ich habs mit Msgbox vbCritical "nnn"

und sowas ausprobiert. Nach ddeiner Reihenfolge klappen auch die anderen Tags.

Kann man die Antworten auf die MessageBox auch manuell bestimmen ?

Kann man die Antworten auf die MessageBox auch manuell bestimmen ?

wenn du damit meinst, dass du bei vbOK etwas anderes als 1 erhältst: nein. das ist IMO eine enumeration, die ist so vorgegeben.

s'Amstel

ok Du solltest wissen das vbCritical und alle anderen Werte Konstanten sind die eigentlich einer Zahl entsprechen.

z.B. vbQuestion = 32

vbYesNo = 4

Binär sieht das so aus


 4 = 0000 0100

32 = 0010 0000

     0010 0100 = 4 + 32

Du siehst dass die Konstanten genau einer 1 entsprechen, die man daher einfach addieren kann und so wird eine Variable bzw. Zahl benutzt um mehrere "Flags" zu setzen, die man recht einfach auswerten kann. Probier mal folgenden Code aus (habe ich als wsh job verpackt):

<job id="test">

<script language="vbscript">

option explicit


dim antwort

'antwort = MsgBox("...", vbCritical + vbYesNo)

antwort = MsgBox("...", vbQuestion + vbYesNoCancel, "Frage")


select case antwort

   case vbYes

      msgbox "Ja", vbInformation, "Info"

   case vbNo

      msgbox "Nein", vbExclamation, "Info"

   case vbCancel

      msgbox "Abbruch", vbCritical, "Info"

end select


</script>

</job>

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.