Vbspython은 파이썬에서 VBScript (Visual Basic Script)와 상호 작용할 수있는 파이썬 패키지입니다. 언어를 배우면 도움이 될 수 있습니다
현재 다운로드 금액 :
다음과 같이 말하면서 콘솔에서 PIP를 사용하여 설치하십시오. PIP 설치 vbspython
Vbspython은 다음 이름으로 설치할 수 있습니다.
vbscript
VBS
Vbspython은 많은 일을합니다. 그중 일부는 다음과 같습니다.
import vbspython
file = vbspython . makefile ()
file . msgbox ( "The next item will be an input box!" )
file . input ( "Give your input here" )
output = file . run () #Will be a list import vbspython
print ( vbspython . system ( "whoami" )) #Some attributes from makefile can also be run instantly
> J3ldo import vbspython
icon = vbspython . itemattributes . msgbox . icons . information ()
options = vbspython . itemattributes . msgbox . options . ok_cancel ()
vbspython . msgbox ( text = "Hello!" , title = "My first message box!" , icon = icon , options = options ) #will show a message box try it your self import vbspython
#This is a simple program which says if you said yes or no
if vbspython . msgbox ( "Yes or no?" , options = vbs . itemattributes . msgbox . options . yes_no ) == vbspython . itemattributes . msgbox . returns . no ():
vbspython . msgbox ( "You said no!" , getoutput = False )
else :
vbspython . msgbox ( "You said yes!" , getoutput = False ) import vbspython
print ( vbspython . input ( "What do you think of this library?" )) #will print the input the user gave변수는 출력 또는 시스템과 같은 VBScript의 항목으로 변수를 설정하는 쉬운 방법입니다. 다음은 빠른 예입니다.
import vbspython as vbs
file = vbs . makefile ()
var = file . Variable ( "myvariable" ) # Declare the variable name.
file . system ( 'whoami' , variable = var . apply ()) # Apply the variable to the output of system.
file . msgbox ( 'You are: ' , variable = var . reference ()) # Show the output using the reference keyword
file . run () # Run the file import vbspython
file = vbspython . makefile ()
file . execute ( "notepad" ) #Will open notepad using windows + r
file . sleep ( 1 ) #sleep is in seconds. This will sleep the python file and the vbs file but is not needed if run without a file
file . presskeys ( "Hello world!" )
file . presskey ( "enter" ) #Will press enter. To get a list of keys leave empty
file . run () #Dont run like this
import vbspython as vbs
file = vbs . makefile ()
file . msgbox ( "I am indestructable!" )
while True :
file . run ( deletefile = False )
file . delete ()
#But like this
import vbspython
file = vbspython . makefile ()
@ file . loop ()
def loop_this ():
file . msgbox ( "I am indestructable!" )
file . run () import vbspython
file = vbspython . makefile ()
@ file . loop ( 10 )
def loop_this ():
file . msgbox ( "I will be run 10 times!" )
file . run () import vbspython
path = vbspython . specialfolder ( "Downloads" )
print ( path ) #Will print the path to downloads could be useful if your downloading things import vbspython as vbs
file = vbs . makefile ()
tts = file . tts () # Enable the text to speech.
tts . volume ( 50 ) # Set the volume of the text to speech. Cant be higher then 100.
tts . rate ( 1 ) # Sets the rate of the speaker. Can't be higher then 10 and must be higher then -10.
tts . voice ( vbs . itemattributes . tts . voice_1 ()) # Sets the voice of the speaker.
tts . speak ( "Hello, world." ) #Says the text. The same as say.
file . run () # Run the file. import vbspython as vbs
vbs . copy ( "Hello, i am copied." ) #Copies: 'Hello, i am copied.' to the clipboard
print ( vbs . getcopied ()) #Prints the current copied item on the clipboard import vbspython
shortcut = "picture.png" #If the shortcut is clicked it will open the picture
location = "./" #Current executing directory
icon = 20 #put in an integer for the built in icons. Else put in a string with the location to the .ico
name = "openpicture" #this indicates the name of the shortcut
vbspython . createshortcut ( shortcut , location , icon , name )
print ( "Succesfully made the shortcut!" ) import vbspython
#First off the unfunny script.
open = "bananas.png" #Will open bananas.png
hotkey = "Ctrl+Alt+e" #When you press ctrl and alt and e at the same time it will open.
name = "hotkeyname" #optional. can be left blank
vbspython . createhotkey ( open , hotkey , name )
#the next one is a funny troll script. It will disable a random key on your keyboard
import string , random
open = "nothing.vbs" #A blank vbs script which does nothing.
hotkey = random . choice ( list ( string . ascii_lowercase )) #Will get a random ascii character. When pressed the key will look like it wasnt pressed
vbspython . createhotkey ( open , hotkey ) '''
Deleting hotkeys needs to be done manual. First of go in to file explorer and enable show hidden files.
Then go to your desktop and search for a file with a standard .exe icon called: vbspythonhotkey_{the id/custom name}.
Now the hotkey has been deleted!
''' import vbspython
file = vbspython . makefile ()
file . createfolder ( "C:UsersMyUserMyepicfolder" ) #Myepicfolder will be the folder that will be created
file . run () import vbspython
file = vbspython . makefile ()
file . deletefile ( "TempFile.py" ) #Deletes the file TempFile.py
file . run () import vbspython
file = vbspython . makefile ()
file . deletefolder ( "AllTempFiles" ) #Will delete the whole folder and the contents in it
file . deletefile ( "TempFile.py" )
file . run () import vbspython
file = vbspython . makefile ()
file . copyfile ( "Secretfile.txt" , "C:Users" ) #copies the file to the Users directory
file . run () import vbspython
file = vbspython . makefile ()
file . copyfolder ( "Newuser" , "C:Users" ) #Copies folder to C:Users
file . run () import vbspython
file = vbspython . makefile ()
file . movefile ( "TempFile.py" , "Tempfiles" ) #moves a file
file . run () import vbspython
file = vbspython . makefile ()
file . movefolder ( "TempFiles" , "Logs" ) #moves the file
file . run () 0.0.1- Vbspython을 만들었지 만 작동하지 않습니다
0.0.2- 작동하게 만들었습니다
0.0.8- 프레스 키를 만들면 선택한 키를 누릅니다. .VBS 파일을 잠들게하는 수면. 그리고 열쇠 목록을 위해 특별한 키를 눌러 비어있는 프레스 키.
0.1.0- 도움말 루프 및 런 파일을 만들었습니다.
0.1.1- 입력 시스템을 개선했습니다. ItemAttributes 클래스에 아이콘과 옵션이 추가되었습니다
0.1.2- runas 명령 추가 이것은 파일을 관리자로 실행합니다. 그리고 TTS 클래스 : Say, rate, volume (속성 참조), 말하기 (Say와 동일).
0.1.3- 카피 파일 MoveFile CreateFolder MoveFolder DeleteFile Copyfolder 추가 및 일부 버그 수정 사항을 추가했습니다.
0.1.4- 실행 추가 시스템 0.1.5와 같은 파일을 열 때 중지되지 않음 - 특수 폴더 추가 0.1.6- Changelog 잊혀진 0.1.7- 0.1.6에서 ChangElog를하고 부분적으로 0.1.7에 부분적으로 변경하는 것을 잊었습니다. 파일에 바로 가기 생성을 추가하고 핫키를 추가했습니다. 0.1.8- msgbox에서 변수를 얻기 위해 옵션을 추가했습니다. 누군가가 ItemAttributes를 사용하여 예 또는 아니오라고 말했는지 확인하십시오.
0.1.9- 입력, msgbox 및 시스템에 적용되는 변수 클래스 (GitHub 문서 참조)를 추가했습니다. 또한 ItemAttributes에 @staticMethod를 추가했습니다.
0.2.0- 큰 업데이트! 0.2.0에 추가 된 것은 다음과 같습니다. @loop의 루핑량 및 Specialfolder의 변수 매개 변수 : MakeFile의 모든 항목에 대한 PARAM은 IDE를 읽고 복사 및 GetCopied 기능을 추가했습니다.