Vbscript inputbox probleme
masterkev
-
mikebzh Messages postés 135 Statut Membre -
mikebzh Messages postés 135 Statut Membre -
Bonjour,
volia mon probleme jai crée un .vbs qui me fais pamal de commande " cool " et rend tout plus simple et rapide et surtout " spécial " exemple : la inputbox aparais et jentre une commande ( master ouvre mon msn et les autres des page internet ..) MA QUESTION : je veu exemple ecrire dans la box "tigerdirect.ca" et que si rien n'est trouver dans mon script a propo de "tigerdirect.ca" il remplace http://www."tigerdirect.ca"
jaurais exemple un qqch comme sa
if "variable"
http://www." variable"
mais je sais pas comment faire merci de votre aide :D
Set variable=CreateObject("WScript.Shell")
Set WshShell = Nothing
Sub Run(ByVal sFile)
Dim shell
Set shell = CreateObject("WScript.Shell")
shell.Run Chr(34) & sFile & Chr(34), 1, false
Set shell = Nothing
End Sub
dim strcorp
strCorp = "RIEN"
strCorp = InputBox("ENTRÉ LA COMMANDE DE VOTRE CHOIX :")
select case strcorp
case "master"
run "msnmsgr.exe"
wscript.sleep 5000
variable.SendKeys ("{backspace}")
wscript.sleep 300
variable.SendKeys ("salut@hotmail.com")
wscript.sleep 300
variable.SendKeys ("{tab}")
wscript.sleep 300
variable.SendKeys ("hahanice")
wscript.sleep 300
variable.SendKeys ("{enter}")
case "google"
run "www.google.ca"
case "youtube"
run "www.youtube.com"
case "metallica"
run "https://www.youtube.com/watch?v=jZ5zXXUJsyc"
volia mon probleme jai crée un .vbs qui me fais pamal de commande " cool " et rend tout plus simple et rapide et surtout " spécial " exemple : la inputbox aparais et jentre une commande ( master ouvre mon msn et les autres des page internet ..) MA QUESTION : je veu exemple ecrire dans la box "tigerdirect.ca" et que si rien n'est trouver dans mon script a propo de "tigerdirect.ca" il remplace http://www."tigerdirect.ca"
jaurais exemple un qqch comme sa
if "variable"
http://www." variable"
mais je sais pas comment faire merci de votre aide :D
Set variable=CreateObject("WScript.Shell")
Set WshShell = Nothing
Sub Run(ByVal sFile)
Dim shell
Set shell = CreateObject("WScript.Shell")
shell.Run Chr(34) & sFile & Chr(34), 1, false
Set shell = Nothing
End Sub
dim strcorp
strCorp = "RIEN"
strCorp = InputBox("ENTRÉ LA COMMANDE DE VOTRE CHOIX :")
select case strcorp
case "master"
run "msnmsgr.exe"
wscript.sleep 5000
variable.SendKeys ("{backspace}")
wscript.sleep 300
variable.SendKeys ("salut@hotmail.com")
wscript.sleep 300
variable.SendKeys ("{tab}")
wscript.sleep 300
variable.SendKeys ("hahanice")
wscript.sleep 300
variable.SendKeys ("{enter}")
case "google"
run "www.google.ca"
case "youtube"
run "www.youtube.com"
case "metallica"
run "https://www.youtube.com/watch?v=jZ5zXXUJsyc"