Szukaj na tym blogu

wtorek, 28 listopada 2017

Poniżej automatyczne wyszukiwanie poprzez Visual Basic Script

Poniżej automatyczne wyszukiwanie poprzez Visual Basic Script na allegro i olx:

Set wshshell = WScript.CreateObject("WScript.Shell")
wshshell.run """C:\Users\.....FirefoxPortable.exe"" http://www.olx.pl",1,True
'Set wshshell = Nothing
WScript.Sleep 3500
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "search word"
WScript.Sleep 350
WshShell.SendKeys"{ENTER}"
'allegro
wshshell.run """C:\Users\Desktop\FirefoxPortable\FirefoxPortable.exe"" http://www.allegro.pl",1,True
'Set wshshell = Nothing
WScript.Sleep 3500
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "search word"
WScript.Sleep 350
WshShell.SendKeys"{ENTER}"
wscript.quit


Poniżej skrypt kopiujacy z promptem i mówiący zarazem:
Dim SourceFile, DestinationFile
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set voice = CreateObject("SAPI.SpVoice")
voice.Rate = 1
voice.Volume = 100
CreateObject("SAPI.SpVoice").Speak("Wprowadż czterocyfrowy numer CDC")
strfile = InputBox("Podaj nr CDC XXXX")
SourceFile = "l:\projekty\dzc\gguard\" & "gg_" & strfile & ".fil"
DestinationFile = "d:\"
If objFSO.FileExists(DestinationFile) then
     objFSO.DeleteFile SourceFile,True
else
      objFSO.CopyFile SourceFile, DestinationFile
CreateObject("SAPI.SpVoice").Speak("Kopiowanie zakończone")
End If